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 <cmath> | 8 #include <cmath> |
9 | 9 |
10 // TODO(turbofan): Move ExternalReference out of assembler.h | 10 // TODO(turbofan): Move ExternalReference out of assembler.h |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 | 246 |
247 typedef BinopMatcher<Int32Matcher, Int32Matcher> Int32BinopMatcher; | 247 typedef BinopMatcher<Int32Matcher, Int32Matcher> Int32BinopMatcher; |
248 typedef BinopMatcher<Uint32Matcher, Uint32Matcher> Uint32BinopMatcher; | 248 typedef BinopMatcher<Uint32Matcher, Uint32Matcher> Uint32BinopMatcher; |
249 typedef BinopMatcher<Int64Matcher, Int64Matcher> Int64BinopMatcher; | 249 typedef BinopMatcher<Int64Matcher, Int64Matcher> Int64BinopMatcher; |
250 typedef BinopMatcher<Uint64Matcher, Uint64Matcher> Uint64BinopMatcher; | 250 typedef BinopMatcher<Uint64Matcher, Uint64Matcher> Uint64BinopMatcher; |
251 typedef BinopMatcher<IntPtrMatcher, IntPtrMatcher> IntPtrBinopMatcher; | 251 typedef BinopMatcher<IntPtrMatcher, IntPtrMatcher> IntPtrBinopMatcher; |
252 typedef BinopMatcher<UintPtrMatcher, UintPtrMatcher> UintPtrBinopMatcher; | 252 typedef BinopMatcher<UintPtrMatcher, UintPtrMatcher> UintPtrBinopMatcher; |
253 typedef BinopMatcher<Float32Matcher, Float32Matcher> Float32BinopMatcher; | 253 typedef BinopMatcher<Float32Matcher, Float32Matcher> Float32BinopMatcher; |
254 typedef BinopMatcher<Float64Matcher, Float64Matcher> Float64BinopMatcher; | 254 typedef BinopMatcher<Float64Matcher, Float64Matcher> Float64BinopMatcher; |
255 typedef BinopMatcher<NumberMatcher, NumberMatcher> NumberBinopMatcher; | 255 typedef BinopMatcher<NumberMatcher, NumberMatcher> NumberBinopMatcher; |
256 | 256 typedef BinopMatcher<HeapObjectMatcher, HeapObjectMatcher> |
| 257 HeapObjectBinopMatcher; |
257 | 258 |
258 template <class BinopMatcher, IrOpcode::Value kMulOpcode, | 259 template <class BinopMatcher, IrOpcode::Value kMulOpcode, |
259 IrOpcode::Value kShiftOpcode> | 260 IrOpcode::Value kShiftOpcode> |
260 struct ScaleMatcher { | 261 struct ScaleMatcher { |
261 explicit ScaleMatcher(Node* node, bool allow_power_of_two_plus_one = false) | 262 explicit ScaleMatcher(Node* node, bool allow_power_of_two_plus_one = false) |
262 : scale_(-1), power_of_two_plus_one_(false) { | 263 : scale_(-1), power_of_two_plus_one_(false) { |
263 if (node->InputCount() < 2) return; | 264 if (node->InputCount() < 2) return; |
264 BinopMatcher m(node); | 265 BinopMatcher m(node); |
265 if (node->opcode() == kShiftOpcode) { | 266 if (node->opcode() == kShiftOpcode) { |
266 if (m.right().HasValue()) { | 267 if (m.right().HasValue()) { |
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 Node* branch_; | 609 Node* branch_; |
609 Node* if_true_; | 610 Node* if_true_; |
610 Node* if_false_; | 611 Node* if_false_; |
611 }; | 612 }; |
612 | 613 |
613 } // namespace compiler | 614 } // namespace compiler |
614 } // namespace internal | 615 } // namespace internal |
615 } // namespace v8 | 616 } // namespace v8 |
616 | 617 |
617 #endif // V8_COMPILER_NODE_MATCHERS_H_ | 618 #endif // V8_COMPILER_NODE_MATCHERS_H_ |
OLD | NEW |