[code-reflection] RFR: OpBuilder optimizations - part 1. [v2]

Adam Sotona asotona at openjdk.org
Fri Nov 14 13:29:27 UTC 2025


On Wed, 12 Nov 2025 17:42:02 GMT, Adam Sotona <asotona at openjdk.org> wrote:

>> This PR include following changes:
>> 
>> - op-building methods isolated from the original code and moved 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`)
>> 
>> Remaining tasks:
>> 
>> - implement part 2. type-building helper method(s) to reduce the overhead even more
>> - refactor `OpBuilder` to build `ModuleOp` instead of individual `FuncOp`s (and re-enable `TestCodeBuilder`)
>> - cleanup `BytecodeGenerator` API
>
> Adam Sotona has updated the pull request incrementally with one additional commit since the last revision:
> 
>   nit fixes

Providing fixed public set of bootstrap methods forms an API, which (as I understand) we are trying to avoid. 
Beside that the planned second phase (an index-based types builder) must be specific per-use case (technically per class holding one or more code models).

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

PR Comment: https://git.openjdk.org/babylon/pull/679#issuecomment-3532779132


More information about the babylon-dev mailing list