another Mac OS X mlvm build
Attila Szegedi
szegedia at gmail.com
Thu Feb 10 18:57:23 PST 2011
On Feb 8, 2011, at 1:14 AM, John Rose wrote:
> On Feb 7, 2011, at 11:55 AM, Attila Szegedi wrote:
>
>> That indeed works - thanks for the hep RĂ©mi!
>>
>> FWIW, I'm updating my dynamic linker framework library to work with this version of MLVM; I got everything to compile after some nontrivial amount of work (Linkage went away, for one thing :-) ) and was stumped on this for running my test suite. Now that's eliminated, I hope I'll be able to roll out a new version of the library soon.
>
>
> Wow, that's great, Attila. I hope the package name change will be an easier step.
Yeah, I want to do it as a three-step process:
1. update it to work with the latest available binary (as Stephen provides them :-) )
2. optimize it for the features available since 2010 April when I last updated it (i.e. start using ClassValue and some new MethodHandle goodness)
3. track the package rename, once it becomes available.
> I pushed patches to fix the bug you found with X.java.
That's great!
BTW there's still this problem with MethodHandles.collectArguments (now MethodHandle.asCollector) that I originally reported back in 2009, and it is still present (at least in the 2011-01-31 build as produced by Stephen Bannasch). It also happens with method handles that are created ab ovo as vararg collectors:
Here's a small testcase:
import java.dyn.*;
public class TestCollectArguments {
public static void main(String[] args) throws Throwable {
MethodHandle xs = MethodHandles.publicLookup().findVirtual(
TestCollectArguments.class, "xs", MethodType.methodType(
String.class, String.class, String[].class));
// This works
System.out.println(xs.invokeWithArguments(new TestCollectArguments(), "a",
new String[] { "b", "c" }));
// This fails but it should work as xs is a vararg collector
try {
System.out.println(xs.invokeWithArguments(new TestCollectArguments(),
"a", "b", "c"));
}
catch(ClassCastException e) {
e.printStackTrace();
}
// This fails too
try {
System.out.println(xs.asCollector(String[].class, 2).invokeWithArguments(
new TestCollectArguments(), "a", "b", "c"));
}
catch(ClassCastException e) {
e.printStackTrace();
}
}
public String xs(String y, String... z) {
for (String zz : z) {
y += zz;
}
return y;
}
}
>
> The delicate initialization ordering will get more robust when we move everything into one package.
>
> -- John
> _______________________________________________
> 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