[code-reflection] RFR: Model verifier
Adam Sotona
asotona at openjdk.org
Thu Oct 10 14:57:02 UTC 2024
This patch starts work on model `Verifier` and implements following verifications:
- operands declaration dominance
- `BranchOp` reference arguments matching target block parameters (simple matching by `TypeKind` with erased `int` sub-types)
- `ArithmeticOperation`, `TestOperation` and `ConvOp` verified presence of relevant method handler in `InvokableLeafOps`
`TestSmallCorpus` is improved to verify code model.
Fixes of bugs newly discovered by the `TestSmallCorpus`:
- missing methods in `InvokableLeafOps`
- `Interpreter` use of provided lookup for `resolveToMethodType`
- `Interpreter` erase sub-`int` types for `InvokeOp` execution + added `TestLiftCustomBytecode::testEraseInts`
- Removed complex sub-`int` types calculation from `BytecodeLift` and `LocalsToVarMapper`
- `BytecodeLift` fixed to avoid production of some obsolete block parameters
-------------
Commit messages:
- Interpreter erase int types + added TestLiftCustomBytecode::testEraseInts
- relaxed verification of block parameters
- reversion of NullTypeResolver
- NullTypeResolver work in progress
- removed unused imports
- fixed merge of boolean segments in LocalsToVarMapper
- Verifier work in progress
- intermediate NULL_TYPE is resolved as post-lift transformation
- Draft of post-lift transform pulling null ConstantOp type from its uses
- Verifier work in progress
- ... and 10 more: https://git.openjdk.org/babylon/compare/cfffc996...104ef7dd
Changes: https://git.openjdk.org/babylon/pull/247/files
Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=247&range=00
Stats: 425 lines in 7 files changed: 314 ins; 60 del; 51 mod
Patch: https://git.openjdk.org/babylon/pull/247.diff
Fetch: git fetch https://git.openjdk.org/babylon.git pull/247/head:pull/247
PR: https://git.openjdk.org/babylon/pull/247
More information about the babylon-dev
mailing list