Package anvil.codec

Examples of anvil.codec.ConstantPool.addClass()


  public void compile(ByteCompiler context)
  {
    Code code = context.getCode();
    ConstantPool pool = code.getPool();
    int clazz = pool.addClass("anvil/script/ExitException");
    if (_expression != null) {
      if (_expression.needLineNumbers()) {
        context.location(_expression.getLocation());
      }
      code.anew(clazz);
View Full Code Here


  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;"));
View Full Code Here

    ClassRoom clazz = context.getClassRoom();
    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"));
View Full Code Here

 
  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;"));
View Full Code Here

      code.invokevirtual(code.getPool().addMethodRef(context.TYPE_STACKFRAME,
        "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);
View Full Code Here

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