(C context, ObjExpr objx, GeneratorAdapter gen)
| 2309 | } |
| 2310 | |
| 2311 | public void emit(C context, ObjExpr objx, GeneratorAdapter gen){ |
| 2312 | if(method != null) |
| 2313 | { |
| 2314 | MethodExpr.emitTypedArgs(objx, gen, method.getParameterTypes(), args); |
| 2315 | gen.visitLineNumber(line, gen.mark()); |
| 2316 | //Type type = Type.getObjectType(className.replace('.', '/')); |
| 2317 | if(tailPosition && !objx.canBeDirect) |
| 2318 | { |
| 2319 | ObjMethod method = (ObjMethod) METHOD.deref(); |
| 2320 | method.emitClearThis(gen); |
| 2321 | } |
| 2322 | Type type = Type.getType(c); |
| 2323 | Method m = new Method(methodName, Type.getReturnType(method), Type.getArgumentTypes(method)); |
| 2324 | gen.visitMethodInsn(INVOKESTATIC, type.getInternalName(), methodName, m.getDescriptor(), c.isInterface()); |
| 2325 | //if(context != C.STATEMENT || method.getReturnType() == Void.TYPE) |
| 2326 | Class retClass = method.getReturnType(); |
| 2327 | if(context == C.STATEMENT) |
| 2328 | { |
| 2329 | if(retClass == long.class || retClass == double.class) |
| 2330 | gen.pop2(); |
| 2331 | else if(retClass != void.class) |
| 2332 | gen.pop(); |
| 2333 | } |
| 2334 | else |
| 2335 | { |
| 2336 | HostExpr.emitBoxReturn(objx, gen, method.getReturnType()); |
| 2337 | } |
| 2338 | } |
| 2339 | else |
| 2340 | { |
| 2341 | gen.visitLineNumber(line, gen.mark()); |
| 2342 | gen.push(c.getName()); |
| 2343 | gen.invokeStatic(RT_TYPE, forNameMethod); |
| 2344 | gen.push(methodName); |
| 2345 | emitArgsAsArray(args, objx, gen); |
| 2346 | gen.visitLineNumber(line, gen.mark()); |
| 2347 | if(context == C.RETURN) |
| 2348 | { |
| 2349 | ObjMethod method = (ObjMethod) METHOD.deref(); |
| 2350 | method.emitClearLocals(gen); |
| 2351 | } |
| 2352 | gen.invokeStatic(REFLECTOR_TYPE, invokeStaticMethodMethod); |
| 2353 | if(context == C.STATEMENT) |
| 2354 | gen.pop(); |
| 2355 | } |
| 2356 | } |
| 2357 | |
| 2358 | public boolean hasJavaClass(){ |
| 2359 | return method != null || tag != null; |
nothing calls this directly
no test coverage detected