[code-reflection] RFR: Unify common code of SwitchStatementOp and SwitchExpressionOp [v2]
Mourad Abbay
mabbay at openjdk.org
Tue Sep 10 01:26:07 UTC 2024
On Mon, 9 Sep 2024 16:27:05 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:
>> Mourad Abbay has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:
>>
>> - Merge branch 'code-reflection' into unify-sw-op
>> - Refactor
>
> src/java.base/share/classes/java/lang/reflect/code/op/ExtendedOp.java line 973:
>
>> 971: } else {
>> 972: exit = b.block(resultType());
>> 973: if (result() != null) { // i.e. resultType not void
>
> All operations in a built model have a result value, even if it's a void value. So this expression will always be true. Use a `this instanceof ...` test?
I see. Or we can test if resultType isn't void
-------------
PR Review Comment: https://git.openjdk.org/babylon/pull/222#discussion_r1751118298
More information about the babylon-dev
mailing list