| 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/access-builder.h" | 5 #include "src/compiler/access-builder.h" |
| 6 #include "src/compiler/common-operator.h" | 6 #include "src/compiler/common-operator.h" |
| 7 #include "src/compiler/graph.h" | 7 #include "src/compiler/graph.h" |
| 8 #include "src/compiler/graph-visualizer.h" | 8 #include "src/compiler/graph-visualizer.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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 end->ReplaceInput(0, ret); | 120 end->ReplaceInput(0, ret); |
| 121 return ret; | 121 return ret; |
| 122 } | 122 } |
| 123 | 123 |
| 124 LoopTree* GetLoopTree() { | 124 LoopTree* GetLoopTree() { |
| 125 if (loop_tree == NULL) { | 125 if (loop_tree == NULL) { |
| 126 if (FLAG_trace_turbo_graph) { | 126 if (FLAG_trace_turbo_graph) { |
| 127 OFStream os(stdout); | 127 OFStream os(stdout); |
| 128 os << AsRPO(graph); | 128 os << AsRPO(graph); |
| 129 } | 129 } |
| 130 Zone zone; | 130 Zone zone(main_isolate()->allocator()); |
| 131 loop_tree = LoopFinder::BuildLoopTree(&graph, &zone); | 131 loop_tree = LoopFinder::BuildLoopTree(&graph, &zone); |
| 132 } | 132 } |
| 133 return loop_tree; | 133 return loop_tree; |
| 134 } | 134 } |
| 135 | 135 |
| 136 void CheckLoop(Node** header, int header_count, Node** body, int body_count) { | 136 void CheckLoop(Node** header, int header_count, Node** body, int body_count) { |
| 137 LoopTree* tree = GetLoopTree(); | 137 LoopTree* tree = GetLoopTree(); |
| 138 LoopTree::Loop* loop = tree->ContainingLoop(header[0]); | 138 LoopTree::Loop* loop = tree->ContainingLoop(header[0]); |
| 139 CHECK(loop); | 139 CHECK(loop); |
| 140 | 140 |
| (...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1014 TEST(LaManyNested_62) { RunManyNestedLoops_i(62); } | 1014 TEST(LaManyNested_62) { RunManyNestedLoops_i(62); } |
| 1015 TEST(LaManyNested_63) { RunManyNestedLoops_i(63); } | 1015 TEST(LaManyNested_63) { RunManyNestedLoops_i(63); } |
| 1016 TEST(LaManyNested_64) { RunManyNestedLoops_i(64); } | 1016 TEST(LaManyNested_64) { RunManyNestedLoops_i(64); } |
| 1017 | 1017 |
| 1018 | 1018 |
| 1019 TEST(LaPhiTangle) { LoopFinderTester t; } | 1019 TEST(LaPhiTangle) { LoopFinderTester t; } |
| 1020 | 1020 |
| 1021 } // namespace compiler | 1021 } // namespace compiler |
| 1022 } // namespace internal | 1022 } // namespace internal |
| 1023 } // namespace v8 | 1023 } // namespace v8 |
| OLD | NEW |