-XD-relax doesn't work
Liam Miller-Cushon
cushon at google.com
Wed Jan 20 01:31:52 UTC 2016
Thanks, I'll avoid using it :)
On Tue, Jan 19, 2016 at 5:03 PM, Maurizio Cimadamore <
maurizio.cimadamore at oracle.com> wrote:
> Thanks
> I'll add that to the list of flags to cleanup :-)
>
> Maurizio
>
>
> On 20/01/16 00:49, Liam Miller-Cushon wrote:
>
>> I think that -XD-relax has been broken since JDK8. My understanding is
>> that it was added in the jsr14 era, so maybe it should just be removed?
>>
>> The fix is:
>>
>> diff -r 6149fc30cd71
>> src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java
>> ---
>> a/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java
>> Thu Jan 14 12:03:24 2016 -0800
>> +++
>> b/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java
>> Tue Jan 19 16:34:56 2016 -0800
>> @@ -1281,6 +1281,7 @@
>> return;
>>
>> if (relax) {
>> + compileStates.put(env, CompileState.FLOW);
>> results.add(env);
>> return;
>> }
>>
>> Repro:
>>
>> $ cat Test.java
>> class Test {}
>> $ javac -XD-relax Test.java
>> An exception has occurred in the compiler (1.9.0-internal). Please file a
>> bug against the Java compiler via the Java bug reporting page (
>> http://bugreport.java.com) after checking the Bug Database (
>> http://bugs.java.com) for duplicates. Include your program and the
>> following diagnostic in your report. Thank you.
>> java.lang.AssertionError: The current compile state [ATTR] of class Test
>> is previous to FLOW
>> at com.sun.tools.javac.util.Assert.error(Assert.java:162)
>> at
>> com.sun.tools.javac.comp.TransTypes.translateClass(TransTypes.java:937)
>> at
>> com.sun.tools.javac.comp.TransTypes.visitClassDef(TransTypes.java:512)
>> at
>> com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:744)
>> at
>> com.sun.tools.javac.tree.TreeTranslator.translate(TreeTranslator.java:58)
>> at
>> com.sun.tools.javac.comp.TransTypes.translate(TransTypes.java:491)
>> at
>> com.sun.tools.javac.comp.TransTypes.translateTopLevelClass(TransTypes.java:977)
>> at
>> com.sun.tools.javac.main.JavaCompiler.desugar(JavaCompiler.java:1455)
>> at
>> com.sun.tools.javac.main.JavaCompiler.desugar(JavaCompiler.java:1326)
>> at
>> com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:871)
>> at com.sun.tools.javac.main.Main.compile(Main.java:257)
>> at com.sun.tools.javac.main.Main.compile(Main.java:142)
>> at com.sun.tools.javac.Main.compile(Main.java:55)
>> at com.sun.tools.javac.Main.main(Main.java:41)
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20160119/ae666ef3/attachment.html>
More information about the compiler-dev
mailing list