Examples of addClass()


Examples of anvil.codec.ConstantPool.addClass()

    }
    Code code = getCode();
    ConstantPool pool = getPool();
    int javafield = pool.addFieldRef(TYPE_MODULE, "java$"+slot,
      "Lanvil/core/reflect/Reflection;");
    int contextclass = pool.addClass(TYPE_CONTEXT);
    code.getstatic(javafield);
    Source isnull = code.if_null();
    code.getstatic(javafield);
    Source notnull = code.go_to();
    isnull.bind();
View Full Code Here

Examples of anvil.codec.ConstantPool.addClass()

   
    /* switchtables */
    code = _m_switch.getCode();
    int n = _switches.size();
    if (_switches.size() > 0 ) {
      int hashlistclazz = pool.addClass("anvil/java/util/Hashlist");
      int hashlistctor = pool.addMethodRef(hashlistclazz, "<init>", "()V");
      int hashlistadd = pool.addMethodRef(hashlistclazz, "add",
        "(Ljava/lang/Object;Ljava/lang/Object;)Lanvil/java/util/Hashlist;");
      int intclazz = pool.addClass("java/lang/Integer");
      int intclazzctor = pool.addMethodRef(intclazz, "<init>", "(I)V");
View Full Code Here

Examples of anvil.codec.ConstantPool.addClass()

    if (_switches.size() > 0 ) {
      int hashlistclazz = pool.addClass("anvil/java/util/Hashlist");
      int hashlistctor = pool.addMethodRef(hashlistclazz, "<init>", "()V");
      int hashlistadd = pool.addMethodRef(hashlistclazz, "add",
        "(Ljava/lang/Object;Ljava/lang/Object;)Lanvil/java/util/Hashlist;");
      int intclazz = pool.addClass("java/lang/Integer");
      int intclazzctor = pool.addMethodRef(intclazz, "<init>", "(I)V");
      code.iconst(n);
      code.anewarray(hashlistclazz);
      for(int i=0; i<n; i++) {
        code.dup();
View Full Code Here

Examples of anvil.codec.ConstantPool.addClass()

    code.vreturn();

    /* methodindices */
    code = _m_symbols.getCode();
    if (_symbols.size() > 0) {
      int register = pool.addMethodRef(pool.addClass("anvil/core/Register"),
        "register", "(Ljava/lang/String;)I");
      BindingEnumeration e = _symbols.keysAndElements();
      while(e.hasMoreElements()) {
        int index = ((Integer)e.nextKey()).intValue();
        String name = (String)e.nextElement();
View Full Code Here

Examples of anvil.codec.ConstantPool.addClass()

        }
        break;

      case CompilableFunction.PARAMETER_ARRAY:
        {
          int arrayclazz = pool.addClass("anvil/core/Array");
          int appendmethod = pool.addMethodRef(arrayclazz, "append",
            "(Lanvil/core/Any;)Lanvil/core/Array;");
          code.anew(arrayclazz);
          code.dup();
          code.invokespecial(pool.addMethodRef(arrayclazz, "<init>", "()V"));
View Full Code Here

Examples of anvil.codec.ConstantPool.addClass()

      case CompilableFunction.PARAMETER_REST:
        if (c >= max) {
          code.getstatic(pool.addFieldRef(TYPE_ANY, "EMPTY_TUPLE",
            "Lanvil/core/AnyTuple;"));
        } else {
          int tupleclazz = pool.addClass("anvil/core/AnyTuple");
          int appendmethod = pool.addMethodRef(tupleclazz, "append",
            "(Lanvil/core/Any;)Lanvil/core/Array;");
          code.anew(tupleclazz);
          code.dup();
          code.iconst(max - c);
View Full Code Here

Examples of anvil.codec.ConstantPool.addClass()

        break;
      }
    }

    if (hasSplices) {
      int clazz = pool.addClass("anvil/script/ParameterList");
      int splicemethod = pool.addMethodRef(clazz, "splice",
        "(Lanvil/core/Any;)Lanvil/script/ParameterList;");
      int addmethod = pool.addMethodRef(clazz, "add",
        "(Lanvil/core/Any;)Lanvil/script/ParameterList;");
      code.anew(clazz);
View Full Code Here

Examples of anvil.codec.ConstantPool.addClass()

 
  public void compile(ByteCompiler context, int operation)
  {
    Code code = context.getCode();
    ConstantPool pool = code.getPool();
    int clazz = pool.addClass("anvil/core/AnyList");
    int n = childs();
    code.anew(clazz);
    code.dup();
    code.iconst(n);
    code.anewarray(context.TYPE_ANY);
View Full Code Here

Examples of anvil.codec.ConstantPool.addClass()

          }
        });
        code.pop();
      }

      int clazz1 = pool.addClass("java/util/Enumeration");
      int clazz2 = pool.addClass("anvil/java/util/BindingEnumeration");
      int clazz3 = pool.addClass("anvil/core/AnyBindingEnumeration");
      code.anew(clazz3);
      code.dup();
      _expression.compile(context, Expression.GET);
View Full Code Here

Examples of anvil.codec.ConstantPool.addClass()

        });
        code.pop();
      }

      int clazz1 = pool.addClass("java/util/Enumeration");
      int clazz2 = pool.addClass("anvil/java/util/BindingEnumeration");
      int clazz3 = pool.addClass("anvil/core/AnyBindingEnumeration");
      code.anew(clazz3);
      code.dup();
      _expression.compile(context, Expression.GET);
      code.invokevirtual(pool.addMethodRef(context.TYPE_ANY, "enumeration", "()Lanvil/java/util/BindingEnumeration;"));
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.