RFR: 8372948: Store end positions directly in JCTree [v6]

Liam Miller-Cushon cushon at openjdk.org
Wed Jan 28 11:24:16 UTC 2026


On Mon, 26 Jan 2026 19:50:56 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> Ok, thanks! So if I'm understanding, the cases in the switch are currently necessary, and longer term cases can be removed as the parser is updated to store end positions directly on the additional AST node kinds. Does that sound right, or are there additional changes here that should be made now?
>
>> Ok, thanks! So if I'm understanding, the cases in the switch are currently necessary, and longer term cases can be removed as the parser is updated to store end positions directly on the additional AST node kinds. Does that sound right, or are there additional changes here that should be made now?
> 
> That is my understanding as well. (I was hoping some of them would be redundant -- but it seems that's not the case)

I filed https://bugs.openjdk.org/browse/JDK-8372948 to keep track of this, and have a draft in https://github.com/openjdk/jdk/pull/29463 in that passes tests. I need to give more thought to how to ensure the invariants we want are being maintained, and that nodes that should have end positions always have them after that change.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/28610#discussion_r2736177100


More information about the compiler-dev mailing list