RFR: 8344148: Add an explicit compiler phase for warning generation

Vicente Romero vromero at openjdk.org
Thu Nov 14 20:20:32 UTC 2024


On Wed, 13 Nov 2024 22:25:36 GMT, Archie Cobbs <acobbs at openjdk.org> wrote:

> Please review this patch which does some minor refactoring to the compiler:
> * Create a new `WARN` phase which can be a dedicated home for (new) lint/warning logic
> * Create a new `WarningAnalyzer` singleton whose job is to invoke such lint/warning logic
> * Move `ThisEscapeAnalyzer` out of `Flow` (where it doesn't belong) and into `WarningAnalyzer`
> * Refactor `ThisEscapeAnalyzer` to be a context singleton like all other such classes
> 
> See [JDK-8344148](https://bugs.openjdk.org/browse/JDK-8344148) for details.

src/jdk.compiler/share/classes/com/sun/tools/javac/comp/WarningAnalyzer.java line 39:

> 37:  *  deletion without notice.</b>
> 38:  */
> 39: public class WarningAnalyzer {

nice to see this happening :)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22088#discussion_r1842837463


More information about the compiler-dev mailing list