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

Adam Sotona asotona at openjdk.org
Tue Nov 18 10:26:13 UTC 2025


> 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 with a new target base due to a merge or a rebase. The pull request now contains 15 commits:

 - Merge branch 'code-reflection' into opbuilder-optimizations
   
 - Op reverted to the original
   
 - builder methods delegating to the synth. inner class
   
 - re-enabled TestCodeBuilder
   
 - renamed OpBuilder::createBuilderFunction to createBuilderFunctions
   
 - ReflectMethods::synthClassDecl generates from module
   
 - OpBuilder forms ModuleOp and support functions renamed
   
 - ModuleOp and FuncCallOp support in BytecodeGenerator
   
 - nit fixes
   
 - nit fixes
   
 - ... and 5 more: https://git.openjdk.org/babylon/compare/f4a0eb3e...1f507969

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

Changes: https://git.openjdk.org/babylon/pull/679/files
  Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=679&range=05
  Stats: 572 lines in 4 files changed: 294 ins; 214 del; 64 mod
  Patch: https://git.openjdk.org/babylon/pull/679.diff
  Fetch: git fetch https://git.openjdk.org/babylon.git pull/679/head:pull/679

PR: https://git.openjdk.org/babylon/pull/679


More information about the babylon-dev mailing list