Package org.objectweb.asm.commons

Examples of org.objectweb.asm.commons.GeneratorAdapter.dup()


        // value
        adapter.loadLocal(array);
        adapter.visitVarInsn(Opcodes.ILOAD, i);
        ASMConstants.NULL(adapter);
        adapter.invokeInterface(Types.ARRAY, GET);
        adapter.dup();
        adapter.storeLocal(obj);
        Label endIf=new Label();
        //adapter.loadLocal(obj);
        adapter.visitJumpInsn(Opcodes.IFNONNULL, endIf);
          adapter.goTo(forVisitor.getContinueLabel());
View Full Code Here


          else {
            // br.readLine()
            adapter.loadLocal(br);
            adapter.invokeVirtual(Types.BUFFERED_READER, READ_LINE);
          }
          adapter.dup();
          adapter.storeLocal(line);
         
        dv.visitNEQ();
          adapter.visitInsn(Opcodes.ACONST_NULL);
        dv.visitEnd(bc);
View Full Code Here

 
 
  public final void createUDFProperties(BytecodeContext bc, int index, boolean closure) throws BytecodeException {
    GeneratorAdapter adapter=bc.getAdapter();
    adapter.newInstance(Types.UDF_PROPERTIES_IMPL);
    adapter.dup();
    if(closure){
      adapter.loadThis();
      adapter.invokeVirtual(Types.PAGE, GET_PAGESOURCE);
    }
    else adapter.visitVarInsn(ALOAD, 1);
View Full Code Here

 
  public final void createUDF(BytecodeContext bc, int index, boolean closure) throws BytecodeException {
    // new UDF(...)
    GeneratorAdapter adapter=bc.getAdapter();
    adapter.newInstance(closure?Types.CLOSURE:Types.UDF_IMPL);
    adapter.dup();
   
    createUDFProperties(bc, index,closure);
    //loadUDFProperties(bc, index,closure);
   
    adapter.invokeConstructor(closure?Types.CLOSURE:Types.UDF_IMPL, INIT_UDF_IMPL_PROP);
View Full Code Here

                }
            }
          }
        }
      // write out arguments 
        ga.dup();
            ga.push(i);
             
            // new FunctionArgument(...)
            ga.newInstance(canHaveKey && functionIndex<INIT_FAI_KEY_LIGHT.length?FUNCTION_ARGUMENT_LIGHT:FUNCTION_ARGUMENT_IMPL);
        ga.dup();
View Full Code Here

        ga.dup();
            ga.push(i);
             
            // new FunctionArgument(...)
            ga.newInstance(canHaveKey && functionIndex<INIT_FAI_KEY_LIGHT.length?FUNCTION_ARGUMENT_LIGHT:FUNCTION_ARGUMENT_IMPL);
        ga.dup();
        Variable.registerKey(bc,arg.getName(),false);
       
        // type
        if(functionIndex>=INIT_FAI_KEY.length-7) {
          _strType.writeOut(bc, Expression.MODE_REF);
View Full Code Here

      loadUDFProperties(bc,valueIndex,arrayIndex,false);
      adapter.invokeVirtual(Types.INTERFACE_IMPL, hasKey?REG_UDF_KEY:REG_UDF_STR);
    }
    else {
      adapter.newInstance(Types.UDF_IMPL);
      adapter.dup();
      loadUDFProperties(bc, valueIndex,arrayIndex,false);
      adapter.invokeConstructor(Types.UDF_IMPL, INIT_UDF_IMPL_PROP);
     
      //loadUDF(bc, index);
      adapter.invokeInterface(Types.VARIABLES, hasKey?SET_KEY:SET_STR);
View Full Code Here

                null, EMPTY_TYPE_ARR, cw);

        clazzInit.visitLdcInsn(selfType.getClassName());
        clazzInit.invokeStatic(JAVA_LANG_CLASS_TYPE, CLASS_FORNAME_METHOD);
        clazzInit.invokeStatic(PROXY_HELPER_TYPE, HELPER_GET_PROXY_CLASS_METHOD);
        clazzInit.dup();
        clazzInit.putStatic(selfType, PROXY_CLASS_FIELD_NAME, PROXY_CLASS_TYPE);
       
        return clazzInit;
    }
View Full Code Here

        // if the method is extending something, then we have
        // to test if the handler is initialized...

        if (md.isImplemented()) {
            ga.dup();
            Label ok = ga.newLabel();
            ga.ifNonNull(ok);

            ga.loadThis();
            ga.loadArgs();
View Full Code Here

        Label handler = ga.mark();
        Type udt = Type.getType(UndeclaredThrowableException.class);
        int loc = ga.newLocal(thr);
        ga.storeLocal(loc, thr);
        ga.newInstance(udt);
        ga.dup();
        ga.loadLocal(loc, thr);
        ga.invokeConstructor(udt, org.objectweb.asm.commons.Method
                .getMethod("void <init>(java.lang.Throwable)"));
        ga.throwException();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.