John.Rose at Sun.COM
Mon May 18 11:41:29 PDT 2009
On May 18, 2009, at 10:40 AM, Christian Thalinger wrote:
> Are the patches in MLVM current? It seems I'm missing classes and
Yes, the patches are current. For example, the patch
indy-6829144.patch contains the (new) definition of InvokeDynamic.
This is identical with the push to M3 under that bug number.
But perhaps you are not applying any patches at all. Verify by
looking in */.hg/patches/status . The patches are designed by default
to apply only to the BSD build, and you have to explicitly declare
that you are using this base by setting up */.hg/patches/guards. (See
> $ /export/home/twisti/projects/mlvm/sources/build/solaris-i586/bin/
> javac -XDinvokedynamic Hello.java
> Hello.java:42: cannot find symbol
> InvokeDynamic.hail(x); // weakly typed
> symbol: variable InvokeDynamic
> location: class Hello
> Hello.java:50: cannot find symbol
> = MethodHandles.lookup().findStatic(Hello.class, "greeter",
> symbol: method lookup()
> location: class java.dyn.MethodHandles
> Hello.java:59: java.dyn.CallSite is abstract; cannot be instantiated
> CallSite site = new CallSite(caller, name, type);
> 3 errors
Hmm... See if InvokeDynamic.class is in rt.jar of your build. That
will narrow it down. I would expect that your javac is looking in
that rt.jar, but you might verify this with Solaris truss (or ktrace
or dtruss dependng in the system).
The bsd-port repo should build on Solaris, Linux, etc. But you might
be the first person to try this since the latest changes, so maybe
there's a bug in the patches that's not in the main line. The current
promotion of JDK7 (M3, b59) builds JSR 292 code correctly and runs the
demos, unless something has broken very recently. When I promote
something to JDK7, I extract a bug-numbered patch into the mlvm repo
and then leave it alone. In theory this means that mlvm tracks JDK7
accurately, but in practice the baseline (bsd-port) lags JDK7 so the
patches might mis-apply, causing bugs.
A guess a complete list of the hazards is:
- config error in your local build & run environments
- incomplete or erroneous mvlm patches
- bad patch apply due to skew between JDK7 and bsd-port patch bases
- error in code promoted to JDK7
- error in new mlvm code
P.S. In order to apply the mlvm patches to your Solaris build, you
could (as an alternate tactic) first download the current promotion of
JDK7 and then selectively apply any mlvm patches that are not already
promoted (these are the non-numbered ones). You will probably want to
set aside the .hg/patches/series file and make your own.
It might be helpful to commit a series.jdk7 file if this turns out to
be a tricky or repeated operation; feel free to do this if you want.
Come to think of it, we might need to move series to series.bsd-port
at some point.
But I don't recommend moving to JDK7 as a base, unless you have to,
because people are using Macs for development and we should stick
More information about the mlvm-dev