incompatible change coming in javac: invokedynamic calls will declare "throws Throwable"
Charles Oliver Nutter
headius at headius.com
Mon Jun 15 12:52:31 PDT 2009
I've updated indy_mock for this change and for the insertArguments name change.
On Sat, Jun 13, 2009 at 1:50 AM, John Rose<John.Rose at sun.com> wrote:
> In response to comments on coin-dev at openjdk.java.net about our
> proposed Java language changes, I am changing the implicit methods of
> InvokeDynamic.foo and MethodHandle.invoke to include a static
> declaration of "throws Throwable". This aligns with the reality that
> there is no framework of static checking for throws and catches that
> applies to those calls; they are essentially dynamic and can throw
> anything. It allows the Java language to incorporate those new
> constructs much more accurately (with respect to the conventions of
> the Java language).
> I have retrofitted the code internal to the Sun JDK (from meth.patch,
> etc.), and the exercise consisted of pasting in a bunch of "throws
> Throwable" declarations in places where they did no harm (other than
> to look a little ugly). The bytecodes are essentially unchanged;
> there are no new catches or throws. For more information on the
> language issues (and subsequent discussion, if any) please see coin-dev:
> Please let me know if there are any other problems with this change,
> for users of JSR 292.
> -- John
> mlvm-dev mailing list
> mlvm-dev at openjdk.java.net
More information about the mlvm-dev