On 07/11/2012 10:24 PM, John Rose wrote:
> On Jul 11, 2012, at 2:29 AM, Rémi Forax wrote:
>
>> just a question, even if it's not a big deal if one is able to generate
>> bytecode,
>> why Hidden is not a top level type of java.lang.invoke ?
>
> Good question. The answer is that hiding of stack frames is limited to 
> hiding method handle implementation details. Specifically, the frames 
> that are to be hidden are those which are not specified by the JSR 292 
> modifications to the JVMS.
>
> For example, if you have z=filterReturnValue(::x,::y), and some method 
> m does z.invoke(), the visible stack frames will be m calling x and m 
> calling y. Internally there will be a continuation during the call to 
> x which waits to apply y. This must be some sort of activation frame, 
> but the JVMS requires it to be hidden. In JDK 7 it was a ricochet 
> frame (hand assembly code) and in JDK 8 it will be a lambda form 
> activation (bytecode). Both must be suppressed in backtraces.
>
> A general Lisp-machine-style convention for redacting back traces 
> would be interesting, but it would also require a new JSR.
>
> On the other hand, Hidden could be top-level. It's a matter of coding 
> taste. Binding it to LF makes it more clear that it has a specific use.

Emulating a language call using bytecode is something that should ring a 
bell for a lot of people of this list :)
And even for the JDK, it by example generates bytecode when optimizing a 
call to j.l.r.Method and this bytecode should
not appear in the stacktrace.

>
> — John

Rémi


_______________________________________________
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev

Reply via email to