[lworld] RFR: 8283573: [lworld] Make Object an abstract class

David Simms dsimms at openjdk.java.net
Fri Mar 25 14:03:16 UTC 2022


On Thu, 13 Jan 2022 20:22:37 GMT, Frederic Parain <fparain at openjdk.org> wrote:

> 8283573: [lworld] Make Object an abstract class

The pattern:

`if (ik == vmClasses::Object_klass() && vmClasses::Object_klass()->is_abstract()) {
  ik = vmClasses::Identity_klass();
}`

Keep repeating itself, could this be an inline method somewhere, maybe `valhalla_check_replace_object_identity()` (i.e. self documenting)

src/hotspot/share/c1/c1_GraphBuilder.cpp line 2541:

> 2539:   assert(klass->is_instance_klass(), "must be an instance klass");
> 2540:   ciKlass* ik = klass;
> 2541:   if (ik == compilation()->env()->Object_klass() && compilation()->env()->Object_klass()->is_abstract()) {

Does adding if EnableValhalla as the first condition, or a "// Valhalla" comment, make this clearer ? There are a few places in the change set with the same review comment, but I won't repeat.

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

PR: https://git.openjdk.java.net/valhalla/pull/602



More information about the valhalla-dev mailing list