Re: method handle cracking API

2013-05-15 Thread John Rose
Here is an update on the method handle cracking API. Though we will probably make some small adjustments, it appears to be converging. http://cr.openjdk.java.net/~jrose/8008688/specdiff.02/ http://cr.openjdk.java.net/~jrose/8008688/javadoc.02/ Key points: - interface MethodHandleInfo (MHI

Re: method handle cracking API

2013-05-15 Thread Peter Levart
sensitive tokens like MH objects, then perhaps MHI.asMember should not wrap the call to InfoFromMemberName.reflectMember() in a PrivilegedAction... Regards, Peter On 05/15/2013 07:58 AM, John Rose wrote: Here is an update on the method handle cracking API. Though we will probably make some

Re: method handle cracking API

2013-05-15 Thread John Rose
Thanks for looking at that, Peter. You are right. The asMember call needs more checks and less trust. -- John (on my iPhone) On May 15, 2013, at 2:39 AM, Peter Levart peter.lev...@gmail.com wrote: f MHI objects are not considered security sensitive tokens like MH objects, then perhaps

Re: method handle cracking API

2013-05-15 Thread Mark Roos
Just for my learning, what is the use model for this form of method handle inspection? Is there some cool technique that this facilitates? regards mark___ mlvm-dev mailing list mlvm-dev@openjdk.java.net

Re: method handle cracking API

2013-05-15 Thread Remi Forax
On 05/15/2013 07:27 PM, Mark Roos wrote: Just for my learning, what is the use model for this form of method handle inspection? Is there some cool technique that this facilitates? yes, if you crack a method handle, you get the reference to a method (the constructor etc.) so you can by

Re: method handle cracking API

2013-05-15 Thread John Rose
On May 15, 2013, at 10:27 AM, Mark Roos mr...@roos.com wrote: Just for my learning, what is the use model for this form of method handle inspection? What Remi said... Is there some cool technique that this facilitates? Yes. A bootstrap method receives 3 required arguments, a Lookup,

Re: method handle cracking API

2013-05-02 Thread John Rose
On Apr 24, 2013, at 12:02 AM, John Rose john.r.r...@oracle.com wrote: Those of you who have been following 292 details may have noticed the type java.lang.invoke.MethodHandleInfo show up in support of Project Lambda. The 292 EG has been thinking about the problem of method handle

Re: method handle cracking API

2013-04-25 Thread Mark Roos
From John Simple example: Suppose you have a tree of GWTs that a clever implementation compiles into a big hunk of bytecode Actually that would be my dream, that hotspot is clever and I can just let it do the work. Is it? mark___

Re: method handle cracking API

2013-04-25 Thread MacGregor, Duncan (GE Energy Management)
I would have thought one of the most common uses of breaking down a method handle like this would be to immediately turn it into a java.lang.reflect object and maybe examine annotations or exception information. So although I don't think it should extend Member I do think it should have a standard

Re: method handle cracking API

2013-04-25 Thread Christian Thalinger
On Apr 25, 2013, at 8:58 AM, MacGregor, Duncan (GE Energy Management) duncan.macgre...@ge.com wrote: I would have thought one of the most common uses of breaking down a method handle like this would be to immediately turn it into a java.lang.reflect object and maybe examine annotations or

Re: method handle cracking API

2013-04-25 Thread John Rose
On Apr 25, 2013, at 9:42 AM, Christian Thalinger christian.thalin...@oracle.com wrote: John and I referred to this method yesterday as: Lookup.ununreflect() Or perhaps Lookup.rereflect() or Lookup.visitHallOfMirrors(). — John___ mlvm-dev mailing

Re: method handle cracking API

2013-04-25 Thread Mark Roos
Duncan suggested: return the parts that remain (both method handles and bound objects) as I would guess that would be enough for debugging purposes and resource leak hunting. I think that if I could just get a collection of the bound objects in the chain that would be enough to do what I want

Re: method handle cracking API

2013-04-25 Thread Remi Forax
On 04/25/2013 08:39 PM, John Rose wrote: On Apr 25, 2013, at 8:58 AM, MacGregor, Duncan (GE Energy Management) duncan.macgre...@ge.com mailto:duncan.macgre...@ge.com wrote: I would have thought one of the most common uses of breaking down a method handle like this would be to immediately

Re: method handle cracking API

2013-04-25 Thread Remi Forax
On 04/25/2013 05:18 AM, John Rose wrote: On Apr 24, 2013, at 7:45 PM, Mark Roos mr...@roos.com mailto:mr...@roos.com wrote: Any chance that one could walk the GWT chain from a call site in order to build a different look up structure or maybe even some specialized code? Currently I keep

Re: method handle cracking API

2013-04-24 Thread Mark Roos
Hi John, Looks like its intended to get some better information for the stack traces? Any chance that one could walk the GWT chain from a call site in order to build a different look up structure or maybe even some specialized code? Currently I keep this in the call site but it seems

Re: method handle cracking API

2013-04-24 Thread John Rose
On Apr 24, 2013, at 7:45 PM, Mark Roos mr...@roos.com wrote: Any chance that one could walk the GWT chain from a call site in order to build a different look up structure or maybe even some specialized code? Currently I keep this in the call site but it seems redundant. Sorry, not in