[code-reflection] RFR: OpBuilder optimizations - part 1. [v9]
Paul Sandoz
psandoz at openjdk.org
Tue Nov 18 16:36:16 UTC 2025
On Tue, 18 Nov 2025 12:44:45 GMT, Adam Sotona <asotona at openjdk.org> wrote:
>> This PR include following changes:
>>
>> - op-building methods delegate to a synthetic inner class
>> - fixed boxing in `OpBuilder`
>> - op-building methods are generated by `BytecodeGenerator` and support wide range of ops
>> - `CodeModelTranslator` is deleted
>> - synthetic op-building method overrides significantly reduce overhead (by 60% on `TestBytecode`)
>> - refactored `OpBuilder` to build `ModuleOp` instead of individual `FuncCallOp`s
>> - fixed `BytecodeGenerator` to support `ModuleOp` and `FuncCallOp`
>
> Adam Sotona has updated the pull request incrementally with two additional commits since the last revision:
>
> - fixed imports
>
> - fixed javadoc wording
src/jdk.incubator.code/share/classes/jdk/incubator/code/internal/ReflectMethods.java line 158:
> 156: private ListBuffer<JCTree> classOps;
> 157: private SequencedMap<String, Op> ops;
> 158: private Symbol.ClassSymbol currentClassSym, synthClassSym;
Suggest finding a better name and declaring on a separate line.
e.g., rename to `codeModelsClassSym`.
-------------
PR Review Comment: https://git.openjdk.org/babylon/pull/679#discussion_r2538896262
More information about the babylon-dev
mailing list