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 #include "src/compiler/common-operator.h" | 5 #include "src/compiler/common-operator.h" |
6 #include "src/compiler/graph.h" | 6 #include "src/compiler/graph.h" |
7 #include "src/compiler/machine-operator.h" | 7 #include "src/compiler/machine-operator.h" |
8 #include "src/compiler/node.h" | 8 #include "src/compiler/node.h" |
9 #include "src/compiler/node-matchers.h" | 9 #include "src/compiler/node-matchers.h" |
10 #include "src/compiler/opcodes.h" | 10 #include "src/compiler/opcodes.h" |
11 | 11 |
12 #include "test/unittests/compiler/graph-unittest.h" | 12 #include "test/unittests/compiler/graph-unittest.h" |
13 #include "test/unittests/test-utils.h" | 13 #include "test/unittests/test-utils.h" |
14 | 14 |
15 namespace v8 { | 15 namespace v8 { |
16 namespace internal { | 16 namespace internal { |
17 namespace compiler { | 17 namespace compiler { |
18 | 18 |
19 class NodeMatcherTest : public GraphTest { | 19 class NodeMatcherTest : public GraphTest { |
20 public: | 20 public: |
21 NodeMatcherTest() {} | 21 NodeMatcherTest() : machine_(zone()) {} |
22 virtual ~NodeMatcherTest() {} | 22 virtual ~NodeMatcherTest() {} |
23 | 23 |
24 MachineOperatorBuilder* machine() { return &machine_; } | 24 MachineOperatorBuilder* machine() { return &machine_; } |
25 | 25 |
26 private: | 26 private: |
27 MachineOperatorBuilder machine_; | 27 MachineOperatorBuilder machine_; |
28 }; | 28 }; |
29 | 29 |
30 namespace { | 30 namespace { |
31 | 31 |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 // S3 + (O0 + C0) -> [p1, 2, o0, c0] | 308 // S3 + (O0 + C0) -> [p1, 2, o0, c0] |
309 s3 = graph()->NewNode(s_op, p1, c3); | 309 s3 = graph()->NewNode(s_op, p1, c3); |
310 ScaledWithOffsetMatcher match43( | 310 ScaledWithOffsetMatcher match43( |
311 graph()->NewNode(a_op, s3, graph()->NewNode(a_op, o0, c0))); | 311 graph()->NewNode(a_op, s3, graph()->NewNode(a_op, o0, c0))); |
312 CheckScaledWithOffsetMatch(&match43, p1, 3, o0, c0); | 312 CheckScaledWithOffsetMatch(&match43, p1, 3, o0, c0); |
313 } | 313 } |
314 | 314 |
315 } // namespace compiler | 315 } // namespace compiler |
316 } // namespace internal | 316 } // namespace internal |
317 } // namespace v8 | 317 } // namespace v8 |
OLD | NEW |