Examples of anew()


Examples of anvil.codec.Code.anew()

  public void compile(ByteCompiler context, int operation)
  {
    Code code = context.getCode();
    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) {
View Full Code Here

Examples of anvil.codec.Code.anew()

  public void compile(ByteCompiler context, int operation)
  {
    Code code = context.getCode();
    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) {
View Full Code Here

Examples of anvil.codec.Code.anew()

        code.invokevirtual(code.getPool().addMethodRef("anvil/script/StackFrame", "getLocal", "(I)Lanvil/core/Any;"));
        break;

      case GET_REF:
        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;
View Full Code Here

Examples of anvil.codec.Code.anew()

      public void compile(ByteCompiler context, int operation)
      {
        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();
View Full Code Here

Examples of anvil.codec.Code.anew()

      case Type.STATIC_VARIABLE:
      case Type.MEMBER_VARIABLE:
        {
          code.dup();
          code.iconst(i++);
          code.anew(intclazz);
          code.dup();
          code.iconst(type.getType());
          code.invokespecial(intclazzctor);
          code.aastore();
View Full Code Here

Examples of anvil.codec.Code.anew()

      "(Lanvil/core/Any;Lanvil/script/Function;Lanvil/script/StackFrame;)V" :
      "(Lanvil/script/Function;Lanvil/script/StackFrame;)V";
    Code code = context.getCode();
    ConstantPool pool = code.getPool();
    int anyfunction = pool.addClass("anvil/core/runtime/AnyFunction");
    code.anew(anyfunction);
    code.dup();
    int parent = _function.getParent().getTypeRef(pool);
    int field = pool.addFieldRef(parent, name, "Lanvil/script/Function;");
    if (in_class) {
      code.self();
View Full Code Here

Examples of anvil.codec.Code.anew()

    int clazz = pool.addClass("anvil/script/ExitException");
    if (_expression != null) {
      if (_expression.needLineNumbers()) {
        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);
View Full Code Here

Examples of anvil.codec.Code.anew()

      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"));
    }
    code.athrow();
 
View Full Code Here

Examples of anvil.codec.Code.anew()

    ConstantPool pool = clazz.getPool();

    Method method = clazz.createMethod("getAllMembers", "()Lanvil/java/util/BindingEnumeration;", Code.ACC_PUBLIC);
    Code code = method.getCode();
    int cge = pool.addClass("anvil/script/ClassGraphEnumeration");
    code.anew(cge);
    code.dup();
    code.getstatic(pool.addFieldRef(clazz.getIndex(), "_class", "Lanvil/script/compiler/CompiledClassType;"));
    code.self();
    code.invokespecial(pool.addMethodRef(cge, "<init>", "(Lanvil/script/ClassType;Lanvil/core/AnyClass;)V"));
    code.areturn();
View Full Code Here

Examples of anvil.codec.Code.anew()

  public void compile(ByteCompiler context, int operation)
  {
    Code code = context.getCode();
    ConstantPool pool = code.getPool();
    int clazz = pool.addClass("anvil/core/runtime/AnyType");
    code.anew(clazz);
    code.dup();
    _child.compile(context, CHECK);
    code.invokevirtual(pool.addMethodRef(context.TYPE_ANY, "type",
      "()Lanvil/script/Type;"));
    code.invokespecial(pool.addMethodRef(clazz, "<init>",
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.