RFR: 8301858: Verification error when compiling switch with record patterns [v3]
Aggelos Biboudis
abimpoudis at openjdk.org
Wed Feb 8 14:29:10 UTC 2023
> When unrolling/translating record patterns with an unconditional case, we were translating the last/innermost case to`case null, default` skipping the initialization of a bound variable `o` in the example below:
>
> switch (..) {
> case R1(Object o):
> return meth_O(o);
> }
> =>
> switch (..) {
> case R1:
> switch(..) {
> case null, default:
> return meth_O(o);
> }
> }
>
> This PR addresses that by emitting the correct label instead of default.
Aggelos Biboudis has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision:
Fix unrolling with cases that have null and unconditional
Co-authored-by: Jan Lahoda <jan.lahoda at oracle.com>
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/12438/files
- new: https://git.openjdk.org/jdk/pull/12438/files/f9d51d99..e77384cd
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=12438&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=12438&range=01-02
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/12438.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/12438/head:pull/12438
PR: https://git.openjdk.org/jdk/pull/12438
More information about the compiler-dev
mailing list