[code-reflection] RFR: Bitwise complement op
Chen Liang
liach at openjdk.org
Wed Aug 14 23:39:32 UTC 2024
On Wed, 14 Aug 2024 22:46:35 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:
> Lowering `~x` to bytecode generates the equivalent of `x ^ -1`, so the first lift and generation cycle will result in different bytecode.
src/java.base/share/classes/java/lang/reflect/code/bytecode/BytecodeGenerator.java line 586:
> 584: processFirstOperand(op);
> 585: switch (rvt) {
> 586: case IntType, BooleanType, ByteType, ShortType, CharType -> {
Do we intend to support boolean even though JLS doesn't allow complement `~` on boolean values?
-------------
PR Review Comment: https://git.openjdk.org/babylon/pull/216#discussion_r1717642009
More information about the babylon-dev
mailing list