[code-reflection] RFR: Bytecode locals compaction [v2]
Adam Sotona
asotona at openjdk.org
Tue Sep 10 14:49:39 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:
added comments
-------------
Changes:
- all: https://git.openjdk.org/babylon/pull/224/files
- new: https://git.openjdk.org/babylon/pull/224/files/d4c0b594..6f71c8ed
Webrevs:
- full: https://webrevs.openjdk.org/?repo=babylon&pr=224&range=01
- incr: https://webrevs.openjdk.org/?repo=babylon&pr=224&range=00-01
Stats: 6 lines in 2 files changed: 1 ins; 0 del; 5 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