Package org.objectweb.asm.commons

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


    if(attrStartLine==null) adapter.push(1);
    else {
      attrStartLine.getValue().writeOut(bc, Expression.MODE_VALUE);
      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");
View Full Code Here


    if(attrEndLine==null) adapter.push(-1);
    else {
      attrEndLine.getValue().writeOut(bc, Expression.MODE_VALUE);
      adapter.visitInsn(Opcodes.D2I);
    }
    adapter.storeLocal(endline);

   
    //VariableReference index=VariableInterpreter.getVariableReference(pc,@index);
    int index=-1,item=-1;
   
View Full Code Here

    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);
    }

    // index
    Attribute attrIndex = getAttribute("index");
    if(attrIndex!=null) {
View Full Code Here

    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);
    }
   
    //java.io.File file=FileUtil.toResourceExisting(pc,@file);
    int resource=adapter.newLocal(Types.RESOURCE);
    adapter.loadArg(0);
View Full Code Here

    //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);
   
    // pc.getConfig().getSecurityManager().checkFileLocation(resource);
    adapter.loadArg(0);
    adapter.invokeVirtual(Types.PAGE_CONTEXT, GET_CONFIG);
    adapter.invokeInterface(Types.CONFIG_WEB, GET_SECURITY_MANAGER);
View Full Code Here

    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);
    }
   
    // BufferedReader reader = IOUtil.getBufferedReader(resource,charset);
    final int br=adapter.newLocal(Types.BUFFERED_READER);
    adapter.loadLocal(resource);
View Full Code Here

    // 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);
   
    // String line;
    int line=adapter.newLocal(Types.STRING);
   
    // int count=0; 
View Full Code Here

    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) {
        bc.getAdapter().loadLocal(br);
        bc.getAdapter().invokeStatic(IO_UTIL, CLOSE_EL);
View Full Code Here

            // 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

      adapter.loadLocal(tag.getNumberIterator());
      adapter.invokeStatic(NUMBER_ITERATOR, REALEASE);
     
      // numberIterator=oldNi;
      adapter.loadLocal(oldNi);
      adapter.storeLocal(tag.getNumberIterator());
   
      // ni.setCurrent(current+1);
      /*adapter.loadLocal(tag.getNumberIterator());
      adapter.loadLocal(icurrent);
      adapter.push(1);
 
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.