RFR: 8344148: Add an explicit compiler phase for warning generation
Maurizio Cimadamore
mcimadamore at openjdk.org
Thu Nov 14 22:19:21 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.
> FWIW I built a very simple version of that idea:
>
> ```shell
> for i in 1 2 3 4 5; do
> echo =========== RUN $i;
> make clean
> find src -name '*.java' -print | xargs touch
> make interim-langtools
> time make
> done
> ```
I'm not sure this test is correct. IIUC, `make interim-langtools` builds the compiler sources, but using the compiler in the bootstrap JDK. That explains, I think, why there's absolutely no difference between the two runs?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22088#issuecomment-2477512956
More information about the compiler-dev
mailing list