Trying to work newer indy into JRuby
forax at univ-mlv.fr
Mon May 18 03:44:04 PDT 2009
Charles Oliver Nutter a écrit :
> Ok, talking out loud here...feel free to jump in any time.
> Assuming a totally dynamic class structure that has no relationship to
> 1. The initial bootstrap would return an "InitialLookupMethodHandle"
> that knows how to do two things: do a slow lookup of the method
> (installing it back into the call site), and return the result of
> invoking it.
> 2. Upon first call, "ILMH" would grab the metaClass from the receiver
> object and do appropriate lookup logic. It would then install a
> GuardedMethodHandle wrapping the target method into the original call
> site, and proceed to do an initial invocation of the target method.
> 3. GuardedMethodHandle would repeatedly check its invalidation status
> (my volatile class-hierarchy token) and either go straight through to
> the wrapped target or cause a re-lookup and re-install of the method
> 4. GuardedMethodHandles could be further broken down into
> MonomorphicCachingHandle, PolymorphicCachingHandle, and other types like
> I have in JRuby for Object#send, respond_to?, method_missing and so on.
> Again this all hinges on those intermediate handles not getting in the
> way of inlining, or the whole thing starts to fall apart.
> Sounding about right?
> - Charlie
More information about the mlvm-dev