Package clojure.asm.commons

Examples of clojure.asm.commons.GeneratorAdapter.endMethod()


                                                    cv);
    ctorgen.visitCode();
    ctorgen.loadThis();
    ctorgen.invokeConstructor(Type.getObjectType(superName), voidctor);
    ctorgen.returnValue();
    ctorgen.endMethod();

    if(ret.altCtorDrops > 0)
      {
      Type[] ctorTypes = ret.ctorTypes();
      Type[] altCtorTypes = new Type[ctorTypes.length-ret.altCtorDrops];
View Full Code Here


      ctorgen.invokeConstructor(Type.getObjectType(COMPILE_STUB_PREFIX + "/" + ret.internalName),
                                new Method("<init>", Type.VOID_TYPE, ctorTypes));

      ctorgen.returnValue();
      ctorgen.endMethod();
      }
    //end of class
    cv.visitEnd();

    byte[] bytecode = cw.toByteArray();
View Full Code Here

                        null,
                        null,
                        cv);
      emitValue(hintedFields, gen);
      gen.returnValue();
      gen.endMethod();

      if (this.isDeftype() && this.fields.count() > this.hintedFields.count())
        {
        //create(IPersistentMap)
        String className = name.replace('.', '/');
View Full Code Here

        compile1(gen, objx, r);
        LINE_BEFORE.set(pushbackReader.getLineNumber());
      }
    //end of load
    gen.returnValue();
    gen.endMethod();

    //static fields for constants
    for(int i = 0; i < objx.constants.count(); i++)
      {
      cv.visitField(ACC_PUBLIC + ACC_FINAL + ACC_STATIC, objx.constantName(i), objx.constantType(i).getDescriptor(),
View Full Code Here

      finally
        {
        Var.popThreadBindings();
        }
      clinitgen.returnValue();
      clinitgen.endMethod();
      }

    //static init for constants, keywords and vars
    GeneratorAdapter clinitgen = new GeneratorAdapter(ACC_PUBLIC + ACC_STATIC,
                                                      Method.getMethod("void <clinit> ()"),
View Full Code Here

    clinitgen.mark(end);
    clinitgen.visitTryCatchBlock(startTry, endTry, finallyLabel, null);

    //end of static init
    clinitgen.returnValue();
    clinitgen.endMethod();

    //end of class
    cv.visitEnd();

    writeClassFile(objx.internalName, cw.toByteArray());
View Full Code Here

    ctorgen.visitLabel(end);

    ctorgen.returnValue();

    ctorgen.endMethod();

    if(altCtorDrops > 0)
      {
          //ctor that takes closed-overs and inits base + fields
      Type[] ctorTypes = ctorTypes();
View Full Code Here

        ctorgen.visitInsn(Opcodes.ACONST_NULL);

      ctorgen.invokeConstructor(objtype, new Method("<init>", Type.VOID_TYPE, ctorTypes));

      ctorgen.returnValue();
      ctorgen.endMethod();
      }

    if(supportsMeta())
      {
      //ctor that takes closed-overs but not meta
View Full Code Here

      ctorgen.visitInsn(Opcodes.ACONST_NULL)//null meta
      ctorgen.loadArgs();
      ctorgen.invokeConstructor(objtype, new Method("<init>", Type.VOID_TYPE, ctorTypes));

      ctorgen.returnValue();
      ctorgen.endMethod();

      //meta()
      Method meth = Method.getMethod("clojure.lang.IPersistentMap meta()");

      GeneratorAdapter gen = new GeneratorAdapter(ACC_PUBLIC,
View Full Code Here

      gen.visitCode();
      gen.loadThis();
      gen.getField(objtype,"__meta",IPERSISTENTMAP_TYPE);

      gen.returnValue();
      gen.endMethod();

      //withMeta()
      meth = Method.getMethod("clojure.lang.IObj withMeta(clojure.lang.IPersistentMap)");

      gen = new GeneratorAdapter(ACC_PUBLIC,
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.