Description
In G1HeapRegionAttr, consider moving Humongous to -1, and moving NotInCSet further down (either trade with Humongous, or rotate all the negative states so NotInCSet is the lowest value. The point of moving Humongous is to change is_in_cset_or_humongous() from
is_in_cset() || is_humongous();
=>
(type() >= Young) || (type() == Humongous)
=>
(_type >= 0) || (_type == -2)
to
type() >= Humongous;
=>
_type >= -1
While we're at it, fix the comment describing the _type values, which currently says the test for being in the collection set or not uses `> NotInCSet`, which is no longer true. As ofJDK-8223693 we use `>= Young` and no longer have any range checks involving `NotInCSet`.
(Though it turns out is_in_cset_or_humongous isn't *super* critical, as it only seems to be used by closures used in reference processing.)
is_in_cset() || is_humongous();
=>
(type() >= Young) || (type() == Humongous)
=>
(_type >= 0) || (_type == -2)
to
type() >= Humongous;
=>
_type >= -1
While we're at it, fix the comment describing the _type values, which currently says the test for being in the collection set or not uses `> NotInCSet`, which is no longer true. As of
(Though it turns out is_in_cset_or_humongous isn't *super* critical, as it only seems to be used by closures used in reference processing.)