RFR: 8314275: Incorrect stepping in switch [v2]
Vicente Romero
vromero at openjdk.org
Thu Feb 8 16:58:07 UTC 2024
On Thu, 8 Feb 2024 16:27:25 GMT, Aggelos Biboudis <abimpoudis at openjdk.org> wrote:
>> src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java line 1433:
>>
>>> 1431:
>>> 1432: // Emit line position for the end of the switch
>>> 1433: code.statBegin(TreeInfo.endPos(swtch));
>>
>> shouldn't this change affect already existing tests like: RuleSwitchBreaks.java in the same folder: test/langtools/tools/javac/classfiles/attributes/LineNumberTable/?
>
> I see what you mean. Those switches do not store their value (no store bytecode is emitted). This is why they didn't fail I presume. Do you think there is a discrepancy between how we compile the code in the two tests regarding `LineNumberTable`?
no I was just wondering why the issue didn't appear in the previous test, but what you are saying could be the explanation
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17772#discussion_r1483301578
More information about the compiler-dev
mailing list