Package anvil.codec

Examples of anvil.codec.Code.invokevirtual()


    if (callback != null) {
      code.self();
      context.compileArgumentList(callback, nodes2, l_context);
      code.invokevirtual(callback.getTypeRef(pool));
      if (castToBoolean) {
        code.invokevirtual(sig_toBoolean);
        code.ireturn();
      } else {
        code.areturn();
      }
   
View Full Code Here


    code.getstatic(field);
    code.aload(_context.getFrameIndex());
    int depth = Grammar.countEscapeDepth(_context, _function);
    if (depth >= 0) {
      code.iconst(depth+1);
      code.invokevirtual(pool.addMethodRef("anvil/script/StackFrame", "getEscape",
        "(I)Lanvil/script/StackFrame;"));
    }
    code.invokespecial(pool.addMethodRef(anyfunction, "<init>", signature));
    if (operation == GET_BOOLEAN) {
      context.any2boolean();
View Full Code Here

              "getDeclaration", "(Lanvil/script/Context;Ljava/lang/String;)Lanvil/script/Type;");
          } else {
            method = pool.addMethodRef("anvil/script/compiler/NativeNamespace", "getFunction",
              "(Lanvil/script/Context;Ljava/lang/String;)Lanvil/core/Any;");
          }
          code.invokevirtual(method);
        }
        break;

      case Type.CLASS:
        {
View Full Code Here

      case Type.CLASS:
        {
          code.getstatic(pool.addFieldRef(_type.getTypeRef(pool),
            "__class__", "Lanvil/script/compiler/NativeClass;"));
          if (!get_type) {
            code.invokevirtual(pool.addMethodRef("anvil/script/compiler/NativeClass",
              "getWrapper", "()Lanvil/core/Any;"));
          }
        }
        break;
       
View Full Code Here

      case Type.NAMESPACE:
        {
          code.getstatic(pool.addFieldRef(_type.getTypeRef(pool),
            "__module__", "Lanvil/script/compiler/NativeNamespace;"));
          if (!get_type) {
            code.invokevirtual(pool.addMethodRef("anvil/script/compiler/NativeNamespace",
              "getWrapper", "()Lanvil/core/Any;"));         
          }
        }
        break;
       
View Full Code Here

              "getDeclaration", "(Lanvil/script/Context;Ljava/lang/String;)Lanvil/script/Type;");
          } else {
            method = pool.addMethodRef("anvil/script/compiler/NativeClass", "getMethod",
              "(Lanvil/script/Context;Ljava/lang/String;)Lanvil/core/Any;");
          }
          code.invokevirtual(method);
        }
        break;
      }
     
    } else {
View Full Code Here

          int field = pool.addFieldRef(parent.getTypeRef(pool), "_class",
            "Lanvil/script/compiler/CompiledClassType;");
          code.getstatic(field);
          code.aload_first();
          code.astring(_type.getName());
          code.invokevirtual(pool.addMethodRef(
            "anvil/script/compiler/CompiledClassType",
            get_type ?
              "getMember" :
              "getMemberType",
            get_type ?
View Full Code Here

      code.invokestatic(pool.addMethodRef(context.TYPE_CONTEXT, "getInstance", "()Lanvil/script/Context;"));
      code.astore(contextindex);
    }
    code.self();
    context.compileArgumentList(function, nodes, contextindex);
    code.invokevirtual(function.getTypeRef(pool));
    if (toType > 0) {
      code.invokevirtual(toType);
    } else if (toType < 0) {
      code.invokestatic(-toType);
    }
View Full Code Here

    }
    code.self();
    context.compileArgumentList(function, nodes, contextindex);
    code.invokevirtual(function.getTypeRef(pool));
    if (toType > 0) {
      code.invokevirtual(toType);
    } else if (toType < 0) {
      code.invokestatic(-toType);
    }
    switch(treturn) {
    case 0:
View Full Code Here

  {
    Code code = context.getCode();
    _child.compile(context, GET);
    code.aload_first();
    child.compile(context, GET);
    code.invokevirtual(code.getPool().addMethodRef(context.TYPE_ANY,
      "setReference", "(Lanvil/script/Context;Lanvil/core/Any;)Lanvil/core/Any;"));
  }


  public void compile(ByteCompiler context, int operation)
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.