Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/hotspot/share/opto/convertnode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ class ConvL2INode : public ConvertNode {
// Reinterpret Short to Half Float
class ReinterpretS2HFNode : public Node {
public:
ReinterpretS2HFNode(Node* in1) : Node(0, in1) {}
ReinterpretS2HFNode(Node* in1) : Node(nullptr, in1) {}
virtual int Opcode() const;
virtual const Type* bottom_type() const { return Type::HALF_FLOAT; }
virtual const Type* Value(PhaseGVN* phase) const;
Expand All @@ -231,7 +231,7 @@ class ReinterpretS2HFNode : public Node {
// Reinterpret Half Float to Short
class ReinterpretHF2SNode : public Node {
public:
ReinterpretHF2SNode(Node* in1) : Node(0, in1) {}
ReinterpretHF2SNode(Node* in1) : Node(nullptr, in1) {}
virtual int Opcode() const;
virtual const Type* Value(PhaseGVN* phase) const;
virtual const Type* bottom_type() const { return TypeInt::SHORT; }
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/opto/divnode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@ const Type* DivHFNode::Value(PhaseGVN* phase) const {
return Type::HALF_FLOAT;
}

//------------------------------isA_Copy---------------------------------------
//-----------------------------------------------------------------------------
// Dividing by self is 1.
// IF the divisor is 1, we are an identity on the dividend.
Node* DivHFNode::Identity(PhaseGVN* phase) {
Expand Down
20 changes: 10 additions & 10 deletions src/hotspot/share/opto/type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1099,28 +1099,28 @@ const Type *Type::xmeet( const Type *t ) const {
return Type::BOTTOM;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use curly-braces even for single-line ifs


case FloatTop:
if (_base == FloatTop ) return this;
if (_base == FloatTop ) { return this; }
case FloatBot: // Float
if (_base == FloatBot || _base == FloatTop) return FLOAT;
if (_base == HalfFloatTop || _base == HalfFloatBot) return Type::BOTTOM;
if (_base == DoubleTop || _base == DoubleBot) return Type::BOTTOM;
if (_base == FloatBot || _base == FloatTop) { return FLOAT; }
if (_base == HalfFloatTop || _base == HalfFloatBot) { return Type::BOTTOM; }
if (_base == DoubleTop || _base == DoubleBot) { return Type::BOTTOM; }
typerr(t);
return Type::BOTTOM;

case DoubleTop:
if (_base == DoubleTop) return this;
if (_base == DoubleTop) { return this; }
case DoubleBot: // Double
if (_base == DoubleBot || _base == DoubleTop) return DOUBLE;
if (_base == HalfFloatTop || _base == HalfFloatBot) return Type::BOTTOM;
if (_base == FloatTop || _base == FloatBot) return Type::BOTTOM;
if (_base == DoubleBot || _base == DoubleTop) { return DOUBLE; }
if (_base == HalfFloatTop || _base == HalfFloatBot) { return Type::BOTTOM; }
if (_base == FloatTop || _base == FloatBot) { return Type::BOTTOM; }
typerr(t);
return Type::BOTTOM;

// These next few cases must match exactly or it is a compile-time error.
case Control: // Control of code
case Abio: // State of world outside of program
case Memory:
if (_base == t->_base) return this;
if (_base == t->_base) { return this; }
typerr(t);
return Type::BOTTOM;

Expand Down Expand Up @@ -1467,7 +1467,7 @@ const TypeH* TypeH::make(float f) {
return (TypeH*)(new TypeH(hf))->hashcons();
}

//------------------------------meet-------------------------------------------
//------------------------------xmeet-------------------------------------------
// Compute the MEET of two types. It returns a new Type object.
const Type* TypeH::xmeet(const Type* t) const {
// Perform a fast test for common case; meeting the same types together.
Expand Down