Spread problem with > 10 arguments

John Rose John.Rose at Sun.COM
Fri Jul 3 17:45:22 PDT 2009


That is an awkward error. For now can you make do with fewer args?

-- John  (on my iPhone)

On Jul 3, 2009, at 4:01 PM, Charles Oliver Nutter  
<headius at headius.com> wrote:

> I seem to have stumbled onto a problem with some handles and >10 or
>> 11 arguments.
>
> For this code:
>
>        System.out.println(target.type());
>        System.out.println(breakJump.type());
>        target = MethodHandles.catchException(target,
> JumpException.BreakJump.class, breakJump);
>
> This pair of method types works:
>
> (org.jruby.runtime.callsite.CacheEntry, 
> org.jruby.runtime.ThreadContext, 
> org.jruby.runtime.builtin.IRubyObject, 
> org.jruby.runtime.builtin.IRubyObject, 
> java.lang.String, 
> org.jruby.runtime.builtin.IRubyObject, 
> org.jruby.runtime.builtin.IRubyObject,org.jruby.runtime.Block) 
> org.jruby.runtime.builtin.IRubyObject
> (org.jruby.exceptions.JumpException 
> $BreakJump, 
> org.jruby.runtime.callsite.CacheEntry, 
> org.jruby.runtime.ThreadContext, 
> org.jruby.runtime.builtin.IRubyObject, 
> org.jruby.runtime.builtin.IRubyObject, 
> java.lang.String, 
> org.jruby.runtime.builtin.IRubyObject, 
> org.jruby.runtime.builtin.IRubyObject,org.jruby.runtime.Block) 
> org.jruby.runtime.builtin.IRubyObject
>
> But this pair produces an error:
>
> (org.jruby.runtime.callsite.CacheEntry, 
> org.jruby.runtime.ThreadContext, 
> org.jruby.runtime.builtin.IRubyObject, 
> org.jruby.runtime.builtin.IRubyObject, 
> java.lang.String, 
> org.jruby.runtime.builtin.IRubyObject, 
> org.jruby.runtime.builtin.IRubyObject, 
> org.jruby.runtime.builtin.IRubyObject,org.jruby.runtime.Block) 
> org.jruby.runtime.builtin.IRubyObject
> (org.jruby.exceptions.JumpException 
> $BreakJump, 
> org.jruby.runtime.callsite.CacheEntry, 
> org.jruby.runtime.ThreadContext, 
> org.jruby.runtime.builtin.IRubyObject, 
> org.jruby.runtime.builtin.IRubyObject, 
> java.lang.String, 
> org.jruby.runtime.builtin.IRubyObject, 
> org.jruby.runtime.builtin.IRubyObject, 
> org.jruby.runtime.builtin.IRubyObject,org.jruby.runtime.Block) 
> org.jruby.runtime.builtin.IRubyObject
>
> Here's the error:
>
> Caused by: java.lang.IllegalArgumentException: no restarg in
> (java.lang.Object)java.lang.Object
>    at sun.dyn.MethodHandleImpl.newIllegalArgumentException 
> (MethodHandleImpl.java:841)
>    at sun.dyn.MethodHandleImpl.spreadArguments(MethodHandleImpl.java: 
> 484)
>    at sun.dyn.MethodHandleImpl.makeGuardWithCatch 
> (MethodHandleImpl.java:806)
>    at java.dyn.MethodHandles.catchException(MethodHandles.java:1397)
>    at org.jruby.runtime.invokedynamic.InvokeDynamicSupport.<clinit> 
> (InvokeDynamicSupport.java:742)
>    ... 10 more
>
> Looks like a bug...I have not had a chance to dig into it.
>
> - Charlie
> _______________________________________________
> mlvm-dev mailing list
> mlvm-dev at openjdk.java.net
> http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev



More information about the mlvm-dev mailing list