The Great Startup Problem
mroos at roos.com
Sun Aug 24 21:10:47 UTC 2014
I am more of the side that invoke dynamic is awesome for enabling dynamic
languages on the
JVM. Given that there are two areas where I can see some help for my use
is a true Smalltalk on the JVM.
First like Charles I do have a few dependencies on plain old Java methods
and run. The most obvious one is the code which takes the Smalltalk byte
converts them to a Java method using ASM. I doubt that this is ever
but it shows up as a chunk of time every time a method is invoked the
first time. This
would probably be solved by an annotation which told hotspot that this POJ
Second, my pet request, is for a 'Callsite with PIC' construct in
invokeDyanmic. A brief
description of how it would work in my (Rtalk non Java stack organization
) would be:
First extract the methodLookup object from the call stack
For Rtalk this is a field in the object at the top of the stack. As
this is airity
dependent I provide a pre generated method handle per airity.
Then walk a list of key values looking for reference match to the
methodLookup in the keys
If I find a match jump to that method in the value with the current
if no match but the list is not yet full ( I limit it to 10)
call the fallback method with the methodLookup and the methodSelector
( a string in my case for the method name) which returns the method
insert the method into the list and jump to the method
If no match and the list if full just drop the list and start over.
>From the Callsite constructor I would provide a methodHandle to extract
a fallback to get the requested method and the selector. Of course hot
inline this from the start.
Currently I implement this with chained GWTs. I am curious if others pics
are similar and
could benefit from such a construct
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mlvm-dev