8213416: Replace some enums with static const members in hotspot/compiler
Changes to fix enumeral and non-enumeral type in conditional expression warnings with -Wextra for gcc on hotspot Reviewed-by: kvn, thartmann
This commit is contained in:
parent
99a18f1249
commit
da85e43f56
@ -532,7 +532,11 @@ class CompileReplay : public StackObj {
|
||||
// old version w/o comp_level
|
||||
if (had_error() && (error_message() == comp_level_label)) {
|
||||
// use highest available tier
|
||||
comp_level = TieredCompilation ? TieredStopAtLevel : CompLevel_highest_tier;
|
||||
if (TieredCompilation) {
|
||||
comp_level = TieredStopAtLevel;
|
||||
} else {
|
||||
comp_level = CompLevel_highest_tier;
|
||||
}
|
||||
}
|
||||
if (!is_valid_comp_level(comp_level)) {
|
||||
return;
|
||||
|
@ -301,7 +301,14 @@ public:
|
||||
|
||||
// Bottom_type call; value comes from operand0
|
||||
virtual const class Type *bottom_type() const { return _opnds[0]->type(); }
|
||||
virtual uint ideal_reg() const { const Type *t = _opnds[0]->type(); return t == TypeInt::CC ? Op_RegFlags : t->ideal_reg(); }
|
||||
virtual uint ideal_reg() const {
|
||||
const Type *t = _opnds[0]->type();
|
||||
if (t == TypeInt::CC) {
|
||||
return Op_RegFlags;
|
||||
} else {
|
||||
return t->ideal_reg();
|
||||
}
|
||||
}
|
||||
|
||||
// If this is a memory op, return the base pointer and fixed offset.
|
||||
// If there are no such, return NULL. If there are multiple addresses
|
||||
|
@ -998,7 +998,7 @@ public:
|
||||
// the node is guaranteed never to compare equal to any other node.
|
||||
// If we accidentally generate a hash with value NO_HASH the node
|
||||
// won't go into the table and we'll lose a little optimization.
|
||||
enum { NO_HASH = 0 };
|
||||
static const uint NO_HASH = 0;
|
||||
virtual uint hash() const;
|
||||
virtual bool cmp( const Node &n ) const;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user