[code-reflection] RFR: BytecodeLift directly calculating local variables + related BytecodeGenerator fixes [v6]
Paul Sandoz
psandoz at openjdk.org
Mon Aug 26 18:51:17 UTC 2024
On Mon, 26 Aug 2024 17:34:50 GMT, Adam Sotona <asotona at openjdk.org> wrote:
>> 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
>
> Adam Sotona has updated the pull request incrementally with one additional commit since the last revision:
>
> different approach to handle lift of IncrementInstruction
Marked as reviewed by psandoz (Lead).
src/java.base/share/classes/java/lang/reflect/code/bytecode/LocalsTypeMapper.java line 58:
> 56: final class LocalsTypeMapper {
> 57:
> 58: private record Link(Slot slot, Link other) {}
Consider enclosing the declaration of `Link` in `Slot` (with the same access control as `Slot`).
-------------
PR Review: https://git.openjdk.org/babylon/pull/218#pullrequestreview-2261375084
PR Review Comment: https://git.openjdk.org/babylon/pull/218#discussion_r1731666662
More information about the babylon-dev
mailing list