RFR: 8160748: Inconsistent types for ideal_reg

Kim Barrett kim.barrett at oracle.com
Fri Apr 7 04:48:46 UTC 2017


Please review this change to Type's ideal_reg to make its return type
consistent with the closely related Node::ideal_reg().  Where Type
used to be an int, it is now a uint.  This eliminates the implicit
narrowing conversion in the initialization of _type_info that caused
build failure for C++11 (gcc with -std=gnu++11 or (not tested, but
presumed fixed) Visual Studio 2015 or later).

Also fixed a number of places where the result of Node::ideal_reg()
was being treated as int rather than uint.

And since I was in the neighborhood (changing the type of
Type::TypeInfo::ideal_reg), also fixed Type::_type_info[] to be const
as apparently intended but not successfully accomplished.  (The msg
member was writable, forcing allocation of the array to be in writable
memory, rather than read-only.)

CR:
https://bugs.openjdk.java.net/browse/JDK-8160748

Webrev:
http://cr.openjdk.java.net/~kbarrett/8160748/hotspot.00/

Testing:
JPRT, rbt hs-tier2,hs-tier3,hs-tier4-comp,hs-tier5-comp



More information about the hotspot-compiler-dev mailing list