Package org.objectweb.asm.commons

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


   
    // char[] carr=new char[characters];
    Attribute attr = getAttribute("characters");
    int carr=-1;
    if(attr!=null) {
      carr=adapter.newLocal(Types.CHAR_ARRAY);
      attr.getValue().writeOut(bc, Expression.MODE_VALUE);
      adapter.cast(Types.DOUBLE_VALUE, Types.INT_VALUE);
      adapter.newArray(Types.CHAR);
      adapter.storeLocal(carr);
    }
View Full Code Here


      adapter.newArray(Types.CHAR);
      adapter.storeLocal(carr);
    }
   
    // BufferedReader reader = IOUtil.getBufferedReader(resource,charset);
    final int br=adapter.newLocal(Types.BUFFERED_READER);
    adapter.loadLocal(resource);
    adapter.loadLocal(charset);
    adapter.invokeStatic(IO_UTIL, GET_BUFFERED_READER);
    adapter.storeLocal(br);
   
View Full Code Here

    adapter.loadLocal(charset);
    adapter.invokeStatic(IO_UTIL, GET_BUFFERED_READER);
    adapter.storeLocal(br);
   
    // String line;
    int line=adapter.newLocal(Types.STRING);
   
    // int count=0; 
    int count=adapter.newLocal(Types.INT_VALUE);
    adapter.push(0);
    adapter.storeLocal(count);
View Full Code Here

   
    // String line;
    int line=adapter.newLocal(Types.STRING);
   
    // int count=0; 
    int count=adapter.newLocal(Types.INT_VALUE);
    adapter.push(0);
    adapter.storeLocal(count);
   
    TryFinallyVisitor tfv=new TryFinallyVisitor(new OnFinally() {
      public void writeOut(BytecodeContext bc) {
View Full Code Here

    TagGroup parent = getParentTagGroupQuery(tag,tag.getType());
    tag.setNumberIterator(parent.getNumberIterator());
    tag.setQuery(parent.getQuery());
    //queryImpl = parent.getQueryImpl();
   
    int current=adapter.newLocal(Types.INT_VALUE);
    adapter.loadLocal(tag.getNumberIterator());
    adapter.invokeVirtual(NUMBER_ITERATOR, CURRENT);
    adapter.storeLocal(current);
   
   
View Full Code Here

    adapter.invokeVirtual(NUMBER_ITERATOR, CURRENT);
    adapter.storeLocal(current);
   
   
    // inner current
    int icurrent=adapter.newLocal(Types.INT_VALUE);
   
    adapter.loadLocal(current);
    adapter.push(1);
    adapter.visitInsn(Opcodes.ISUB);
    adapter.storeLocal(icurrent);
View Full Code Here

    tag.setQuery(parent.getQuery());
    tag.setPID(parent.getPID());
    //queryImpl = parent.getQueryImpl();
   
    //int currentOuter=ni.current();
    int current=adapter.newLocal(Types.INT_VALUE);
    adapter.loadLocal(tag.getNumberIterator());
    adapter.invokeVirtual(NUMBER_ITERATOR, CURRENT);
    adapter.storeLocal(current);
   
    // current
View Full Code Here

    adapter.loadLocal(tag.getNumberIterator());
    adapter.invokeVirtual(NUMBER_ITERATOR, CURRENT);
    adapter.storeLocal(current);
   
    // current
    int icurrent=adapter.newLocal(Types.INT_VALUE);
   
    adapter.loadLocal(current);
    adapter.push(1);
    adapter.visitInsn(Opcodes.ISUB);
    adapter.storeLocal(icurrent);
View Full Code Here

 
 
  public static void writeOutTypeQuery(final TagGroup tag, BytecodeContext bc) throws BytecodeException {
    final GeneratorAdapter adapter = bc.getAdapter();

    tag.setNumberIterator(adapter.newLocal(NUMBER_ITERATOR));
    boolean isOutput=tag.getType()==TagGroup.TAG_OUTPUT;
    ParseBodyVisitor pbv=isOutput?new ParseBodyVisitor():null;
    if(isOutput)pbv.visitBegin(bc);
     
   
View Full Code Here

    ParseBodyVisitor pbv=isOutput?new ParseBodyVisitor():null;
    if(isOutput)pbv.visitBegin(bc);
     
   
    // Query query=pc.getQuery(@query);
    tag.setQuery(adapter.newLocal(Types.QUERY));
    adapter.loadArg(0);
    Expression val = tag.getAttribute("query").getValue();
    val.writeOut(bc, Expression.MODE_REF);
    if(val instanceof LitString)
      adapter.invokeVirtual(Types.PAGE_CONTEXT, TagLoop.GET_QUERY_STRING);
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.