[code-reflection] RFR: BytecodeLift directly calculating local variables + related BytecodeGenerator fixes [v5]

Adam Sotona asotona at openjdk.org
Mon Aug 26 17:34:50 UTC 2024


On Mon, 26 Aug 2024 16:47:42 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:

>> Adam Sotona has updated the pull request incrementally with three additional commits since the last revision:
>> 
>>  - reverted wildcard type use in BytecodeLift
>>  - Bytecode lift names variables by slot number "slot#XY"
>>  - Stabilization of the roundtrip - single-use var allocations deferred
>
> src/java.base/share/classes/java/lang/reflect/code/bytecode/LocalsTypeMapper.java line 328:
> 
>> 326:             case IncrementInstruction i -> {
>> 327:                 Slot v = locals.get(i.slot());
>> 328:                 v.writes++;
> 
> Why is this required? I likely don't understand the significance of this and how it differs from a store instruction.

I've just pushed a different approach - load and store + link two var fragments.

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

PR Review Comment: https://git.openjdk.org/babylon/pull/218#discussion_r1731576867


More information about the babylon-dev mailing list