guardWithTest revisited
Rémi Forax
forax at univ-mlv.fr
Wed May 27 09:12:01 PDT 2009
Charles Oliver Nutter a écrit :
> Ok, John got fixes in to get gWT working last night, so I gave my code
> another try:
>
> http://gist.github.com/118504
>
> But I'm getting this, so I'm not wiring something correctly:
>
> CallSite.java:166:in `checkTarget': java.dyn.WrongMethodTypeException:
> Bound[invoke_L5(java.lang.Object,java.lang.Object,java.lang.Object,java.lang.Object,java.lang.Object)java.lang.Object]
> from CallSite.java:159:in `setTarget'
> from InvokeDynamicSupport.java:66:in `fallback'
> from -e:1:in `__file__'
>
> I'm investigating, but wanted to toss it out there in case someone sees
> something obvious (or runs into the same thing).
>
I think, I've found the bug, in MethodHandleImpl.makeGuardWithTest
if (nargs < GuardWithTest.INVOKES.length) {
MethodType gtype = type.generic();
if (type == gtype)
return new GuardWithTest(test, target, fallback);
MethodHandle gtest = convertArguments(token, test, gtype.changeReturnType(boolean.class), test.type(), null);
MethodHandle gtarget = convertArguments(token, target, gtype, type, null);
MethodHandle gfallback = convertArguments(token, fallback, gtype, type, null);
MethodHandle gguard = new GuardWithTest(gtest, gtarget, gfallback);
return convertArguments(token, gguard, gtype, type, null);
}
last line should be :
return convertArguments(token, gguard, type, gtype, null);
> - Charlie
>
Rémi
More information about the mlvm-dev
mailing list