OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/codegen.h" | 5 #include "src/codegen.h" |
6 #include "src/compiler/common-operator.h" | 6 #include "src/compiler/common-operator.h" |
7 #include "src/compiler/diamond.h" | 7 #include "src/compiler/diamond.h" |
8 #include "src/compiler/graph.h" | 8 #include "src/compiler/graph.h" |
9 #include "src/compiler/js-graph.h" | 9 #include "src/compiler/js-graph.h" |
10 #include "src/compiler/js-operator.h" | 10 #include "src/compiler/js-operator.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 | 38 |
39 | 39 |
40 static const int kMaxOsrValues = 10; | 40 static const int kMaxOsrValues = 10; |
41 | 41 |
42 class OsrDeconstructorTester : public HandleAndZoneScope { | 42 class OsrDeconstructorTester : public HandleAndZoneScope { |
43 public: | 43 public: |
44 explicit OsrDeconstructorTester(int num_values) | 44 explicit OsrDeconstructorTester(int num_values) |
45 : isolate(main_isolate()), | 45 : isolate(main_isolate()), |
46 common(main_zone()), | 46 common(main_zone()), |
47 graph(main_zone()), | 47 graph(main_zone()), |
48 jsgraph(&graph, &common, NULL, NULL), | 48 jsgraph(main_isolate(), &graph, &common, NULL, NULL), |
49 start(graph.NewNode(common.Start(1))), | 49 start(graph.NewNode(common.Start(1))), |
50 p0(graph.NewNode(common.Parameter(0), start)), | 50 p0(graph.NewNode(common.Parameter(0), start)), |
51 end(graph.NewNode(common.End(), start)), | 51 end(graph.NewNode(common.End(), start)), |
52 osr_normal_entry(graph.NewNode(common.OsrNormalEntry(), start)), | 52 osr_normal_entry(graph.NewNode(common.OsrNormalEntry(), start)), |
53 osr_loop_entry(graph.NewNode(common.OsrLoopEntry(), start)), | 53 osr_loop_entry(graph.NewNode(common.OsrLoopEntry(), start)), |
54 self(graph.NewNode(common.Int32Constant(0xaabbccdd))) { | 54 self(graph.NewNode(common.Int32Constant(0xaabbccdd))) { |
55 CHECK(num_values <= kMaxOsrValues); | 55 CHECK(num_values <= kMaxOsrValues); |
56 graph.SetStart(start); | 56 graph.SetStart(start); |
57 for (int i = 0; i < num_values; i++) { | 57 for (int i = 0; i < num_values; i++) { |
58 osr_values[i] = graph.NewNode(common.OsrValue(i), osr_loop_entry); | 58 osr_values[i] = graph.NewNode(common.OsrValue(i), osr_loop_entry); |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 CheckInputs(branch2, T.p0, if_true1); | 265 CheckInputs(branch2, T.p0, if_true1); |
266 CheckInputs(if_true1, branch1); | 266 CheckInputs(if_true1, branch1); |
267 CheckInputs(if_false1, branch1); | 267 CheckInputs(if_false1, branch1); |
268 CheckInputs(if_true2, branch2); | 268 CheckInputs(if_true2, branch2); |
269 CheckInputs(if_false2, branch2); | 269 CheckInputs(if_false2, branch2); |
270 | 270 |
271 CheckInputs(osr_phi, T.osr_values[0], T.jsgraph.ZeroConstant(), | 271 CheckInputs(osr_phi, T.osr_values[0], T.jsgraph.ZeroConstant(), |
272 T.jsgraph.ZeroConstant(), loop); | 272 T.jsgraph.ZeroConstant(), loop); |
273 CheckInputs(ret, osr_phi, T.start, if_false2); | 273 CheckInputs(ret, osr_phi, T.start, if_false2); |
274 } | 274 } |
OLD | NEW |