Hello,
sorry for the late answer.
If you use an invoker like the MethodHandles.exactInvoker() instead of using directly invokeExact() you will not have any stackframes from your vmPlugin.
The idea is that is to have a code like that
public static CallSite bsm(Lookup lookup, String name, MethodType type) {
return new InliningCache(type);
}
private static class InliningCache extends MutableCallSite {
private static final MethodHandle SLOW_PATH;
static {
var lookup = MethodHandles.lookup();
try {
SLOW_PATH = lookup.findVirtual(InliningCache.class, "slowPath", methodType(MethodHandle.class, Object.class));
} catch (NoSuchMethodException | IllegalAccessException e) {
throw new AssertionError(e);
}
}
public InliningCache(MethodType type) {
super(type);
setTarget(MethodHandles.foldArguments(MethodHandles.exactInvoker(type), SLOW_PATH.bindTo(this)));
}
private MethodHandle slowPath(Object Object receiver) {
...
}
}
so your slowpath return a method handle that is call by the exactInvoker, so the method slowPath is not on the stack.
regards,
Rémi
> --
> You received this message because you are subscribed to the Google Groups "JVM
> Languages" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to
jvm-language...@googlegroups.com.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/jvm-languages/b94a0432-c072-46a8-9a66-56b255f43bbc%40gmx.org.