RFR: 8317336: Assertion error thrown during 'this' escape analysis

Archie Cobbs acobbs at openjdk.org
Sun Oct 1 19:55:58 UTC 2023


The 'this' escape analyzer was assuming that lambas could always be treated like blocks, in the sense that we can assume a block can never end in a plain expression. This assumption is not true for lambda's of the form `() -> foo` which do exactly that. In the case that `foo` was `this`, an assertion failure would ensue.

This patch relaxes this invariant check to allow for this case.

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

Commit messages:
 - Fix incorrect invariant assertion in this escape analysis.

Changes: https://git.openjdk.org/jdk/pull/16001/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16001&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8317336
  Stats: 8 lines in 2 files changed: 7 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/16001.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/16001/head:pull/16001

PR: https://git.openjdk.org/jdk/pull/16001


More information about the compiler-dev mailing list