RFR (L) JDK-8230505: Replace JVM type comparisons to T_OBJECT and T_ARRAY with call to is_reference_type
John Rose
john.r.rose at oracle.com
Wed Sep 11 20:06:01 UTC 2019
On Sep 11, 2019, at 11:55 AM, Lois Foltan <lois.foltan at oracle.com> wrote:
>
> Thanks Coleen for the review. I too share your concern about calling is_reference_type in the default label of the case statement, however I plan to leave as-is because it does allow for future reference types like potentially valhalla inline types.
This function was introduced as an alternative to editing many switch statements when a new type of reference is introduced in Valhalla. So even though the fix disrupts the clarity of some switches, it’s belongs as part of this change.
The other uses are also helpful, and would have prevented a number of historical bugs (of the form “I forget T_ARRAY”) if we had adopted the practice from the first. Maybe that’s another reason to look at the switches as something to change rather than keep.
— John
More information about the hotspot-dev
mailing list