use of org.robovm.compiler.MarshalerLookup.PointerMarshalerMethod in project robovm by robovm.
the class BridgeMethodCompiler method updateObject.
private void updateObject(SootMethod method, Function fn, Value env, long flags, List<MarshaledArg> marshaledArgs) {
for (MarshaledArg value : marshaledArgs) {
MarshalerMethod marshalerMethod = config.getMarshalerLookup().findMarshalerMethod(new MarshalSite(method, value.paramIndex));
SootMethod afterMethod = ((PointerMarshalerMethod) marshalerMethod).getAfterBridgeCallMethod();
if (afterMethod != null) {
Invokestatic invokestatic = new Invokestatic(getInternalName(method.getDeclaringClass()), getInternalName(afterMethod.getDeclaringClass()), afterMethod.getName(), getDescriptor(afterMethod));
trampolines.add(invokestatic);
call(fn, invokestatic.getFunctionRef(), env, value.object, value.handle, new IntegerConstant(flags));
}
}
}
use of org.robovm.compiler.MarshalerLookup.PointerMarshalerMethod in project robovm by robovm.
the class CallbackMethodCompiler method updateNative.
private void updateNative(SootMethod method, Function fn, Value env, long flags, List<MarshaledArg> marshaledArgs) {
for (MarshaledArg value : marshaledArgs) {
MarshalerMethod marshalerMethod = config.getMarshalerLookup().findMarshalerMethod(new MarshalSite(method, value.paramIndex));
SootMethod afterMethod = ((PointerMarshalerMethod) marshalerMethod).getAfterCallbackCallMethod();
if (afterMethod != null) {
Invokestatic invokestatic = new Invokestatic(getInternalName(method.getDeclaringClass()), getInternalName(afterMethod.getDeclaringClass()), afterMethod.getName(), getDescriptor(afterMethod));
trampolines.add(invokestatic);
call(fn, invokestatic.getFunctionRef(), env, value.handle, value.object, new IntegerConstant(flags));
}
}
}
Aggregations