Package anvil.codec

Examples of anvil.codec.Code.invokestatic()


   
    public void compile(ByteCompiler context, int operation)
    {
      Code code = context.getCode();
      code.aload(_local);
      code.invokestatic(code.getPool().addMethodRef(context.TYPE_ANY, "create",
        "(Ljava/lang/String;)Lanvil/core/Any;"));
    }
   
  } 
View Full Code Here


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

  public void compile(ByteCompiler context, int operation)
  {
    super.compile(context, GET);
    Code code = context.getCode();
    if (operation == GET_BOOLEAN) {
      code.invokestatic(code.getPool().addMethodRef(context.TYPE_ANY_OP,
        "ge", "(Lanvil/core/Any;Lanvil/core/Any;)Z"));
    } else {
      code.invokestatic(code.getPool().addMethodRef(context.TYPE_ANY_OP,
        "geA", "(Lanvil/core/Any;Lanvil/core/Any;)Lanvil/core/Any;"));
    }
View Full Code Here

    Code code = context.getCode();
    if (operation == GET_BOOLEAN) {
      code.invokestatic(code.getPool().addMethodRef(context.TYPE_ANY_OP,
        "ge", "(Lanvil/core/Any;Lanvil/core/Any;)Z"));
    } else {
      code.invokestatic(code.getPool().addMethodRef(context.TYPE_ANY_OP,
        "geA", "(Lanvil/core/Any;Lanvil/core/Any;)Lanvil/core/Any;"));
    }
  }

}
View Full Code Here

  public void compile(ByteCompiler context, int operation)
  {
    Code code = context.getCode();
    _child.compile(context, GET);
    code.invokestatic(code.getPool().addMethodRef(context.TYPE_COMPILED_SCRIPT,
      "enum", "(Lanvil/core/Any;)Lanvil/core/Any;"));
    if (operation == GET_BOOLEAN) {
      context.any2boolean();
    }
  }
View Full Code Here

      if (i==0) {
        getChild(i++).compile(context, GET);
      }
      getChild(i).compile(context, GET);
      code.dup_x1();
      code.invokestatic(testmethod);
      switch(_op[i-1]) {
      case LESS:
        code.if_ge(isfalse);
        break;       
      case LESS_OR_EQUAL:
View Full Code Here

      {
        AttributeNode attr = (AttributeNode)child;
        attr.getChild().compile(context, GET);
        code.astring(attr.getAttribute());
        code.aload_first();
        code.invokestatic(pool.addMethodRef(context.TYPE_CONTEXT, "postinc",
          "(Lanvil/core/Any;Ljava/lang/String;Lanvil/script/Context;)Lanvil/core/Any;"));
      }
      break;
   
    case Node.EXPR_REFERENCE:
View Full Code Here

      {
        ReferenceNode ref = (ReferenceNode)child;
        ref.getLeft().compile(context, GET);
        ref.getRight().compile(context, GET);
        code.aload_first();
        code.invokestatic(pool.addMethodRef(context.TYPE_CONTEXT, "postinc",
          "(Lanvil/core/Any;Lanvil/core/Any;Lanvil/script/Context;)Lanvil/core/Any;"));
      }
      break;

    default:
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.