[code-reflection] RFR: Remove bytecode dialect [v4]
Adam Sotona
asotona at openjdk.org
Wed Feb 7 08:16:10 UTC 2024
On Tue, 6 Feb 2024 18:12:14 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:
>> Adam Sotona has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Code cleanup
>
> src/java.base/share/classes/java/lang/reflect/code/bytecode/BytecodeLift.java line 214:
>
>> 212: if (!operand.type().equals(varType)) {
>> 213: local = b.op(CoreOps.var(Integer.toString(lvm), operand));
>> 214: locals.put(lvm++, local);
>
> That looks incorrect (probably always was). The slot is reused with a different type so we need to update the existing entry in the map. This likely always connects to how to manage the map with conditional branching. Suggest adding an `@@@` comment for now.
Added and I'll will revisit it later, thanks.
> src/java.base/share/classes/java/lang/reflect/code/bytecode/BytecodeLift.java line 240:
>
>> 238: }
>> 239: case ConstantInstruction inst -> {
>> 240: Op.Result result = b.op(CoreOps.constant(TypeDesc.INT, inst.constantValue()));
>
> Missing support for float, long, and double, and null constants. Switch on type kind?
This case is obsolete, it should be handled by the previous case (unrestricted to LDC).
Will fix it, thanks.
-------------
PR Review Comment: https://git.openjdk.org/babylon/pull/16#discussion_r1481049016
PR Review Comment: https://git.openjdk.org/babylon/pull/16#discussion_r1481045794
More information about the babylon-dev
mailing list