RFR: 8350097: Make Compilation::current() and Compile::current() safer

Thomas Stuefe stuefe at openjdk.org
Fri Feb 14 14:55:20 UTC 2025


Somewhat trivial.

I recently hunted a bug for an hour until I realized that I had accessed ciEnv::compiler_data() as C2 `Compile` when, in fact, it was C1 `Compilation`. Stupid mistake, but an assert is easy to do and saves time.

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

Commit messages:
 - copyrights
 - start

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

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


More information about the hotspot-compiler-dev mailing list