Package anvil.codec

Examples of anvil.codec.Code.anew()


  public void compile(ByteCompiler context, int operation)
  {
    Code code = context.getCode();
    ConstantPool pool = code.getPool();
    int anyfunctionclazz = pool.addClass("anvil/core/runtime/AnyFunction");
    code.anew(anyfunctionclazz);
    code.dup();
    _child.compile(context, operation);
    code.getstatic(pool.addFieldRef(_method.getParent().getTypeRef(pool),
      "m_"+_method.getName()"Lanvil/script/Function;"));
    code.invokespecial(pool.addMethodRef(anyfunctionclazz, "<init>", "(Lanvil/core/Any;Lanvil/script/Function;)V"));
View Full Code Here


    Code code = context.getCode();
    ConstantPool pool = code.getPool();
    int clazz = pool.addClass("anvil/core/AnyTuple");
    int n = childs();
    if (n > 0) {
      code.anew(clazz);
      code.dup();
      code.iconst(n);
      code.anewarray(context.TYPE_ANY);
      for(int i=0; i<n; i++) {
        code.dup();
View Full Code Here

        "getLocal", "(II)Lanvil/core/Any;"));
      break;

    case GET_REF:
      int refclass = pool.addClass("anvil/core/AnyEscapedLocalRef");
      code.anew(refclass);
      code.dup();
      code.aload(_context.getFrameIndex());
      code.iconst(_depth);
      code.iconst(_index);
      code.invokespecial(pool.addMethodRef(refclass, "<init>", "(Lanvil/script/StackFrame;II)V"));
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.