guardWithTest
Charles Oliver Nutter
charles.nutter at sun.com
Thu May 21 20:25:37 PDT 2009
More information...with -Xint I don't get a hard crash, I get this
exception:
MemberName.java:406:in `newIllegalArgumentException':
java.lang.IllegalArgumentException: cannot spread
(java.lang.Object[])boolean to
(org.jruby.runtime.ThreadContext,org.jruby.runtime.builtin.IRubyObject,org.jruby.runtime.builtin.IRubyObject,java.lang.String,org.jruby.runtime.builtin.IRubyObject)boolean
from MethodHandles.java:859:in `spreadArguments'
from MethodHandleImpl.java:312:in `makeGuardWithTest'
from MethodHandles.java:1031:in `guardWithTest'
from InvokeDynamicSupport.java:67:in `fallback'
Seems to be a failure in the spread, no?
- Charlie
Charles Oliver Nutter wrote:
> Ok, I was too intrigued by guardWithTest to not give it a try. Here's
> the revised InvokeDynamicSupport I came up with. It seems like things
> are wired correctly, but it results in a crash:
>
> http://gist.github.com/115901
>
> It crashes with a message like:
>
> # A fatal error has been detected by the Java Runtime Environment:
> #
> # Internal Error (signature.cpp:60), pid=57856, tid=2954375168
> # Error: expecting (
>
> I presume this means the guardWithTest stuff isn't quite functional yet.
>
> A few notes on this:
>
> * I like this very much; it fits well our current call site logic. I
> could also see how easy it would be to chain guardWithTest MHs to create
> a polymorphic cache, which is super cool.
> * One major improvement on my end would be to get our Ruby method
> objects to actually *be* method handles, so they won't require the
> intermediate code that, in this version, does nothing more than pass
> arguments through.
> * guardWithTest brings this much closer to being completely
> primitive-MHs all the way through, and I think that's the right way for
> us to be moving, yes?
>
> I'm eager to get more of this stuff wired up. I don't suppose there's
> anything folks like me can do to help, is there?
>
> - Charlie
>
More information about the mlvm-dev
mailing list