Package org.objectweb.asm.commons

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


    //VariableReference item=VariableInterpreter.getVariableReference(pc,index);
    int index = -1;
    Attribute attrIndex = getAttribute("index");
    if(attrIndex!=null){
      index = adapter.newLocal(Types.VARIABLE_REFERENCE);
      adapter.loadArg(0);
      attrIndex.getValue().writeOut(bc, Expression.MODE_REF);
      adapter.invokeStatic(Types.VARIABLE_INTERPRETER, GET_VARIABLE_REFERENCE);
      adapter.storeLocal(index);
    }
View Full Code Here


    //VariableReference item=VariableInterpreter.getVariableReference(pc,item);
    int item = -1;
    Attribute attrItem = getAttribute("item");
    if(attrItem!=null){
      item = adapter.newLocal(Types.VARIABLE_REFERENCE);
      adapter.loadArg(0);
      attrItem.getValue().writeOut(bc, Expression.MODE_REF);
      adapter.invokeStatic(Types.VARIABLE_INTERPRETER, GET_VARIABLE_REFERENCE);
      adapter.storeLocal(item);
    }
View Full Code Here

   
   
    WhileVisitor whileVisitor = new WhileVisitor();
    loopVisitor=whileVisitor;
    // java.util.Iterator it=Caster.toIterator(@collection');
    int it=adapter.newLocal(Types.ITERATOR);
    getAttribute("collection").getValue().writeOut(bc,Expression.MODE_REF);
   
    // item and index
    int entry=-1;
    if(hasIndexAndItem) {
View Full Code Here

    getAttribute("collection").getValue().writeOut(bc,Expression.MODE_REF);
   
    // item and index
    int entry=-1;
    if(hasIndexAndItem) {
      entry = adapter.newLocal(Types.MAP_ENTRY);
      // Caster.toCollection(collection)
      adapter.invokeStatic(Types.CASTER,Methods_Caster.TO_COLLECTION);
      //coll.entryIterator();
      adapter.invokeInterface(Types.COLLECTION, ENTRY_ITERATOR);
    }
View Full Code Here

    WhileVisitor whileVisitor = new WhileVisitor();
    loopVisitor=whileVisitor;
    GeneratorAdapter adapter = bc.getAdapter();
   
    // charset=@charset
    int charset=adapter.newLocal(Types.STRING);
    Attribute attrCharset = getAttribute("charset");
    if(attrCharset==null) adapter.visitInsn(Opcodes.ACONST_NULL);
    else attrCharset.getValue().writeOut(bc, Expression.MODE_REF);
    adapter.storeLocal(charset);
   
View Full Code Here

    if(attrCharset==null) adapter.visitInsn(Opcodes.ACONST_NULL);
    else attrCharset.getValue().writeOut(bc, Expression.MODE_REF);
    adapter.storeLocal(charset);
   
    // startline=@startline
    int startline=adapter.newLocal(Types.INT_VALUE);
    Attribute attrStartLine = getAttribute("startline");
    if(attrStartLine==null) attrStartLine = getAttribute("from"); // CF8
    if(attrStartLine==null) adapter.push(1);
    else {
      attrStartLine.getValue().writeOut(bc, Expression.MODE_VALUE);
View Full Code Here

      adapter.visitInsn(Opcodes.D2I);
    }
    adapter.storeLocal(startline);
   
    // endline=@endline
    int endline=adapter.newLocal(Types.INT_VALUE);
    Attribute attrEndLine = getAttribute("endline");
    if(attrEndLine==null) attrEndLine = getAttribute("to");
    if(attrEndLine==null) adapter.push(-1);
    else {
      attrEndLine.getValue().writeOut(bc, Expression.MODE_VALUE);
View Full Code Here

    int index=-1,item=-1;
   
    // item
    Attribute attrItem = getAttribute("item");
    if(attrItem!=null) {
      item = adapter.newLocal(Types.VARIABLE_REFERENCE);
      adapter.loadArg(0);
      attrItem.getValue().writeOut(bc, Expression.MODE_REF);
      adapter.invokeStatic(Types.VARIABLE_INTERPRETER, GET_VARIABLE_REFERENCE);
      adapter.storeLocal(item);
    }
View Full Code Here

    }

    // index
    Attribute attrIndex = getAttribute("index");
    if(attrIndex!=null) {
      index = adapter.newLocal(Types.VARIABLE_REFERENCE);
      adapter.loadArg(0);
      attrIndex.getValue().writeOut(bc, Expression.MODE_REF);
      adapter.invokeStatic(Types.VARIABLE_INTERPRETER, GET_VARIABLE_REFERENCE);
      adapter.storeLocal(index);
    }
View Full Code Here

      adapter.invokeStatic(Types.VARIABLE_INTERPRETER, GET_VARIABLE_REFERENCE);
      adapter.storeLocal(index);
    }
   
    //java.io.File file=FileUtil.toResourceExisting(pc,@file);
    int resource=adapter.newLocal(Types.RESOURCE);
    adapter.loadArg(0);
    getAttribute("file").getValue().writeOut(bc, Expression.MODE_REF);
    adapter.invokeStatic(RESOURCE_UTIL, TO_RESOURCE_EXISTING);
    adapter.storeLocal(resource);
   
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.