Package railo.transformer.bytecode

Examples of railo.transformer.bytecode.BytecodeContext


    ClassWriter cw = ASMUtil.getClassWriter();
        //ClassWriter cw = new ClassWriter(true);
      cw.visit(Opcodes.V1_2, Opcodes.ACC_PUBLIC, real, null, "java/lang/Object", null);

      //GeneratorAdapter ga = new GeneratorAdapter(Opcodes.ACC_PUBLIC,Page.STATIC_CONSTRUCTOR,null,null,cw);
    BytecodeContext statConstr = null;//new BytecodeContext(null,null,null,cw,real,ga,Page.STATIC_CONSTRUCTOR);

      ///ga = new GeneratorAdapter(Opcodes.ACC_PUBLIC,Page.CONSTRUCTOR,null,null,cw);
    BytecodeContext constr = null;//new BytecodeContext(null,null,null,cw,real,ga,Page.CONSTRUCTOR);
   
     
     // field component
      //FieldVisitor fv = cw.visitField(Opcodes.ACC_PRIVATE, "c", "Lrailo/runtime/ComponentImpl;", null, null);
      //fv.visitEnd();
     
      java.util.List<LitString> _keys=new ArrayList<LitString>();
   
        // remote methods
        Collection.Key[] keys = component.keys(Component.ACCESS_REMOTE);
        int max;
        for(int i=0;i<keys.length;i++){
          max=-1;
          while((max=createMethod(statConstr,constr,_keys,cw,real,component.get(keys[i]),max, writeLog,supressWSbeforeArg))!=-1){
            break;// for overload remove this
          }
        }
       
        // Constructor
        GeneratorAdapter adapter = new GeneratorAdapter(Opcodes.ACC_PUBLIC,CONSTRUCTOR_OBJECT,null,null,cw);
    adapter.loadThis();
        adapter.invokeConstructor(Types.OBJECT, CONSTRUCTOR_OBJECT);
        railo.transformer.bytecode.Page.registerFields(new BytecodeContext(null,statConstr,constr,getPage(statConstr,constr),_keys,cw,real,adapter,CONSTRUCTOR_OBJECT,writeLog,supressWSbeforeArg), _keys);
        adapter.returnValue();
        adapter.endMethod();
       
       
        cw.visitEnd();
View Full Code Here


                udf.getFunctionName(),
                rtnType,
              types
                );
            GeneratorAdapter adapter = new GeneratorAdapter(Opcodes.ACC_PUBLIC+Opcodes.ACC_FINAL , method, null, null, cw);
            BytecodeContext bc = new BytecodeContext(null,statConstr,constr,getPage(statConstr,constr),keys,cw,className,adapter,method,writeLog,supressWSbeforeArg);
            Label start=adapter.newLabel();
            adapter.visitLabel(start);
           
       //ComponentController.invoke(name, args);
            // name
            adapter.push(udf.getFunctionName());
           
            // args
            ArrayVisitor av=new ArrayVisitor();
            av.visitBegin(adapter,Types.OBJECT,types.length);
            for(int y=0;y<types.length;y++){
          av.visitBeginItem(adapter, y);
            adapter.loadArg(y);
          av.visitEndItem(bc.getAdapter());
            }
            av.visitEnd();
            adapter.invokeStatic(COMPONENT_CONTROLLER, INVOKE);
            adapter.checkCast(rtnType);
           
View Full Code Here

 
  public abstract void _writeOut(BytecodeContext bc, int pageType) throws BytecodeException;
 

  public final void loadUDFProperties(BytecodeContext bc, int valueIndex,int arrayIndex, boolean closure) throws BytecodeException {
    BytecodeContext constr = bc.getConstructor();
    GeneratorAdapter cga = constr.getAdapter();
    GeneratorAdapter ga = bc.getAdapter();
   
    // store
    cga.visitVarInsn(ALOAD, 0);
    cga.visitFieldInsn(GETFIELD, bc.getClassName(), "udfs", Types.UDF_PROPERTIES_ARRAY.toString());
View Full Code Here

TOP

Related Classes of railo.transformer.bytecode.BytecodeContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.