Examples of invokevirtual()


Examples of anvil.codec.Code.invokevirtual()

    Code code = context.getCode();
    ConstantPool pool = code.getPool();
    FunctionStatement function = getFunctionStatement();
    if (function.isGenerator()) {
      code.aload(function.getFrameIndex());
      code.invokevirtual(pool.addMethodRef("anvil/script/Generator", "setClosedState", "()V"));
    }
    int rv = 0;   
    if (_expression != null) {
      if (_expression.needLineNumbers()) {
        context.location(_expression.getLocation());
View Full Code Here

Examples of anvil.codec.Code.invokevirtual()

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

Examples of anvil.codec.Code.invokevirtual()

      code.dup();

      int contextframe = pool.addMethodRef(context.TYPE_CONTEXT, "frame",
        "()Lanvil/script/StackFrame;");
      code.aload_first();
      code.invokevirtual(contextframe);
      code.swap();
      code.invokevirtual(pool.addMethodRef("anvil/script/StackFrame",
        "push", "(Lanvil/core/Any;)V"));

      _framelocal = code.addLocal();
View Full Code Here

Examples of anvil.codec.Code.invokevirtual()

      int contextframe = pool.addMethodRef(context.TYPE_CONTEXT, "frame",
        "()Lanvil/script/StackFrame;");
      code.aload_first();
      code.invokevirtual(contextframe);
      code.swap();
      code.invokevirtual(pool.addMethodRef("anvil/script/StackFrame",
        "push", "(Lanvil/core/Any;)V"));

      _framelocal = code.addLocal();
      code.astore(_framelocal);
View Full Code Here

Examples of anvil.codec.Code.invokevirtual()

      // finally
      handler.startFinally();
      int returnto = code.addLocal();
      code.astore(returnto);
      code.aload_first();
      code.invokevirtual(contextframe);
      code.invokevirtual(pool.addMethodRef("anvil/script/StackFrame",
        "pop", "()Lanvil/core/Any;"));
      code.pop();
      if (_release != null) {
        _release.compile(context, Node.GET);
View Full Code Here

Examples of anvil.codec.Code.invokevirtual()

      handler.startFinally();
      int returnto = code.addLocal();
      code.astore(returnto);
      code.aload_first();
      code.invokevirtual(contextframe);
      code.invokevirtual(pool.addMethodRef("anvil/script/StackFrame",
        "pop", "()Lanvil/core/Any;"));
      code.pop();
      if (_release != null) {
        _release.compile(context, Node.GET);
        code.pop();
View Full Code Here

Examples of anvil.codec.Code.invokevirtual()

    Code code = context.getCode();
    ConstantPool pool = code.getPool();
    _child.compile(context, GET);
    child.compile(context, GET);
    code.dup_x1();
    code.invokevirtual(pool.addMethodRef(context.TYPE_ANY, "setRef",
      "(Lanvil/core/Any;)V"));
  }


  public void compile(ByteCompiler context, int operation)
View Full Code Here

Examples of anvil.codec.Code.invokevirtual()

    int slot = addConstant(value);
    code.getstatic(code.getPool().addFieldRef(TYPE_MODULE, "_const", "[Lanvil/core/Any;"));
    code.iconst(slot);
    code.aaload();
    if (canchange && value.isMutable()) {
      code.invokevirtual(getPool().addMethodRef("anvil/core/Any", "copy", "()Lanvil/core/Any;"));
    }
    return this;
  }
 
View Full Code Here

Examples of anvil.codec.Code.invokevirtual()

    code.getstatic(javafield);
    Source notnull = code.go_to();
    isnull.bind();
    code.aload_first();
    code.astring(classname);
    code.invokevirtual(pool.addMethodRef(contextclass, "reflect", "(Ljava/lang/String;)Lanvil/core/reflect/Reflection;"));
    code.dup();
    code.putstatic(javafield);
    notnull.bind();
    code.popop();
    return this;
View Full Code Here

Examples of anvil.codec.Code.invokevirtual()

      Code code = getCode();
      Method method = code.getMethod();
      if (method.getClassRoom().getStatic() != method) {
        code.aload_first();
        code.iconst(location.getLine());
        code.invokevirtual(getPool().addMethodRef("anvil/script/StackFrameStack",
          "setLine", "(I)V"));
      }
    }
    return this;
  }
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.