Package anvil.codec

Examples of anvil.codec.Code.invokestatic()


  public void compile(ByteCompiler context, int operation)
  {
    Code code = context.getCode();
    code.aload_first();
    super.compile(context, GET);
    code.invokestatic(code.getPool().addMethodRef(context.TYPE_CONTEXT,
      "nomatch", "(Lanvil/script/Context;Lanvil/core/Any;Lanvil/core/Any;)Z"));
    if (operation != GET_BOOLEAN) {
      context.boolean2any();
    }
  }
View Full Code Here


            {
              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

            {
              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();

      } else
View Full Code Here

            public void compile(ByteCompiler context, int operation)
            {
              Code code_ = context.getCode();
              code_.iload(l_index);
              code_.iinc(l_index, 1);
              code_.invokestatic(code_.getPool().addMethodRef(
                context.TYPE_ANY, "create", "(I)Lanvil/core/Any;"));
            }
          })).compile(context, Node.GET);
        code.pop();
      }
View Full Code Here

            {
              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

            {
              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();

      } else
View Full Code Here

    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 {
      code.invokestatic(method_ref);
    }
    code.areturn();

    ByteArrayOutputStream bytestream = new ByteArrayOutputStream();
    clazz.write(new DataOutputStream(bytestream));
View Full Code Here

      Source toend = code.go_to();
      isfalse.bind();
      code.iconst(false);
      toend.bind();
    } else {
      code.invokestatic(code.getPool().addMethodRef(context.TYPE_ANY,
        "create", "(I)Lanvil/core/Any;"));
    }
  }

}
View Full Code Here

  {
    _child.compile(context, CHECK);
    Code code = context.getCode();
    code.invokevirtual(code.getPool().addMethodRef(context.TYPE_ANY,
      "classNameOf", "()Ljava/lang/String;"));
    code.invokestatic(code.getPool().addMethodRef(context.TYPE_ANY,
      "create", "(Ljava/lang/String;)Lanvil/core/Any;"));
    if (operation == GET_BOOLEAN) {
      context.any2boolean();
    }
  }
View Full Code Here

    Method _m_symbols = clazz.createMethod("_symbols", "()V", ACC_PUBLIC|ACC_STATIC);
    //Method _m_imports = clazz.createMethod("_imports", "()V", ACC_PUBLIC|ACC_STATIC);
   
    code = clazz.getStatic().getCode();
    //code.println("MODULE-START:"+classsig);
    code.invokestatic(_m_const.getIndex());
    code.invokestatic(_m_text.getIndex());
    code.invokestatic(_m_switch.getIndex());
    code.invokestatic(_m_symbols.getIndex());
    ((anvil.script.statements.ModuleStatement)getModule()).compile(this);
    //code.println("MODULE-END:"+classsig);
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.