Package anvil.codec

Examples of anvil.codec.Code.invokeinterface()


        context.accessInstance(_context, clazz_parents[i]);
      }
      code.invokespecial(_class.getConstructorReference(pool));
      if (has_splices) {
        context.compileArgumentList(getChilds(0));
        code.invokeinterface(pool.addInterfaceMethodRef("anvil/script/Function", "execute",
          "(Lanvil/script/Context;Lanvil/core/Any;[Lanvil/core/Any;)Lanvil/core/Any;"));
      } else {
        context.compileArgumentList(_constructor, getChilds(0));
        code.invokevirtual(_constructor.getTypeRef(pool));
      }
View Full Code Here


            public void compile(ByteCompiler context, int operation)
            {
              Code code_ = context.getCode();
              ConstantPool pool_ = code_.getPool();
              _enumvar.compile(context, Node.GET);
              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

            public void compile(ByteCompiler context, int operation)
            {
              Code code_ = context.getCode();
              ConstantPool pool_ = code_.getPool();
              _enumvar.compile(context, Node.GET);
              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

            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

      if (hasSplices()) {
        code.getstatic(pool.addFieldRef(context.TYPE_MODULE,
          "f_"+_function.getName(), "Lanvil/script/Function;"));
        code.aload_first();
        context.compileArgumentList(getChilds(0));
        code.invokeinterface(pool.addInterfaceMethodRef(
          context.TYPE_FUNCTION, "execute",
          "(Lanvil/script/Context;[Lanvil/core/Any;)Lanvil/core/Any;"));
         
      } else {
        context.compileCall(_function, getChilds(0));
View Full Code Here

            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

      context.pushCode(code);
      code.getstatic(pool.addFieldRef(clazz.getIndex(), "m_"+function.getName(), "Lanvil/script/Function;"));
      code.aload(l_context);
      code.self();
      code.aload(l_parameters);
      code.invokeinterface(pool.addInterfaceMethodRef("anvil/script/Function",
        "execute", "(Lanvil/script/Context;Lanvil/core/Any;[Lanvil/core/Any;)Lanvil/core/Any;"));
      code.areturn();
      context.popCode();
    }
View Full Code Here

      code.aastore();
      code.getstatic(pool.addFieldRef(clazz.getIndex(), "m_"+function.getName(), "Lanvil/script/Function;"));
      code.aload(l_context);
      code.self();
      code.aload(l_newparameters);
      code.invokeinterface(pool.addInterfaceMethodRef("anvil/script/Function",
        "execute", "(Lanvil/script/Context;Lanvil/core/Any;[Lanvil/core/Any;)Lanvil/core/Any;"));
      code.areturn();
      context.popCode();
    }
   
View Full Code Here

        code.iconst(i+1);
        code.aload(l_base + i);
        code.aastore();
      }

      code.invokeinterface(pool.addInterfaceMethodRef("anvil/script/Function",
        "execute", "(Lanvil/script/Context;Lanvil/core/Any;[Lanvil/core/Any;)Lanvil/core/Any;"));
      code.areturn();

      context.popCode();
    }
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.