Package clojure.asm.commons

Examples of clojure.asm.commons.Method


    //gen.visitMaxs(1, 1);
    gen.endMethod();

  }
  public void doEmit(ObjExpr fn, ClassVisitor cv){
    Method m = new Method(getMethodName(), getReturnType(), getArgTypes());

    GeneratorAdapter gen = new GeneratorAdapter(ACC_PUBLIC,
                                                m,
                                                null,
                                                //todo don't hardwire this
View Full Code Here


  abstract String getMethodName();
  abstract Type getReturnType();
  abstract Type[] getArgTypes();

  public void emit(ObjExpr fn, ClassVisitor cv){
    Method m = new Method(getMethodName(), getReturnType(), getArgTypes());

    GeneratorAdapter gen = new GeneratorAdapter(ACC_PUBLIC,
                                                m,
                                                null,
                                                //todo don't hardwire this
View Full Code Here

      if(context == C.RETURN)
        {
        ObjMethod method = (ObjMethod) METHOD.deref();
        method.emitClearLocals(gen);
        }
      gen.invokeConstructor(type, new Method("<init>", Type.getConstructorDescriptor(ctor)));
      }
    else
      {
      gen.push(destubClassName(c.getName()));
      gen.invokeStatic(CLASS_TYPE, forNameMethod);
View Full Code Here

      }
    return ret;
  }

  public void emit(ObjExpr obj, ClassVisitor cv){
    Method m = new Method(getMethodName(), getReturnType(), getArgTypes());

    Type[] extypes = null;
    if(exclasses.length > 0)
      {
      extypes = new Type[exclasses.length];
View Full Code Here

  public boolean canEmitPrimitive(){
    return retClass.isPrimitive();
  }

  public void emitUnboxed(C context, ObjExpr objx, GeneratorAdapter gen){
    Method ms = new Method("invokeStatic", getReturnType(), paramtypes);
    if(variadic)
      {
      for(int i = 0; i < paramclasses.length - 1; i++)
        {
        Expr e = (Expr) args.nth(i);
View Full Code Here

      if(context == C.RETURN)
        {
        ObjMethod method = (ObjMethod) METHOD.deref();
        method.emitClearLocals(gen);
        }
      Method m = new Method(onMethod.getName(), Type.getReturnType(onMethod), Type.getArgumentTypes(onMethod));
      gen.invokeInterface(Type.getType(protocolOn), m);
      HostExpr.emitBoxReturn(objx, gen, onMethod.getReturnType());
      }
    gen.mark(endLabel);
  }
View Full Code Here

      {
      ObjMethod method = (ObjMethod) METHOD.deref();
      method.emitClearLocals(gen);
      }

    gen.invokeInterface(IFN_TYPE, new Method("invoke", OBJECT_TYPE, ARG_TYPES[Math.min(MAX_POSITIONAL_ARITY + 1,
                                                                                       args.count())]));
  }
View Full Code Here

        gen.checkCast(CHAR_TYPE);
        gen.invokeVirtual(CHAR_TYPE, charValueMethod);
        }
      else
        {
        Method m = null;
        gen.checkCast(NUMBER_TYPE);
        if(RT.booleanCast(RT.UNCHECKED_MATH.deref()))
          {
          if(paramType == int.class)
            m = Method.getMethod("int uncheckedIntCast(Object)");
View Full Code Here

      if(context == C.RETURN)
        {
        ObjMethod method = (ObjMethod) METHOD.deref();
        method.emitClearLocals(gen);
        }
      Method m = new Method(methodName, Type.getReturnType(method), Type.getArgumentTypes(method));
      if(method.getDeclaringClass().isInterface())
        gen.invokeInterface(type, m);
      else
        gen.invokeVirtual(type, m);
      }
View Full Code Here

      if(context == C.RETURN)
        {
        ObjMethod method = (ObjMethod) METHOD.deref();
        method.emitClearLocals(gen);
        }
      Method m = new Method(methodName, Type.getReturnType(method), Type.getArgumentTypes(method));
      if(method.getDeclaringClass().isInterface())
        gen.invokeInterface(type, m);
      else
        gen.invokeVirtual(type, m);
      //if(context != C.STATEMENT || method.getReturnType() == Void.TYPE)
View Full Code Here

TOP

Related Classes of clojure.asm.commons.Method

Copyright © 2018 www.massapicom. 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.