Re: JVMLS indy support group provisional agenda
Thanks, to those who were present, for a very lively conversation! Here are the slides as presented today: http://cr.openjdk.java.net/~jrose/pres/201608-IndySupportGroup.pdf I would like to add notes to the end of the deck, to summarize what we actually discussed. I could use some help with that. So, please, send your recollections to help reconstruct our very interesting discussion. Very rough notes are fine; so are one-liners; send 1-1 or reply on-list at your option. — John ___ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
Re: JVMLS indy support group provisional agenda
On 01.08.2016 08:37, Vladimir Ivanov wrote: And let's not forget: - coroutine - tail call How do they relate to "Indy Support Group" (as recorded in JVMLS agenda)? :-) both of them most likely will need a special kind of method call. And both could be implemented using a trampoline like base For example if you had the ability to make a call and jump put of the current stack frame at the same time you could implement tail calls to some extend. A simple implementation I used in the past requires a method that calls a tailcall enabled method to use a special call instruction... something like this: callcc foo(0) def foo(i) { returncc bar(i+1) } def bar(j) { returncc foo(j+1) } returncc records the method call, but returns to callcc, which does the actual execution of the call. Now imagine callcc and returncc being invokedynamic functions, where returncc can return to the frame of callcc and the callcc handle executes the handle produced by returncc. My implementation I tried out in the past was actually using a special return type and a loop in the implementation of callcc, which I found questionable performance wise and too intrusive type-wise. An idea for a coroutine would be to again have a similar "exit frame with state", but this time instead of directly using that in the caller code, to save the state in an object and to use that to get back and continue with later on. The coroutine itself would have to be unrolled to some extend, to allow jumping to a certain position in the bytecode by restoring state from the coroutine object. Of course having your own substack would be even better, but well... But I guess such techniques are nothing new to anyone reading here ;) Anyway... invokedynamic could help hiding implementation details here a lot, and the ability to exit the current stack frame with user defined state beyond a simple return would be really really interesting for those implementations. bye Jochen ___ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
Re: JVMLS indy support group provisional agenda
And let's not forget: - coroutine - tail call How do they relate to "Indy Support Group" (as recorded in JVMLS agenda)? :-) - a lightweight way to create a method/method handle from an array of bytes (codes) and an array of objects (constants as in constant pool). Good point! Best regards, Vladimir Ivanov On July 31, 2016 10:34:51 PM PDT, Vladimir Ivanov wrote: Thanks a lot for preparing the agenda, John! I'd like to nominate a topic into API section: enable super constructor lookups in j.l.i. FTR it was discussed on the list before [1]. Also, Charlie Nutter asked (at JFokus 2015?) for lightweight safepointing solution, but there was no progress on it yet. Maybe it's worth to reiterate the discussion as well? Best regards, Vladimir Ivanov [1] http://mail.openjdk.java.net/pipermail/mlvm-dev/2015-February/006292.html On 7/31/16 10:13 PM, John Rose wrote: Tomorrow at the JVMLS we will have an hour-long workshop to discuss indy and MHs. I plan to run this as a Q/A and (if we are in good form) abrain-storming session. Here are the discussion topics that pop quickly to the top of my list. Any more suggestions? — John Provisional Agenda: API §API changes in java.lang.invoke for Java 9 –VarHandles ({find{Static},unreflect}VarHandle) –Loop combinators, tryFinally, various incremental conveniences –Module-aware Lookups, access-checked Class lookups §What are the use cases for unsafe Lookups? §What about polymorphic inline caches? Provisional Agenda: Performance §Performance changes –MH caching, MH customization, profile injection –Indified string concatenation §Native method handles §Low level performance stuff –@Stable, @{Dont,Force}Inline, @PolymorphicSignature §Who wants to nominate their polymorphic inline cache? mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev -- Sent from my Android device with K-9 Mail. Please excuse my brevity. ___ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
Re: JVMLS indy support group provisional agenda
And let's not forget: - coroutine - tail call - a lightweight way to create a method/method handle from an array of bytes (codes) and an array of objects (constants as in constant pool). Remi On July 31, 2016 10:34:51 PM PDT, Vladimir Ivanov wrote: >Thanks a lot for preparing the agenda, John! > >I'd like to nominate a topic into API section: enable super constructor > >lookups in j.l.i. > >FTR it was discussed on the list before [1]. > >Also, Charlie Nutter asked (at JFokus 2015?) for lightweight >safepointing solution, but there was no progress on it yet. Maybe it's >worth to reiterate the discussion as well? > >Best regards, >Vladimir Ivanov > >[1] >http://mail.openjdk.java.net/pipermail/mlvm-dev/2015-February/006292.html > > >On 7/31/16 10:13 PM, John Rose wrote: >> Tomorrow at the JVMLS we will have an hour-long workshop to discuss >indy >> and MHs. >> I plan to run this as a Q/A and (if we are in good form) a >> brain-storming session. >> Here are the discussion topics that pop quickly to the top of my >list. >> Any more suggestions? >> — John >> >> Provisional Agenda: API >> §API changes in java.lang.invoke for Java 9 >> –VarHandles ({find{Static},unreflect}VarHandle) >> –Loop combinators, tryFinally, various incremental conveniences >> –Module-aware Lookups, access-checked Class lookups >> §What are the use cases for unsafe Lookups? >> §What about polymorphic inline caches? >> Provisional Agenda: Performance >> §Performance changes >> –MH caching, MH customization, profile injection >> –Indified string concatenation >> §Native method handles >> §Low level performance stuff >> –@Stable, @{Dont,Force}Inline, @PolymorphicSignature >> §Who wants to nominate their polymorphic inline cache? >> >> >> >> ___ >> mlvm-dev mailing list >> mlvm-dev@openjdk.java.net >> http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev >> >___ >mlvm-dev mailing list >mlvm-dev@openjdk.java.net >http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev -- Sent from my Android device with K-9 Mail. Please excuse my brevity.___ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
Re: JVMLS indy support group provisional agenda
This one may be a little controversial but there are several good arguments in its favor: VarHandle should be able to modify final fields. Remi On July 31, 2016 10:43:14 PM PDT, John Rose wrote: >Thanks, I added those points. > >On Jul 31, 2016, at 10:34 PM, Vladimir Ivanov > wrote: >> >> Thanks a lot for preparing the agenda, John! >> >> I'd like to nominate a topic into API section: enable super >constructor lookups in j.l.i. >> >> FTR it was discussed on the list before [1]. >> >> Also, Charlie Nutter asked (at JFokus 2015?) for lightweight >safepointing solution, but there was no progress on it yet. Maybe it's >worth to reiterate the discussion as well? >> >> Best regards, >> Vladimir Ivanov >> >> [1] >http://mail.openjdk.java.net/pipermail/mlvm-dev/2015-February/006292.html >> >> >> On 7/31/16 10:13 PM, John Rose wrote: >>> Tomorrow at the JVMLS we will have an hour-long workshop to discuss >indy >>> and MHs. >>> I plan to run this as a Q/A and (if we are in good form) a >>> brain-storming session. >>> Here are the discussion topics that pop quickly to the top of my >list. >>> Any more suggestions? >>> — John >>> >>> Provisional Agenda: API >>> §API changes in java.lang.invoke for Java 9 >>> –VarHandles ({find{Static},unreflect}VarHandle) >>> –Loop combinators, tryFinally, various incremental conveniences >>> –Module-aware Lookups, access-checked Class lookups >>> §What are the use cases for unsafe Lookups? >>> §What about polymorphic inline caches? >>> Provisional Agenda: Performance >>> §Performance changes >>> –MH caching, MH customization, profile injection >>> –Indified string concatenation >>> §Native method handles >>> §Low level performance stuff >>> –@Stable, @{Dont,Force}Inline, @PolymorphicSignature >>> §Who wants to nominate their polymorphic inline cache? >>> >>> >>> >>> ___ >>> mlvm-dev mailing list >>> mlvm-dev@openjdk.java.net >>> http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev >>> >> ___ >> mlvm-dev mailing list >> mlvm-dev@openjdk.java.net >> http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev > >___ >mlvm-dev mailing list >mlvm-dev@openjdk.java.net >http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev -- Sent from my Android device with K-9 Mail. Please excuse my brevity.___ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
Re: JVMLS indy support group provisional agenda
Thanks, I added those points. On Jul 31, 2016, at 10:34 PM, Vladimir Ivanov wrote: > > Thanks a lot for preparing the agenda, John! > > I'd like to nominate a topic into API section: enable super constructor > lookups in j.l.i. > > FTR it was discussed on the list before [1]. > > Also, Charlie Nutter asked (at JFokus 2015?) for lightweight safepointing > solution, but there was no progress on it yet. Maybe it's worth to reiterate > the discussion as well? > > Best regards, > Vladimir Ivanov > > [1] http://mail.openjdk.java.net/pipermail/mlvm-dev/2015-February/006292.html > > > On 7/31/16 10:13 PM, John Rose wrote: >> Tomorrow at the JVMLS we will have an hour-long workshop to discuss indy >> and MHs. >> I plan to run this as a Q/A and (if we are in good form) a >> brain-storming session. >> Here are the discussion topics that pop quickly to the top of my list. >> Any more suggestions? >> — John >> >> Provisional Agenda: API >> §API changes in java.lang.invoke for Java 9 >> –VarHandles ({find{Static},unreflect}VarHandle) >> –Loop combinators, tryFinally, various incremental conveniences >> –Module-aware Lookups, access-checked Class lookups >> §What are the use cases for unsafe Lookups? >> §What about polymorphic inline caches? >> Provisional Agenda: Performance >> §Performance changes >> –MH caching, MH customization, profile injection >> –Indified string concatenation >> §Native method handles >> §Low level performance stuff >> –@Stable, @{Dont,Force}Inline, @PolymorphicSignature >> §Who wants to nominate their polymorphic inline cache? >> >> >> >> ___ >> mlvm-dev mailing list >> mlvm-dev@openjdk.java.net >> http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev >> > ___ > mlvm-dev mailing list > mlvm-dev@openjdk.java.net > http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev ___ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
Re: JVMLS indy support group provisional agenda
Thanks a lot for preparing the agenda, John! I'd like to nominate a topic into API section: enable super constructor lookups in j.l.i. FTR it was discussed on the list before [1]. Also, Charlie Nutter asked (at JFokus 2015?) for lightweight safepointing solution, but there was no progress on it yet. Maybe it's worth to reiterate the discussion as well? Best regards, Vladimir Ivanov [1] http://mail.openjdk.java.net/pipermail/mlvm-dev/2015-February/006292.html On 7/31/16 10:13 PM, John Rose wrote: Tomorrow at the JVMLS we will have an hour-long workshop to discuss indy and MHs. I plan to run this as a Q/A and (if we are in good form) a brain-storming session. Here are the discussion topics that pop quickly to the top of my list. Any more suggestions? — John Provisional Agenda: API §API changes in java.lang.invoke for Java 9 –VarHandles ({find{Static},unreflect}VarHandle) –Loop combinators, tryFinally, various incremental conveniences –Module-aware Lookups, access-checked Class lookups §What are the use cases for unsafe Lookups? §What about polymorphic inline caches? Provisional Agenda: Performance §Performance changes –MH caching, MH customization, profile injection –Indified string concatenation §Native method handles §Low level performance stuff –@Stable, @{Dont,Force}Inline, @PolymorphicSignature §Who wants to nominate their polymorphic inline cache? ___ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev ___ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev