Examples of addMethodref()


Examples of anvil.codec.ConstantPool.addMethodRef()

      if (hasSplices()) {
        code.getstatic(pool.addFieldRef(_class.getTypeRef(pool),
          "__class__", "Lanvil/script/compiler/NativeClass;"));
        code.aload_first();
        context.compileArgumentList(getChilds(0));
        code.invokevirtual(pool.addMethodRef(
          "anvil/script/compiler/NativeClass", "newInstance",
          "(Lanvil/script/Context;[Lanvil/core/Any;)Lanvil/core/Any;"));
         
       } else {
         context.compileCall(_constructor, getChilds(0));
View Full Code Here

Examples of anvil.codec.ConstantPool.addMethodRef()

    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.ConstantPool.addMethodRef()

    }
    code.vreturn();
   
    /* texts */
    code = _m_text.getCode();
    int getBytes = pool.addMethodRef("anvil/util/Conversions", "getBytes", "(Ljava/lang/String;)[B");
    if (_texts.size() > 0) {
      int size = _texts.size();
      code.iconst(size);
      code.anewarray("[[B", 1);
      Enumeration e = _texts.keys();
View Full Code Here

Examples of anvil.codec.ConstantPool.addMethodRef()

    /* switchtables */
    code = _m_switch.getCode();
    int n = _switches.size();
    if (_switches.size() > 0 ) {
      int hashlistclazz = pool.addClass("anvil/java/util/Hashlist");
      int hashlistctor = pool.addMethodRef(hashlistclazz, "<init>", "()V");
      int hashlistadd = pool.addMethodRef(hashlistclazz, "add",
        "(Ljava/lang/Object;Ljava/lang/Object;)Lanvil/java/util/Hashlist;");
      int intclazz = pool.addClass("java/lang/Integer");
      int intclazzctor = pool.addMethodRef(intclazz, "<init>", "(I)V");
      code.iconst(n);
View Full Code Here

Examples of anvil.codec.ConstantPool.addMethodRef()

    code = _m_switch.getCode();
    int n = _switches.size();
    if (_switches.size() > 0 ) {
      int hashlistclazz = pool.addClass("anvil/java/util/Hashlist");
      int hashlistctor = pool.addMethodRef(hashlistclazz, "<init>", "()V");
      int hashlistadd = pool.addMethodRef(hashlistclazz, "add",
        "(Ljava/lang/Object;Ljava/lang/Object;)Lanvil/java/util/Hashlist;");
      int intclazz = pool.addClass("java/lang/Integer");
      int intclazzctor = pool.addMethodRef(intclazz, "<init>", "(I)V");
      code.iconst(n);
      code.anewarray(hashlistclazz);
View Full Code Here

Examples of anvil.codec.ConstantPool.addMethodRef()

      int hashlistclazz = pool.addClass("anvil/java/util/Hashlist");
      int hashlistctor = pool.addMethodRef(hashlistclazz, "<init>", "()V");
      int hashlistadd = pool.addMethodRef(hashlistclazz, "add",
        "(Ljava/lang/Object;Ljava/lang/Object;)Lanvil/java/util/Hashlist;");
      int intclazz = pool.addClass("java/lang/Integer");
      int intclazzctor = pool.addMethodRef(intclazz, "<init>", "(I)V");
      code.iconst(n);
      code.anewarray(hashlistclazz);
      for(int i=0; i<n; i++) {
        code.dup();
        code.iconst(i);
View Full Code Here

Examples of anvil.codec.ConstantPool.addMethodRef()

    code.vreturn();

    /* methodindices */
    code = _m_symbols.getCode();
    if (_symbols.size() > 0) {
      int register = pool.addMethodRef(pool.addClass("anvil/core/Register"),
        "register", "(Ljava/lang/String;)I");
      BindingEnumeration e = _symbols.keysAndElements();
      while(e.hasMoreElements()) {
        int index = ((Integer)e.nextKey()).intValue();
        String name = (String)e.nextElement();
View Full Code Here

Examples of anvil.codec.ConstantPool.addMethodRef()

        break;

      case CompilableFunction.PARAMETER_OBJECT:
        if (c<max) {
          parameters[c++].compile(this, Node.GET);
          code.invokevirtual(pool.addMethodRef(TYPE_ANY,
            "toObject", "()Ljava/lang/Object;"));
        } else {
          if (defaultValue != null) {
            constant(defaultValue, true);
            code.invokevirtual(pool.addMethodRef(TYPE_ANY,
View Full Code Here

Examples of anvil.codec.ConstantPool.addMethodRef()

          code.invokevirtual(pool.addMethodRef(TYPE_ANY,
            "toObject", "()Ljava/lang/Object;"));
        } else {
          if (defaultValue != null) {
            constant(defaultValue, true);
            code.invokevirtual(pool.addMethodRef(TYPE_ANY,
              "toObject", "()Ljava/lang/Object;"));
          } else {
            code.aconst_null();
          }
        }
View Full Code Here

Examples of anvil.codec.ConstantPool.addMethodRef()

          Node node = parameters[c++];
          if (node.isConstant()) {
            code.iconst(node.eval().toInt());
          } else {
            node.compile(this, Node.GET);
            code.invokevirtual(pool.addMethodRef(TYPE_ANY,
              "toInt", "()I"));           
          }
        } else {
          if (defaultValue != null) {
            code.iconst(defaultValue.toInt());
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.