(C context, ObjExpr objx, GeneratorAdapter gen)
| 4028 | } |
| 4029 | |
| 4030 | public void emitUnboxed(C context, ObjExpr objx, GeneratorAdapter gen){ |
| 4031 | Method ms = new Method("invokeStatic", getReturnType(), paramtypes); |
| 4032 | if(variadic) |
| 4033 | { |
| 4034 | for(int i = 0; i < paramclasses.length - 1; i++) |
| 4035 | { |
| 4036 | Expr e = (Expr) args.nth(i); |
| 4037 | if(maybePrimitiveType(e) == paramclasses[i]) |
| 4038 | { |
| 4039 | ((MaybePrimitiveExpr) e).emitUnboxed(C.EXPRESSION, objx, gen); |
| 4040 | } |
| 4041 | else |
| 4042 | { |
| 4043 | e.emit(C.EXPRESSION, objx, gen); |
| 4044 | HostExpr.emitUnboxArg(objx, gen, paramclasses[i]); |
| 4045 | } |
| 4046 | } |
| 4047 | IPersistentVector restArgs = RT.subvec(args,paramclasses.length - 1,args.count()); |
| 4048 | MethodExpr.emitArgsAsArray(restArgs,objx,gen); |
| 4049 | gen.invokeStatic(Type.getType(ArraySeq.class), Method.getMethod("clojure.lang.ArraySeq create(Object[])")); |
| 4050 | } |
| 4051 | else |
| 4052 | MethodExpr.emitTypedArgs(objx, gen, paramclasses, args); |
| 4053 | |
| 4054 | if(tailPosition && !objx.canBeDirect) |
| 4055 | { |
| 4056 | ObjMethod method = (ObjMethod) METHOD.deref(); |
| 4057 | method.emitClearThis(gen); |
| 4058 | } |
| 4059 | |
| 4060 | gen.invokeStatic(target, ms); |
| 4061 | } |
| 4062 | |
| 4063 | private Type getReturnType(){ |
| 4064 | return Type.getType(retClass); |
no test coverage detected