Examples of aload()


Examples of alt.jiapi.reflect.InstructionFactory.aload()

        // No API to set SourceFile!

        JiapiMethod method = c.addMethod(Modifier.PUBLIC, "<init>", emptySig);
        InstructionList il = method.getInstructionList();
        InstructionFactory iFactory = il.getInstructionFactory();
        il.add(iFactory.aload(0));
        il.add(iFactory.invoke(0, "java/lang/Object", "<init>", emptySig));
        il.add(iFactory.returnMethod(method));

        method = c.addMethod(Modifier.PUBLIC | Modifier.STATIC, "main", mainSig);
        il = method.getInstructionList();
View Full Code Here

Examples of anvil.codec.Code.aload()

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

Examples of anvil.codec.Code.aload()

  public void compile(ByteCompiler context)
  {
    if (_escaped) {
      FunctionStatement function = (FunctionStatement)_parent;
      Code code = context.getCode();
      code.aload(function.getFrameIndex());
      code.iconst(getSlot());
      code.aload(_index);
      code.invokevirtual(code.getPool().addMethodRef(context.TYPE_STACKFRAME,
        "setLocal", "(ILanvil/core/Any;)Lanvil/core/Any;"));
      code.pop();
View Full Code Here

Examples of anvil.codec.Code.aload()

    if (_escaped) {
      FunctionStatement function = (FunctionStatement)_parent;
      Code code = context.getCode();
      code.aload(function.getFrameIndex());
      code.iconst(getSlot());
      code.aload(_index);
      code.invokevirtual(code.getPool().addMethodRef(context.TYPE_STACKFRAME,
        "setLocal", "(ILanvil/core/Any;)Lanvil/core/Any;"));
      code.pop();
    }
  }
View Full Code Here

Examples of anvil.codec.Code.aload()

          new Node() {
            public void compile(ByteCompiler context, int operation)
            {
              Code code_ = context.getCode();
              ConstantPool pool_ = code_.getPool();
              code_.aload(l_enum);
              code_.invokeinterface(pool_.addInterfaceMethodRef("anvil/java/util/BindingEnumeration", "nextKey", "()Ljava/lang/Object;"));
              code_.invokestatic(pool_.addMethodRef(context.TYPE_ANY, "create", "(Ljava/lang/Object;)Lanvil/core/Any;"));
            }
          })).compile(context, Node.GET);
        code.pop();
View Full Code Here

Examples of anvil.codec.Code.aload()

   
    boolean ismethod = (function.getType() == Type.METHOD);
    Scope parent = function.getParent();
    int parent_ref = parent.getTypeRef(pool);
    if (ismethod) {
      code.aload(2);
      code.checkcast(parent_ref);
    }
    code.aload(1);
    code.aload(3);
    int method_ref = pool.addMethodRef(
View Full Code Here

Examples of anvil.codec.Code.aload()

    int parent_ref = parent.getTypeRef(pool);
    if (ismethod) {
      code.aload(2);
      code.checkcast(parent_ref);
    }
    code.aload(1);
    code.aload(3);
    int method_ref = pool.addMethodRef(
        parent_ref, "h_"+function.getName(), "(Lanvil/script/Context;Lanvil/script/Generator;)Lanvil/core/Any;");
    if (ismethod) {
      code.invokevirtual(method_ref);
View Full Code Here

Examples of anvil.codec.Code.aload()

    if (ismethod) {
      code.aload(2);
      code.checkcast(parent_ref);
    }
    code.aload(1);
    code.aload(3);
    int method_ref = pool.addMethodRef(
        parent_ref, "h_"+function.getName(), "(Lanvil/script/Context;Lanvil/script/Generator;)Lanvil/core/Any;");
    if (ismethod) {
      code.invokevirtual(method_ref);
    } else {
View Full Code Here

Examples of anvil.codec.Code.aload()

          new Node() {
            public void compile(ByteCompiler context, int operation)
            {
              Code code_ = context.getCode();
              ConstantPool pool_ = code_.getPool();
              code_.aload(l_enum);
              code_.invokeinterface(pool_.addInterfaceMethodRef("java/util/Enumeration", "nextElement", "()Ljava/lang/Object;"));
              code_.invokestatic(pool_.addMethodRef(context.TYPE_ANY, "create", "(Ljava/lang/Object;)Lanvil/core/Any;"));
            }
          })).compile(context, Node.GET);
        code.pop();
View Full Code Here

Examples of anvil.codec.Code.aload()

    String signature = inclass ?
      "(Lanvil/script/StackFrame;Lanvil/script/Function;Lanvil/core/Any;)V" :
      "(Lanvil/script/StackFrame;Lanvil/script/Function;)V";

    if (_context != null) {
      code.aload(_context.getFrameIndex());
    } else {
      code.aconst_null();
    }
    code.getstatic(pool.addFieldRef(_thunk.getParent().getTypeRef(pool), name, "Lanvil/script/Function;"));
    if (inclass) {
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.