[code-reflection] RFR: Bytecode locals compaction [v6]
Adam Sotona
asotona at openjdk.org
Wed Sep 11 08:46:38 UTC 2024
> `LocalsCompactor` is a bytecode transformation reducing generated method `maxLocals` by re-using local slots.
> Roundtrip of lift and bytecode generation doubles the `maxLocals` value, while `LocalsCompactor` reduces the regression by 50%.
>
> Lifting of compacted locals revealed bugs in `LocalsTypeMapper` variables graph construction. This patch includes significantly refactored `LocalsTypeMapper` to support lifting of compacted locals.
>
> `BytecodeGenerator` has slightly improved performance (so `TestSmallCorpus` finishes in a reasonable time). However performance has not been main focus of this PR.
>
> `TestSmallCorpus` has been slightly refactored to provide better debugging feedback and compaction statistics. Overall stability is still >99%.
>
> Please review.
>
> Thanks,
> Adam
Adam Sotona has updated the pull request incrementally with one additional commit since the last revision:
fixed typo
-------------
Changes:
- all: https://git.openjdk.org/babylon/pull/224/files
- new: https://git.openjdk.org/babylon/pull/224/files/0989c963..32938a98
Webrevs:
- full: https://webrevs.openjdk.org/?repo=babylon&pr=224&range=05
- incr: https://webrevs.openjdk.org/?repo=babylon&pr=224&range=04-05
Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod
Patch: https://git.openjdk.org/babylon/pull/224.diff
Fetch: git fetch https://git.openjdk.org/babylon.git pull/224/head:pull/224
PR: https://git.openjdk.org/babylon/pull/224
More information about the babylon-dev
mailing list