[code-reflection] RFR: OpBuilder optimizations - part 1. [v2]
Maurizio Cimadamore
mcimadamore at openjdk.org
Fri Nov 14 14:11:48 UTC 2025
On Fri, 14 Nov 2025 13:44:52 GMT, Adam Sotona <asotona at openjdk.org> wrote:
> Related to the `BytecodeGenerator` postpone to the rigth `javac` phase - I'm open to the implementation proposals. Maybe we can solve it in a follow-up PR.
I think it's better to defer to a different PR. We need to find the correct way to communicate the ops to the compiler pipeline. Probably the best way to do this would be the creation of "shim" AST ClassDef nodes, which have nested shim MethodDef, as needed. These method defs will not have a body, but will have an "op" instead. Then Gen will recognize these, and skip the visit. And ClassWriter can probably use BytecodeGenerator to emit the bytecode for these methods in the context of the enclosing class that it will generate.
-------------
PR Comment: https://git.openjdk.org/babylon/pull/679#issuecomment-3532978405
More information about the babylon-dev
mailing list