[code-reflection] Integrated: Turn compiler plugin into simple SPI

Maurizio Cimadamore mcimadamore at openjdk.org
Mon Nov 18 18:53:57 UTC 2024


On Mon, 18 Nov 2024 14:18:09 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

> This PR is a small followup to the changes to turn compiler code reflection support into a compiler plugin.
> Turns out that the new plugin required several hacks and workaround, to make sure that the plugin would only run when strictly required (not to affect outcome of compilation if the plugin was disabled). We can get rid of all such workarounds by turning the plugin into a plain and simple SPI. There is a new `ReflectMethodsProxy` interface, which is implemented by the new module (see `ReflectMethods.Provider`). This allows javac to more or less call into the new pipeline step as it did before the incubating change, which leads to code that is much simpler to maintain.

This pull request has now been integrated.

Changeset: 152f4678
Author:    Maurizio Cimadamore <mcimadamore at openjdk.org>
URL:       https://git.openjdk.org/babylon/commit/152f4678c2ec50d5bbff04d76be7b007676b39e7
Stats:     296 lines in 8 files changed: 106 ins; 184 del; 6 mod

Turn compiler plugin into simple SPI

Reviewed-by: psandoz

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

PR: https://git.openjdk.org/babylon/pull/275


More information about the babylon-dev mailing list