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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 ? &optimized_block_order_ | 93 ? &optimized_block_order_ |
94 : &reverse_postorder_; | 94 : &reverse_postorder_; |
95 } | 95 } |
96 | 96 |
97 | 97 |
98 ConstantInstr* FlowGraph::GetConstant(const Object& object) { | 98 ConstantInstr* FlowGraph::GetConstant(const Object& object) { |
99 ConstantInstr* constant = constant_instr_pool_.Lookup(object); | 99 ConstantInstr* constant = constant_instr_pool_.Lookup(object); |
100 if (constant == NULL) { | 100 if (constant == NULL) { |
101 // Otherwise, allocate and add it to the pool. | 101 // Otherwise, allocate and add it to the pool. |
102 constant = new(zone()) ConstantInstr( | 102 constant = new(zone()) ConstantInstr( |
103 Object::ZoneHandle(isolate(), object.raw())); | 103 Object::ZoneHandle(zone(), object.raw())); |
104 constant->set_ssa_temp_index(alloc_ssa_temp_index()); | 104 constant->set_ssa_temp_index(alloc_ssa_temp_index()); |
105 | 105 |
106 AddToInitialDefinitions(constant); | 106 AddToInitialDefinitions(constant); |
107 constant_instr_pool_.Insert(constant); | 107 constant_instr_pool_.Insert(constant); |
108 } | 108 } |
109 return constant; | 109 return constant; |
110 } | 110 } |
111 | 111 |
112 | 112 |
113 void FlowGraph::AddToInitialDefinitions(Definition* defn) { | 113 void FlowGraph::AddToInitialDefinitions(Definition* defn) { |
(...skipping 1274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1388 } | 1388 } |
1389 | 1389 |
1390 | 1390 |
1391 bool BlockEffects::IsSideEffectFreePath(BlockEntryInstr* from, | 1391 bool BlockEffects::IsSideEffectFreePath(BlockEntryInstr* from, |
1392 BlockEntryInstr* to) const { | 1392 BlockEntryInstr* to) const { |
1393 return available_at_[to->postorder_number()]->Contains( | 1393 return available_at_[to->postorder_number()]->Contains( |
1394 from->postorder_number()); | 1394 from->postorder_number()); |
1395 } | 1395 } |
1396 | 1396 |
1397 } // namespace dart | 1397 } // namespace dart |
OLD | NEW |