Trying to work newer indy into JRuby
forax at univ-mlv.fr
Mon May 18 03:17:37 PDT 2009
Charles Oliver Nutter a écrit :
> I've read through Fidgety a few times and I think I'm starting to get it.
> So the idea is that you would install a MethodHandle into the call site
> that knows how to handle the incoming objects and (potentially) re-patch
> the call site with a new method?
I don't think that it is possible to re-patch without subclassing
But you can use more than one subclasses of JavaMethodHandle.
You can also store info in subclass of CallSite.
> Is there any guarantee that the code in the MethodHandle will be inlined
Currently, this garantee doesn't exist.
But the idea is that all (or most of ) method handles will to be
Some method handles are already optimized because corresponding
fast path already exists in the VM.
> I may have missed some discussion on this, but I want to be
> absolutely clear on this point. If I wire up things exactly as in
> Fidgety's "Guard" method handle, will (e.g.) Hotspot inline all the way
> through? What are the edge cases?
Hotspot will inline like usually.
> I may have enough to get this wired now...starting to see where the old
> pieces fit into the new structure. Hints still welcome :)
> - Charlie
just remember that you will run a prototype not a full featured race car :)
Hint: I think your JRuby internals should run on bootstrap classpath,
the current prototype has some classloading problems.
More information about the mlvm-dev