[JDK8] RFR (XS): JSR292: IncompatibleClassChangeError in LambdaForm for CharSequence.toString() method handle type converter
sundararajan.athijegannathan at oracle.com
Wed Jan 15 15:48:22 UTC 2014
Looks good to me
On Wednesday 15 January 2014 09:01 PM, Vladimir Ivanov wrote:
> InvokeBytecodeGenerator can produce incorrect bytecode for a
> LambdaForm when invoking a method from Object declared in an interface.
> The problem is the following:
> (1) java.lang.CharSequence interface declares abstract method
> "String toString()";
> (2) after 8014013 fix, VM resolves
> CharSequence::toString()/invokeInterface to
> (3) during LambdaForm compilation, CharSequence is considered
> statically invocable (see
> InvokeBytecodeGenerator::isStaticallyInvocable) and invokevirtual for
> CharSequence::toString() is issued, which is wrong (invokevirtual
> throws ICCE if it references an interface);
> The fix is straightforward: during LambdaForm compilation, switch back
> from invokevirtual to invokeinterface instruction when invoking a
> method on an interface.
> The fix is targeted for 8. Will be also integrated into 9.
> Testing: regression test, jdk/test/java/lang/invoke, vm.mlvm.testlist,
> nashorn, jruby.
> Best regards,
> Vladimir Ivanov
More information about the core-libs-dev