On May 27, 2011, at 12:11 AM, Ola Bini wrote: > I ran the compile against what's in b144, but directly from the JDK7 repo > > On 2011-05-27 12.26, John Rose wrote: >> On May 26, 2011, at 11:38 PM, Ola Bini wrote: >> >>> Caused by: java.lang.IllegalArgumentException: target and fallback types >>> must match: (SephObject,Object,Object,Object,Object)Object != >>> (SephObject,SephObject,SThread,LexicalScope,MethodHandle)SephObject
Are you expecting the target type, with its homogeneous Object types, or the fallback type, with its heterogeneous types? How is the wrong one getting created? >> This mismatch is being correctly reported. The change is probably in the >> logic that created one of the inputs to GWT. >> ... >> Please recheck your use of MethodHandles.invoker or >> MethodHandles.spreadInvoker. The behavior was seriously out of sync. with >> the docs, and the docs were unclear. The latest behavior should be correct >> and clearly documented. >> >> If in doubt, you can apply asType to your invoker to make sure it has the >> type you expect. > Yes, that's exactly what I'm doing. The spreader makes it all a Object > arguments, and I then use asType to make them into the types they really > are. > > Am I misunderstanding things here? > > The place that is doing the work is this: > MethodHandle _insertArguments = > insertArguments(findStatic(MethodHandles.class, > "insertArguments", > methodType(MethodHandle.class, > MethodHandle.class, > int.class, > Object[].class)), > 1, > 0).asCollector(Object[].class, > type().parameterCount()). > asType(type().insertParameterTypes(0, > MethodHandle.class) > .changeReturnType(MethodHandle.class)); That looks like reasonable code. What is type() here? Is it Object* or SephObject,SThread,...? -- John P.S. Thanks also for the crash report. _______________________________________________ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev