Basically in constant() bindTo(x) should be replaced by insertArguments(0, x) Because bindTo requires that the first argument is an object. Here it's a boolean.
Rémi On 04/05/2011 02:55 PM, Ola Bini wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Stephen et al, > > I did a new build with the indy patch sets yesterday. Just as with your > build it passes tests and works even though the two files doesn't merge > correctly. However, this simple test: > > import java.lang.invoke.SwitchPoint; > > public class Dyn1 { > public static void main(String[] args) throws Exception { > SwitchPoint sp = new SwitchPoint(); > } > } > > > succeeds when compiling but fails like this when run: > > Exception in thread "main" java.lang.ExceptionInInitializerError > at Dyn1.main(Dyn1.java:5) > Caused by: java.lang.IllegalArgumentException: no leading reference > parameter: true > at > java.lang.invoke.MethodHandleStatics.newIllegalArgumentException(MethodHandleStatics.java:81) > at java.lang.invoke.MethodHandle.bindTo(MethodHandle.java:1009) > at java.lang.invoke.MethodHandles.constant(MethodHandles.java:1625) > at java.lang.invoke.SwitchPoint.<clinit>(SwitchPoint.java:113) > ... 1 more > > > As far as I can see the failure can be reduced to: > > public class Dyn2 { > public static void main(String[] args) throws Exception { > java.lang.invoke.MethodHandles.constant(boolean.class, true); > } > } > > which generates the same error message. > > Cheers > On 2011-04-04 19.53, Stephen Bannasch wrote: >> I've uploaded a new MacOS X build of mlvm: >> >> >> http://www.concord.org/~sbannasch/mlvm/java-1.7.0-internal-mlvm-2011_04_04.tar.gz >> >> $ ./build/bsd-amd64/j2sdk-image/bin/java -version >> >> openjdk version "1.7.0-internal" >> OpenJDK Runtime Environment (build >> 1.7.0-internal-stephen_2011_04_04_20_20-b00) >> OpenJDK 64-Bit Server VM (build 21.0-b03, mixed mode) >> >> This build is *not* a FASTDEBUG build and does *not* have the coro patch >> (coro doesn't apply cleanly anymore). >> >> I used a macosx build of Java 1.7 as the bootstrap instead of >> soylatte16-i386-1.0.3 (I'm not sure it was necessary but it was a >> variable I changed): >> >> $ /usr/libexec/java_home --version 1.7 >> /Users/stephen/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home >> >> $ /usr/libexec/java_home --version 1.7 --exec java -version >> openjdk version "1.7.0-internal" >> OpenJDK Runtime Environment (build >> 1.7.0-internal-stephen_2011_04_04_15_20-b00) >> OpenJDK 64-Bit Server VM (build 21.0-b03, mixed mode) >> >> All the jdk/test/java/lang/invoke tests pass even though the >> meth-review-7032323.patch doesn't apply cleanly to these two tests: >> >> test/java/lang/invoke/InvokeDynamicPrintArgs.java >> test/java/lang/invoke/InvokeGenericTest.java >> >> $ jtreg -XX:+UnlockExperimentalVMOptions -XX:+EnableInvokeDynamic >> -jdk:build/bsd-amd64/j2sdk-image -v:summary >> jdk/test/java/lang/invoke/ >> >> Passed: java/lang/invoke/6987555/Test6987555.java >> Passed: java/lang/invoke/6991596/Test6991596.java >> Passed: java/lang/invoke/ClassValueTest.java >> Passed: java/lang/invoke/InvokeDynamicPrintArgs.java >> Passed: java/lang/invoke/InvokeGenericTest.java >> Passed: java/lang/invoke/JavaDocExamplesTest.java >> Passed: java/lang/invoke/MethodHandlesTest.java >> Passed: java/lang/invoke/MethodTypeTest.java >> >> >> _______________________________________________ >> mlvm-dev mailing list >> mlvm-dev@openjdk.java.net >> http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev >> > > - -- > Ola Bini (http://olabini.com) > Ioke - JRuby - ThoughtWorks > > "Yields falsehood when quined" yields falsehood when quined. > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.11 (Darwin) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iQIcBAEBAgAGBQJNmxE/AAoJEClcdGmEr38MO10P/3+l6EnLrIREYCqcvK/9SfvT > CnvnC2VwRH/957NfR6I9/S0AVoqyiQt8MOF944F+G36Iq+Nodu024BqyOz8KCq9Z > +cphImgqvxMvSyJ8/3dGGEw/A+fTy7KIYBGvKuxTtTAEWByUk46mbk0QEJuhyafl > t7H5lSZF9MCX3JxteUPB6hb02Qj90TdqQYwtZd0neHyafJBpxfBazmcIIHr/Ig4Q > V1ENO7LXOqCBaEcpXB+4WnbTSSEe5QJhVN7T8G9pP2Ep5oGoGN3iVdo1s0Dc6RqB > JKFUsJg7fNLeEbsYtwGtJtL/ocy9DxDvcKxH8XbkDwiHcqF5S+wKzeoipEuY5nbx > 2rkx2jx2lQaq+1TjxArRgyxk8lZwWe1f5zgiSjFYxLzhBAlegwSLcK0wMS6JHyqE > lYEmuCW9IX1+6x6JEx1StYRa0lJtM+IkcmZrU+NCvcf6NU4ANmZUhN828BNFWtU/ > sJvmR84Dk+KVV1AoEXA1Dc2PXbjyKUf43LiqHunawCAevMyi2Fw4TJshJCmDtEg5 > tTHSBMymJbW3xv8niByZHfB8CyP6lRtL8c3cJU9Nf2J+1ZZZTdTKnwv8X4x952Rs > juqrb3gWzXNkZSsHsmQsDaDsi7rm0lCw232B1voixxXdNbxZNHlRCw4GVZjWOP2E > OeeSr/WbOjUEgG/hyaoP > =1EOw > -----END PGP SIGNATURE----- > _______________________________________________ > mlvm-dev mailing list > mlvm-dev@openjdk.java.net > http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev _______________________________________________ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev