[code-reflection] RFR: OpBuilder optimizations - part 1. [v2]
Maurizio Cimadamore
mcimadamore at openjdk.org
Fri Nov 14 18:27:40 UTC 2025
On Fri, 14 Nov 2025 17:52:50 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:
> > Probably the best way to do this would be the creation of "shim" AST ClassDef nodes, which have nested shim MethodDef, as needed.
>
> That's a neat idea. Maybe we only need one specialized JCTree node holding the module op and assuming we can limit the interaction with the other parts of tree processing. Perhaps an instance of a type extending from JCSkip?
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`.
-------------
PR Comment: https://git.openjdk.org/babylon/pull/679#issuecomment-3534011004
More information about the babylon-dev
mailing list