[code-reflection] RFR: OpBuilder optimizations - part 1. [v2]
Paul Sandoz
psandoz at openjdk.org
Fri Nov 14 18:49:41 UTC 2025
On Fri, 14 Nov 2025 18:24:34 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
> Something like that -- but it's intricate because of the way the pipeline is put together. E.g. the main entry point for code generation in `JavaCompiler` is:
>
> ```
> JavaFileObject genCode(Env<AttrContext> env, JCClassDecl cdef) throws IOException { .. }
> ```
>
> So, I think it will be hard if we don't _at least_ create a `JCClassDecl`.
Ok. I see that all the classes (nested or otherwise) are independently placed on some queue to be processed, after AFAICT the nested ones are extracted from their parent. So adding a synthetic clas decl node to that queue holding a module op should work.
Naively, i managed to get a JCSkip node, appended to JCClassDecl.defs for the class where there are reflectable methods/lambdas, flowing though to gen, which can then be removed in a pre-processing step before normalization.
-------------
PR Comment: https://git.openjdk.org/babylon/pull/679#issuecomment-3534113299
More information about the babylon-dev
mailing list