RFR: 8372635: Lambdas do not copy over SYNTHETIC flag for local variables [v2]
Jan Lahoda
jlahoda at openjdk.org
Thu Dec 11 13:58:42 UTC 2025
On Wed, 10 Dec 2025 16:28:58 GMT, Vicente Romero <vromero at openjdk.org> wrote:
>> The `& FINAL` mask seems to be originally from [JDK-8026749](https://bugs.openjdk.org/browse/JDK-8026749) ([commit](https://github.com/openjdk/jdk/commit/cf30c203379008ebae37bf00f1839a69cd53ca26)). That patch just aimed to create an LVT for debugger and did not copy over any flag, and incorrectly set the final flag which was subsequently fixed.
>>
>> I don't know why the original patch did not pass over all flags. Maybe it was limited to debugger support and never anticipated actual use of these variables' flags. Yet I don't see a reason in the original issue for not reusing the flags.
>
> yep I originally misread the code. I'm also wondering now why we didn't pass all the original flags to the new symbol. We should probably check what breaks if all the flags are just passed
Good question whether we can copy all flags. I went through the flags, and there's nothing I would know would be problematic (the flag would need to be significant for the backend/codegen, and there's very limited number of such flags). Tests also seem fine with copying all flags, so I've adjusted the PR to copy all flags.
Thanks!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28724#discussion_r2610683634
More information about the compiler-dev
mailing list