RFR: 8344148: Add an explicit compiler phase for warning generation [v3]
Vicente Romero
vromero at openjdk.org
Mon Jan 6 17:14:37 UTC 2025
On Thu, 21 Nov 2024 17:33:55 GMT, Archie Cobbs <acobbs at openjdk.org> wrote:
>> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ThisEscapeAnalyzer.java line 267:
>>
>>> 265: }
>>> 266:
>>> 267: private void doAnalyzeTree(Env<AttrContext> env) {
>>
>> the doAnalyzeTree method doesn't seems to add much value
>
> This class is being refactored to be a singleton, so now it's crucial that it cleans itself up after each execution, and that required adding the new try/finally structure to ensure this.
>
> It seemed cleaner to have two separate methods, because that more clearly separates the clean up step from the analysis step (also this avoids generating 200 lines of whitespace indention diffs).
>
> But of course this is just a style thing - so I'm happy to inline `doAnalyzeTree()` if you think that's more consistent with the compiler style.
>
> Thanks for taking a look.
I see, I'm OK with your approach, thanks for the clarification
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22088#discussion_r1904417980
More information about the compiler-dev
mailing list