[code-reflection] RFR: Switch lowering fixes [v2]

Adam Sotona asotona at openjdk.org
Mon Jan 5 15:57:43 UTC 2026


On Mon, 5 Jan 2026 15:29:00 GMT, Adam Sotona <asotona at openjdk.org> wrote:

>> src/jdk.incubator.code/share/classes/jdk/incubator/code/bytecode/impl/LoweringTransform.java line 108:
>> 
>>> 106: 
>>> 107:         Value selector = block.context().getValue(swOp.operands().get(0));
>>> 108:         if (ConstantLabelSwitchChecker.isIntegralReferenceType(selector.type())) {
>> 
>> Why we need  to unbox the selector ?
>
> `ConstantLabelSwitchOp` represents `tableswitch` and `lookupswitch` bytecode instructions and they accept only primitive int and its sub-types.

I found wrongly unboxing `Character` - will fix it.

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

PR Review Comment: https://git.openjdk.org/babylon/pull/804#discussion_r2661968014


More information about the babylon-dev mailing list