RFR: 8358801: javac produces class that does not pass verifier.
Chen Liang
liach at openjdk.org
Tue Jun 17 19:25:30 UTC 2025
On Tue, 17 Jun 2025 19:21:20 GMT, Chen Liang <liach at openjdk.org> wrote:
>> To me, personally: while doing it here is not perfect (mostly because I would prefer if we didn't have to do this bookkeeping at all), it seems to me like a fairly local property - the let expr starts, and then does its own cleanup. It already calls `code.endScopes(limit);` above this change, so this is basically an extension to that. If we did it at `makeCondItem` time, we would need to pass the limit everywhere `makeCondItem` is called, making it non-local. Many parts of the code would now suddenly have to care whether the node is inside a let expression. That feels to me like increasing complexity.
>
> Sounds reasonable. I asked this because I could see `undefineVariablesInChain` being used elsewhere, such as `GenContext::addCont/addExit`. We should probably update those two sites, as I didn't consider a linked list chain being used in those sites.
Or you can even make it an instance method on Chain - the limit can be considered an intrinsic property to where the chain leads to, except this information is not available when a chain is constructed (should it be?)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25849#discussion_r2153016100
More information about the compiler-dev
mailing list