Examples of storeLocal()


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

    {
      GeneratorAdapter gm = new GeneratorAdapter(Opcodes.ACC_PUBLIC, getMethod("java.io.Writer runCodes(java.io.Writer, Object[])"), null, null, cw);
      int writerLocal = gm.newLocal(Type.getType(Writer.class));
      // Put the writer in our local
      gm.loadArg(0);
      gm.storeLocal(writerLocal);
      int fieldNum = 0;
      for (Code newcode : newcodes) {
        Class<? extends Code> codeClass = newcode.getClass();
        Class fieldClass = codeClass;
        while(fieldClass.isAnonymousClass() || fieldClass.isLocalClass() || (fieldClass.getModifiers() & Modifier.PUBLIC) == 0) {
View Full Code Here

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

          gm.invokeInterface(fieldType, EXECUTE_METHOD);
        } else {
          gm.invokeVirtual(fieldType, EXECUTE_METHOD);
        }
        // writer =
        gm.storeLocal(writerLocal);

        fieldNum++;
      }
      cm.returnValue();
      cm.endMethod();
View Full Code Here

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

        Type thr = Type.getType(Throwable.class);
        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)"));
View Full Code Here

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

    mg.invokeVirtual(Type.getType(Field.class), method);
    mg.mark(endTry);
    mg.returnValue();
    mg.mark(catchHandle);
    int exception = mg.newLocal(Type.getType(IllegalAccessException.class));
    mg.storeLocal(exception);
    mg.loadLocal(exception);
    mg.invokeStatic(Type.getType(Throwables.class),
                    getMethod(RuntimeException.class, "propagate", Throwable.class));
    mg.throwException();
    mg.endMethod();
View Full Code Here

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

        Type thr = Type.getType(Throwable.class);
        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)"));
View Full Code Here

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

      mv.visitInsn( Opcodes.ARETURN );
    }
    else {
      // Detail[] arr = get$Sect0();
      final int l_arr = mv.newLocal( sub.arrayType() );
      mv.storeLocal( l_arr );

      final int l_len = mv.newLocal( Type.INT_TYPE );
      mv.loadLocal( l_arr );
      mv.arrayLength();
      mv.storeLocal( l_len );
View Full Code Here

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

      mv.storeLocal( l_arr );

      final int l_len = mv.newLocal( Type.INT_TYPE );
      mv.loadLocal( l_arr );
      mv.arrayLength();
      mv.storeLocal( l_len );

      // List lst = new ArrayList( arr.length );
      final int l_lst = mv.newLocal( ARRAYLIST_CLASS );
      mv.newInstance( ARRAYLIST_CLASS );
      mv.dup();
View Full Code Here

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

      final int l_lst = mv.newLocal( ARRAYLIST_CLASS );
      mv.newInstance( ARRAYLIST_CLASS );
      mv.dup();
      mv.loadLocal( l_len );
      mv.visitMethodInsn( Opcodes.INVOKESPECIAL, ARRAYLIST_CLASS.getInternalName(), "<init>", "(I)V" );
      mv.storeLocal( l_lst );

      // for (int i = 0; i < len; i++) {
      final int l_i = mv.newLocal( Type.INT_TYPE );
      mv.push( 0 );
      mv.storeLocal( l_i );
View Full Code Here

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

      mv.storeLocal( l_lst );

      // for (int i = 0; i < len; i++) {
      final int l_i = mv.newLocal( Type.INT_TYPE );
      mv.push( 0 );
      mv.storeLocal( l_i );
      final Label test = mv.newLabel();
      mv.goTo( test );
      final Label again = mv.mark();

      // lst.add( arr[ i ] );
View Full Code Here

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

  void compileLogging( final CellAddress _cellAddress, final String _name, boolean _input, boolean _output ) throws CompilerException
  {
    final GeneratorAdapter mv = mv();
    final int valLocal = mv.newLocal( type() );
    mv.storeLocal( valLocal );
    mv.loadLocal( valLocal );
    if (DataType.NUMERIC.equals( dataType() )) {
      compileConversionTo( Number.class );
    }
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.