[lworld] RFR: 8324949: [lworld] Migrate compiler tests to new internal API

Tobias Hartmann thartmann at openjdk.org
Tue Feb 6 08:30:34 UTC 2024


Similar to [JDK-8321293](https://bugs.openjdk.org/browse/JDK-8321293) for runtime, this PR converts all compiler tests to the new internal API.

**VM changes:**
- Missing null checks in the interpreter, C1 and C2 for field access and withfield
- Added C2 intrinsic for newNullRestrictedArray
- Disabled some optimizations in C2, will be fixed by [JDK-8325106](https://bugs.openjdk.org/browse/JDK-8325106)
- Improve constant buffer oop detection in C2
- Removed `InlineTypeNode::Identity` which interfered with other optimizations

**Test changes:**
- Converted all primitive classes to value class using the `@ImplicitlyConstructible` and `@LooselyConsistentValue` annotations
- Removed `.ref`, `.val`, `.default`, `_withfield`
- Converted all null-free fields to using the `@NullRestricted` annotation
- Converted all null-free array allocations to using `ValueClass.newNullRestrictedArray`
- Removed `-XX:+EnablePrimitiveClasses`
- Removed `PrimitiveClass.asValueType`/`.asPrimaryType`
- Removed final keywords where they are implicit
- Removed "inline type", "inline class"
- Adjusted IR rules and code that expects NPEs
- Disabled some test and/or IR verification

Code marked with `TODO 8325106` will be addressed by follow-up change [JDK-8325106](https://bugs.openjdk.org/browse/JDK-8325106).

Thanks,
Tobias

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

Commit messages:
 - Removed trailing whitespace
 - Copyrights
 - Reverted classFileParser changes
 - More fixes
 - More fixes
 - Fixed TestJNICalls
 - Adjusted ToDos
 - Removed useless tests
 - Removed -XX:+EnablePrimitiveClasses, jcod test fixes
 - Removed obsolete tests
 - ... and 11 more: https://git.openjdk.org/valhalla/compare/16fa7709...9f3928a8

Changes: https://git.openjdk.org/valhalla/pull/991/files
 Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=991&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8324949
  Stats: 5953 lines in 96 files changed: 1671 ins; 1628 del; 2654 mod
  Patch: https://git.openjdk.org/valhalla/pull/991.diff
  Fetch: git fetch https://git.openjdk.org/valhalla.git pull/991/head:pull/991

PR: https://git.openjdk.org/valhalla/pull/991



More information about the valhalla-dev mailing list