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 <limits> | 5 #include <limits> |
6 | 6 |
7 #include "src/v8.h" | 7 #include "src/v8.h" |
8 #include "test/cctest/cctest.h" | 8 #include "test/cctest/cctest.h" |
9 #include "test/cctest/compiler/graph-builder-tester.h" | 9 #include "test/cctest/compiler/graph-builder-tester.h" |
10 | 10 |
11 #include "src/compiler/node-matchers.h" | 11 #include "src/compiler/node-matchers.h" |
12 #include "src/compiler/representation-change.h" | 12 #include "src/compiler/representation-change.h" |
13 #include "src/compiler/typer.h" | |
14 | 13 |
15 using namespace v8::internal; | 14 using namespace v8::internal; |
16 using namespace v8::internal::compiler; | 15 using namespace v8::internal::compiler; |
17 | 16 |
18 namespace v8 { // for friendiness. | 17 namespace v8 { // for friendiness. |
19 namespace internal { | 18 namespace internal { |
20 namespace compiler { | 19 namespace compiler { |
21 | 20 |
22 class RepresentationChangerTester : public HandleAndZoneScope, | 21 class RepresentationChangerTester : public HandleAndZoneScope, |
23 public GraphAndBuilders { | 22 public GraphAndBuilders { |
24 public: | 23 public: |
25 explicit RepresentationChangerTester(int num_parameters = 0) | 24 explicit RepresentationChangerTester(int num_parameters = 0) |
26 : GraphAndBuilders(main_zone()), | 25 : GraphAndBuilders(main_zone()), |
27 typer_(main_zone()), | 26 jsgraph_(main_graph_, &main_common_), |
28 jsgraph_(main_graph_, &main_common_, &typer_), | |
29 changer_(&jsgraph_, &main_simplified_, &main_machine_, main_isolate()) { | 27 changer_(&jsgraph_, &main_simplified_, &main_machine_, main_isolate()) { |
30 Node* s = graph()->NewNode(common()->Start(num_parameters)); | 28 Node* s = graph()->NewNode(common()->Start(num_parameters)); |
31 graph()->SetStart(s); | 29 graph()->SetStart(s); |
32 } | 30 } |
33 | 31 |
34 Typer typer_; | |
35 JSGraph jsgraph_; | 32 JSGraph jsgraph_; |
36 RepresentationChanger changer_; | 33 RepresentationChanger changer_; |
37 | 34 |
38 Isolate* isolate() { return main_isolate(); } | 35 Isolate* isolate() { return main_isolate(); } |
39 Graph* graph() { return main_graph_; } | 36 Graph* graph() { return main_graph_; } |
40 CommonOperatorBuilder* common() { return &main_common_; } | 37 CommonOperatorBuilder* common() { return &main_common_; } |
41 JSGraph* jsgraph() { return &jsgraph_; } | 38 JSGraph* jsgraph() { return &jsgraph_; } |
42 RepresentationChanger* changer() { return &changer_; } | 39 RepresentationChanger* changer() { return &changer_; } |
43 | 40 |
44 // TODO(titzer): use ValueChecker / ValueUtil | 41 // TODO(titzer): use ValueChecker / ValueUtil |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 // rW64 | 291 // rW64 |
295 // tIrW64 | 292 // tIrW64 |
296 // tUrW64 | 293 // tUrW64 |
297 // rF64 | 294 // rF64 |
298 // tIrF64 | 295 // tIrF64 |
299 // tUrF64 | 296 // tUrF64 |
300 // tArF64 | 297 // tArF64 |
301 // rT | 298 // rT |
302 // tArT | 299 // tArT |
303 } | 300 } |
OLD | NEW |