Chromium Code Reviews| Index: src/compiler/node-matchers.h |
| diff --git a/src/compiler/node-matchers.h b/src/compiler/node-matchers.h |
| index ebb772210cd6e2ad6db6ed668b14c2010b1d3287..a1d8b343fa923381d5878868afa3a94d6eb6017a 100644 |
| --- a/src/compiler/node-matchers.h |
| +++ b/src/compiler/node-matchers.h |
| @@ -104,6 +104,9 @@ template <typename T, IrOpcode::Value kOpcode> |
| struct FloatMatcher FINAL : public ValueMatcher<T, kOpcode> { |
| explicit FloatMatcher(Node* node) : ValueMatcher<T, kOpcode>(node) {} |
| + bool IsMinusZero() const { |
| + return this->Is(0.0) && std::signbit(this->Value()); |
|
Sven Panne
2014/11/26 09:48:33
std::signbit is a C++11 library feature, plain sig
Benedikt Meurer
2014/11/26 10:47:19
Done.
|
| + } |
| bool IsNaN() const { return this->HasValue() && std::isnan(this->Value()); } |
| }; |
| @@ -167,6 +170,7 @@ typedef BinopMatcher<UintPtrMatcher, UintPtrMatcher> UintPtrBinopMatcher; |
| typedef BinopMatcher<Float64Matcher, Float64Matcher> Float64BinopMatcher; |
| typedef BinopMatcher<NumberMatcher, NumberMatcher> NumberBinopMatcher; |
| + |
| template <class BinopMatcher, IrOpcode::Value kAddOpcode, |
| IrOpcode::Value kMulOpcode, IrOpcode::Value kShiftOpcode> |
| struct AddMatcher : public BinopMatcher { |