Examples of invokespecial()


Examples of anvil.codec.Code.invokespecial()

    if (base != null) {
      Code code = context.getCode();
      CompilableFunction ctor = base.getConstructor();
      code.self();
      context.compileArgumentList(ctor, getChilds(0));
      code.invokespecial(ctor.getTypeRef(code.getPool()));
    }
  }

}
View Full Code Here

Examples of anvil.codec.Code.invokespecial()

    int clazz = pool.addClass("java/lang/StringBuffer");
    int appendmethod = pool.addMethodRef(clazz, "append",
      "(Ljava/lang/Object;)Ljava/lang/StringBuffer;");
    code.anew(clazz);
    code.dup();
    code.invokespecial(pool.addMethodRef(clazz, "<init>", "()V"));
    int n = childs();
    for(int i=0; i<n; i++) {
      getChild(i).compile(context, GET);
      code.invokevirtual(appendmethod);
    }
View Full Code Here

Examples of anvil.codec.Code.invokespecial()

    ConstantPool pool = code.getPool();
    int clazz = pool.addClass("anvil/core/AnyMap");
    code.anew(clazz);
    code.dup();
    super.compile(context, GET);
    code.invokespecial(pool.addMethodRef(clazz, "<init>",
      "(Lanvil/core/Any;Lanvil/core/Any;)V"));
    if (operation == GET_BOOLEAN) {
      context.any2boolean();
    }
  }
View Full Code Here

Examples of anvil.codec.Code.invokespecial()

    ConstantPool pool = code.getPool();
    int clazz = pool.addClass("anvil/core/AnyRange");
    code.anew(clazz);
    code.dup();
    super.compile(context, GET);
    code.invokespecial(pool.addMethodRef(clazz, "<init>",
      "(Lanvil/core/Any;Lanvil/core/Any;)V"));
    if (operation == GET_BOOLEAN) {
      context.any2boolean();
    }
  }
View Full Code Here

Examples of anvil.codec.Code.invokespecial()

        int refclass = pool.addClass("anvil/core/AnyLocalRef");
        code.anew(refclass);
        code.dup();
        code.aload(_local.getFrameIndex());
        code.iconst(_local.getSlot());
        code.invokespecial(pool.addMethodRef(refclass, "<init>", "(Lanvil/script/StackFrame;I)V"));
        break;

      case GET_BOOLEAN:
        code.aload(_local.getFrameIndex());
        code.iconst(_local.getSlot());
View Full Code Here

Examples of anvil.codec.Code.invokespecial()

        Code code_ = context.getCode();
        ConstantPool pool = code_.getPool();
        int clazz = getClassReference(pool);
        code_.anew(clazz);
        code_.dup();
        code_.invokespecial(pool.addMethodRef(clazz, "<init>", "()V"));
      }     
    });
    code.pop();
    _stmt.compile(context);
    _var.compile(context, GET);
View Full Code Here

Examples of anvil.codec.Code.invokespecial()

          code.dup();
          code.iconst(i++);
          code.anew(intclazz);
          code.dup();
          code.iconst(type.getType());
          code.invokespecial(intclazzctor);
          code.aastore();

          code.dup();
          code.iconst(i++);
          code.astring(type.getName());
View Full Code Here

Examples of anvil.codec.Code.invokespecial()

      code.aload(l_context);
      code.aload(l_attr);
      if (hasValue) {
        code.aload(l_value);
      }
      code.invokespecial(pool.addMethodRef(clazz.getSuperClassIndex(),
        method.getName(), method.getDescriptor()));
      if (castToBoolean) {
        code.ireturn();
      } else {
        code.areturn();
View Full Code Here

Examples of anvil.codec.Code.invokespecial()

    if (depth >= 0) {
      code.iconst(depth+1);
      code.invokevirtual(pool.addMethodRef("anvil/script/StackFrame", "getEscape",
        "(I)Lanvil/script/StackFrame;"));
    }
    code.invokespecial(pool.addMethodRef(anyfunction, "<init>", signature));
    if (operation == GET_BOOLEAN) {
      context.any2boolean();
    }
  }
View Full Code Here

Examples of anvil.codec.Code.invokespecial()

        context.location(_expression.getLocation());
      }
      code.anew(clazz);
      code.dup();
      _expression.compile(context, Expression.GET);
      code.invokespecial(pool.addMethodRef(clazz, "<init>", "(Lanvil/core/Any;)V"));
    } else {
      code.anew(clazz);
      code.dup();
      code.invokespecial(pool.addMethodRef(clazz, "<init>", "()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.