RFR: Use single-condition instance type checks

Stefan Karlsson stefank at openjdk.java.net
Wed Mar 23 10:52:14 UTC 2022


Loom requires specialized code for stackChunks objects when marking/copying objects. This adds extra checks for every visited object. The current implementation checks both the layout helper, then checks the _kind flag. I suggest that we reimplement this as a single check against the Klass::_id field.

This change would probably be a good cleanup for the mainline.

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

Commit messages:
 - Use single-condition instance type checks

Changes: https://git.openjdk.java.net/loom/pull/118/files
 Webrev: https://webrevs.openjdk.java.net/?repo=loom&pr=118&range=00
  Stats: 79 lines in 15 files changed: 4 ins; 33 del; 42 mod
  Patch: https://git.openjdk.java.net/loom/pull/118.diff
  Fetch: git fetch https://git.openjdk.java.net/loom pull/118/head:pull/118

PR: https://git.openjdk.java.net/loom/pull/118


More information about the loom-dev mailing list