| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_COMPILER_NODE_MATCHERS_H_ | 5 #ifndef V8_COMPILER_NODE_MATCHERS_H_ |
| 6 #define V8_COMPILER_NODE_MATCHERS_H_ | 6 #define V8_COMPILER_NODE_MATCHERS_H_ |
| 7 | 7 |
| 8 #include "src/compiler/node.h" | 8 #include "src/compiler/node.h" |
| 9 #include "src/compiler/operator.h" | 9 #include "src/compiler/operator.h" |
| 10 #include "src/unique.h" | 10 #include "src/unique.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 has_value_ = true; | 108 has_value_ = true; |
| 109 value_ = OpParameter<float>(node); | 109 value_ = OpParameter<float>(node); |
| 110 break; | 110 break; |
| 111 case IrOpcode::kFloat64Constant: | 111 case IrOpcode::kFloat64Constant: |
| 112 case IrOpcode::kNumberConstant: | 112 case IrOpcode::kNumberConstant: |
| 113 has_value_ = true; | 113 has_value_ = true; |
| 114 value_ = OpParameter<double>(node); | 114 value_ = OpParameter<double>(node); |
| 115 break; | 115 break; |
| 116 default: | 116 default: |
| 117 has_value_ = false; | 117 has_value_ = false; |
| 118 value_ = 0; // Make the compiler happy. |
| 118 break; | 119 break; |
| 119 } | 120 } |
| 120 } | 121 } |
| 121 | 122 |
| 122 bool HasValue() const { return has_value_; } | 123 bool HasValue() const { return has_value_; } |
| 123 double Value() const { | 124 double Value() const { |
| 124 DCHECK(HasValue()); | 125 DCHECK(HasValue()); |
| 125 return value_; | 126 return value_; |
| 126 } | 127 } |
| 127 | 128 |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 int power_; | 256 int power_; |
| 256 int displacement_; | 257 int displacement_; |
| 257 }; | 258 }; |
| 258 | 259 |
| 259 | 260 |
| 260 } // namespace compiler | 261 } // namespace compiler |
| 261 } // namespace internal | 262 } // namespace internal |
| 262 } // namespace v8 | 263 } // namespace v8 |
| 263 | 264 |
| 264 #endif // V8_COMPILER_NODE_MATCHERS_H_ | 265 #endif // V8_COMPILER_NODE_MATCHERS_H_ |
| OLD | NEW |