OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/flow_graph.h" | 5 #include "vm/flow_graph.h" |
6 | 6 |
7 #include "vm/bit_vector.h" | 7 #include "vm/bit_vector.h" |
8 #include "vm/flow_graph_builder.h" | 8 #include "vm/flow_graph_builder.h" |
9 #include "vm/il_printer.h" | 9 #include "vm/il_printer.h" |
10 #include "vm/intermediate_language.h" | 10 #include "vm/intermediate_language.h" |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 | 178 |
179 private: | 179 private: |
180 BlockEntryInstr* block_; | 180 BlockEntryInstr* block_; |
181 intptr_t next_successor_ix_; | 181 intptr_t next_successor_ix_; |
182 | 182 |
183 DISALLOW_ALLOCATION(); | 183 DISALLOW_ALLOCATION(); |
184 }; | 184 }; |
185 | 185 |
186 | 186 |
187 void FlowGraph::DiscoverBlocks() { | 187 void FlowGraph::DiscoverBlocks() { |
188 StackZone zone(isolate()); | 188 StackZone zone(thread()); |
189 | 189 |
190 // Initialize state. | 190 // Initialize state. |
191 preorder_.Clear(); | 191 preorder_.Clear(); |
192 postorder_.Clear(); | 192 postorder_.Clear(); |
193 reverse_postorder_.Clear(); | 193 reverse_postorder_.Clear(); |
194 parent_.Clear(); | 194 parent_.Clear(); |
195 | 195 |
196 GrowableArray<BlockTraversalState> block_stack; | 196 GrowableArray<BlockTraversalState> block_stack; |
197 graph_entry_->DiscoverBlock(NULL, &preorder_, &parent_); | 197 graph_entry_->DiscoverBlock(NULL, &preorder_, &parent_); |
198 block_stack.Add(BlockTraversalState(graph_entry_)); | 198 block_stack.Add(BlockTraversalState(graph_entry_)); |
(...skipping 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1390 } | 1390 } |
1391 | 1391 |
1392 | 1392 |
1393 bool BlockEffects::IsSideEffectFreePath(BlockEntryInstr* from, | 1393 bool BlockEffects::IsSideEffectFreePath(BlockEntryInstr* from, |
1394 BlockEntryInstr* to) const { | 1394 BlockEntryInstr* to) const { |
1395 return available_at_[to->postorder_number()]->Contains( | 1395 return available_at_[to->postorder_number()]->Contains( |
1396 from->postorder_number()); | 1396 from->postorder_number()); |
1397 } | 1397 } |
1398 | 1398 |
1399 } // namespace dart | 1399 } // namespace dart |
OLD | NEW |