[code-reflection] RFR: Aggregated work on Verifier and BytecodeLift deconstruction

Adam Sotona asotona at openjdk.org
Thu Oct 31 15:30:14 UTC 2024


This PR is aggregated continuation of work on `Verifier` #247 and new simplified and deconstructed implementation of `BytecodeLift`.

Work on `Verifier` revealed bugs in `BytecodeLift`.
Fixing of the bugs adds more complexity to already very complex `BytecodeLift`.
The goal of this PR is to deconstruct `BytecodeLift` to its bare bones  and re-introduce a kind of bytecode dialect:
- `UnresolvedType.Ref` and `UnresolvedType.Int` represent references and int with all its possible sub-types
- `SlotOp` is an intermediate model of local variables
- `SlotToVarTransformer` transforms `SlotOp` to `CoreOp.VarOp`
- `UnresolvedTypesTransformer` transforms `UnresolvedType.Ref` and `UnresolvedType.Int` to `JavaType`.

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

Commit messages:
 - Merge remote-tracking branch 'babylon/code-reflection' into split-lifter
 - BytecodeLift fixed exception region transits
 - BytecodeLift better dealing with exception regions transitions - work in progress
 - BytecodeLift::targetBlockForExceptionHandler work in progress
 - Verifier fix
 - initial implementation of Verifier::verifyExceptionRegions
 - BytecodeGenerator trancking exception regions per catch block
 - fixed UnresolvedTypesTransformer
 - UnresolvedTypesTransformer work in progress
 - SlotToVarTransformer decoupled VarOp unresolved type from the initial value unresolved type
 - ... and 55 more: https://git.openjdk.org/babylon/compare/fa4dd443...ad565292

Changes: https://git.openjdk.org/babylon/pull/258/files
  Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=258&range=00
  Stats: 2968 lines in 15 files changed: 1578 ins; 1192 del; 198 mod
  Patch: https://git.openjdk.org/babylon/pull/258.diff
  Fetch: git fetch https://git.openjdk.org/babylon.git pull/258/head:pull/258

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


More information about the babylon-dev mailing list