[code-reflection] RFR: BytecodeLift directly calculating local variables + related BytecodeGenerator fixes

Adam Sotona asotona at openjdk.org
Fri Aug 23 12:17:53 UTC 2024


Proposal of `BytecodeLift` implementation skipping intermediate use of `SlotOp` and `SlotSSA` transformation.
`LocalsTypeMapper` already handled majority of the variable mapping and its complexity grew to cover more use cases.
This patch adds a very simple slots model to `LocalsTypeMapper` to compute variables out of the bytecode directly .
`BytecodeLift` now knows all necessary information to emit relevant `VarOp` and `VarAccessOp`  directly.

Stability of `TestSmallCorpus` has slightly degraded, however it is just a temporary regression.

Please review.

Thanks,
Adam

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

Commit messages:
 - removed obsolete method
 - TestSmallCorpus changed back to double round and stability stats temporary degraded
 - fixed var type calculation
 - stabilization fixes
 - using JavaType.wildcard() for null types in BytecodeLift
 - direct var mapping - work in progress
 - direct var mapping - work in progress
 - direct var mapping - work in progress
 - direct var mapping - work in progress
 - direct var mapping - work in progress
 - ... and 4 more: https://git.openjdk.org/babylon/compare/15d8b3b3...13b21cca

Changes: https://git.openjdk.org/babylon/pull/218/files
  Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=218&range=00
  Stats: 770 lines in 6 files changed: 163 ins; 541 del; 66 mod
  Patch: https://git.openjdk.org/babylon/pull/218.diff
  Fetch: git fetch https://git.openjdk.org/babylon.git pull/218/head:pull/218

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


More information about the babylon-dev mailing list