Package anvil.codec

Examples of anvil.codec.Code.invokevirtual()


   
    int depth = Grammar.countEscapeDepth(_context, _function);
    code.aload(_context.getFrameIndex());
    if (depth >= 0) {
      code.iconst(depth+1);
      code.invokevirtual(pool.addMethodRef("anvil/script/StackFrame", "getEscape",
        "(I)Lanvil/script/StackFrame;"));
    }
   
    int n = childs();
    if (!hasSplices() && n<=4) {
View Full Code Here


    int n = childs();
    if (!hasSplices() && n<=4) {
      for(int i=0; i<n; i++) {
        getChild(i).compile(context, GET);
      }
      code.invokevirtual(pool.addMethodRef(context.TYPE_CONTEXT, "exec",
          inClass ? SIGNATURES_SELF[n] : SIGNATURES_NO_SELF[n]));
         
    } else {
      context.compileArgumentList(getChilds(0));
      code.invokevirtual(pool.addMethodRef(context.TYPE_CONTEXT, "exec",
View Full Code Here

      code.invokevirtual(pool.addMethodRef(context.TYPE_CONTEXT, "exec",
          inClass ? SIGNATURES_SELF[n] : SIGNATURES_NO_SELF[n]));
         
    } else {
      context.compileArgumentList(getChilds(0));
      code.invokevirtual(pool.addMethodRef(context.TYPE_CONTEXT, "exec",
        inClass ? "(Lanvil/core/Any;Lanvil/script/Function;Lanvil/script/StackFrame;[Lanvil/core/Any;)Lanvil/core/Any;" :
                  "(Lanvil/script/Function;Lanvil/script/StackFrame;[Lanvil/core/Any;)Lanvil/core/Any;"));
       
    }   
View Full Code Here

      public void compile(ByteCompiler context, int operation)
      {
        left.compile(context, GET);
        right.compile(context, GET);
        Code code = context.getCode();
        code.invokevirtual(code.getPool().addMethodRef(context.TYPE_ANY,
          "concat", "(Lanvil/core/Any;)Lanvil/core/Any;"));
      }     
    });
  }
View Full Code Here

    Code code = context.getCode();
    ConstantPool pool = code.getPool();
    code.aload_first();
    _left.compile(context, GET);
    _right.compile(context, GET);
    code.invokevirtual(pool.addMethodRef(context.TYPE_CONTEXT,
      "pipe", "(Lanvil/core/Any;Lanvil/core/Any;)Lanvil/core/Any;"));
    if (operation == GET_BOOLEAN) {
      context.any2boolean();
    }
  }
View Full Code Here

  public void compile(ByteCompiler context, int operation)
  {
    Code code = context.getCode();
    code.aload_first();
    code.invokevirtual(code.getPool().addMethodRef(context.TYPE_CONTEXT,
     "global", "()Lanvil/core/Any;"));
    if (operation == GET_BOOLEAN) {
      context.any2boolean();
    }
  }
View Full Code Here

        child.compile(context, new Node() {
          public void compile(ByteCompiler context, int operation)
          {
            Code code = context.getCode();
            child.compile(context, GET);
            code.invokevirtual(code.getPool().addMethodRef(context.TYPE_ANY, "increase", "()Lanvil/core/Any;"));
          }     
        });
      }
      break;
     
View Full Code Here

        child.compile(context, new Node() {
          public void compile(ByteCompiler context, int operation)
          {
            Code code = context.getCode();
            child.compile(context, GET);
            code.invokevirtual(code.getPool().addMethodRef(context.TYPE_ANY, "decrease", "()Lanvil/core/Any;"));
          }     
        });
      }
      break;
     
View Full Code Here

  public void compile(ByteCompiler context, int operation)
  {
    _child.compile(context, CHECK);
    Code code = context.getCode();
    code.invokevirtual(code.getPool().addMethodRef(context.TYPE_ANY,
      "isDefined", "()Z"));
    if (operation != GET_BOOLEAN) {
      context.boolean2any();
    }
  }
View Full Code Here

  public void compile(ByteCompiler context, int operation)
  {
    super.compile(context, GET);
    Code code = context.getCode();
    code.invokevirtual(code.getPool().addMethodRef(context.TYPE_ANY,
      "concat", "(Lanvil/core/Any;)Lanvil/core/Any;"));
    if (operation == GET_BOOLEAN) {
      context.any2boolean();
    }
  }
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.