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/v8.h" | 5 #include "src/v8.h" |
6 #include "test/cctest/cctest.h" | 6 #include "test/cctest/cctest.h" |
7 | 7 |
8 #include "src/compiler/graph-inl.h" | 8 #include "src/compiler/graph-inl.h" |
9 #include "src/compiler/js-typed-lowering.h" | 9 #include "src/compiler/js-typed-lowering.h" |
10 #include "src/compiler/node-properties-inl.h" | 10 #include "src/compiler/node-properties-inl.h" |
11 #include "src/compiler/opcodes.h" | 11 #include "src/compiler/opcodes.h" |
12 #include "src/compiler/typer.h" | 12 #include "src/compiler/typer.h" |
13 | 13 |
14 using namespace v8::internal; | 14 using namespace v8::internal; |
15 using namespace v8::internal::compiler; | 15 using namespace v8::internal::compiler; |
16 | 16 |
17 class JSTypedLoweringTester : public HandleAndZoneScope { | 17 class JSTypedLoweringTester : public HandleAndZoneScope { |
18 public: | 18 public: |
19 explicit JSTypedLoweringTester(int num_parameters = 0) | 19 explicit JSTypedLoweringTester(int num_parameters = 0) |
20 : isolate(main_isolate()), | 20 : isolate(main_isolate()), |
21 binop(NULL), | 21 binop(NULL), |
22 unop(NULL), | 22 unop(NULL), |
23 javascript(main_zone()), | 23 javascript(main_zone()), |
24 machine(main_zone()), | |
25 simplified(main_zone()), | 24 simplified(main_zone()), |
26 common(main_zone()), | 25 common(main_zone()), |
27 graph(main_zone()), | 26 graph(main_zone()), |
28 typer(main_zone()), | 27 typer(main_zone()), |
29 context_node(NULL) { | 28 context_node(NULL) { |
30 typer.DecorateGraph(&graph); | 29 typer.DecorateGraph(&graph); |
31 Node* s = graph.NewNode(common.Start(num_parameters)); | 30 Node* s = graph.NewNode(common.Start(num_parameters)); |
32 graph.SetStart(s); | 31 graph.SetStart(s); |
33 } | 32 } |
34 | 33 |
(...skipping 1309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1344 CHECK_EQ(p1, r->InputAt(0)); | 1343 CHECK_EQ(p1, r->InputAt(0)); |
1345 CHECK_EQ(p0, r->InputAt(1)); | 1344 CHECK_EQ(p0, r->InputAt(1)); |
1346 } else { | 1345 } else { |
1347 CHECK_EQ(p0, r->InputAt(0)); | 1346 CHECK_EQ(p0, r->InputAt(0)); |
1348 CHECK_EQ(p1, r->InputAt(1)); | 1347 CHECK_EQ(p1, r->InputAt(1)); |
1349 } | 1348 } |
1350 } | 1349 } |
1351 } | 1350 } |
1352 } | 1351 } |
1353 } | 1352 } |
OLD | NEW |