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 case which is a true Smalltalk on the JVM.
First like Charles I do have a few dependencies on plain old Java methods during startup and run. The most obvious one is the code which takes the Smalltalk byte codes and converts them to a Java method using ASM. I doubt that this is ever considered hot 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 was always hot. 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 stack 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 to call 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 the methodLookup, a fallback to get the requested method and the selector. Of course hot spot would 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 regards mark
_______________________________________________ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev