OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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_optimizer.h" | 5 #include "vm/flow_graph_optimizer.h" |
6 | 6 |
7 #include "vm/bit_vector.h" | 7 #include "vm/bit_vector.h" |
8 #include "vm/cha.h" | 8 #include "vm/cha.h" |
9 #include "vm/cpu.h" | 9 #include "vm/cpu.h" |
10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
(...skipping 7245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7256 SetValue(instr, non_constant_); | 7256 SetValue(instr, non_constant_); |
7257 } | 7257 } |
7258 } | 7258 } |
7259 | 7259 |
7260 | 7260 |
7261 void ConstantPropagator::VisitCreateArray(CreateArrayInstr* instr) { | 7261 void ConstantPropagator::VisitCreateArray(CreateArrayInstr* instr) { |
7262 SetValue(instr, non_constant_); | 7262 SetValue(instr, non_constant_); |
7263 } | 7263 } |
7264 | 7264 |
7265 | 7265 |
7266 void ConstantPropagator::VisitCreateClosure(CreateClosureInstr* instr) { | |
7267 // TODO(kmillikin): Treat closures as constants. | |
7268 SetValue(instr, non_constant_); | |
7269 } | |
7270 | |
7271 | |
7272 void ConstantPropagator::VisitAllocateObject(AllocateObjectInstr* instr) { | 7266 void ConstantPropagator::VisitAllocateObject(AllocateObjectInstr* instr) { |
7273 SetValue(instr, non_constant_); | 7267 SetValue(instr, non_constant_); |
7274 } | 7268 } |
7275 | 7269 |
7276 | 7270 |
7277 void ConstantPropagator::VisitLoadUntagged(LoadUntaggedInstr* instr) { | 7271 void ConstantPropagator::VisitLoadUntagged(LoadUntaggedInstr* instr) { |
7278 SetValue(instr, non_constant_); | 7272 SetValue(instr, non_constant_); |
7279 } | 7273 } |
7280 | 7274 |
7281 | 7275 |
(...skipping 1363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8645 } | 8639 } |
8646 | 8640 |
8647 // Insert materializations at environment uses. | 8641 // Insert materializations at environment uses. |
8648 for (intptr_t i = 0; i < exits.length(); i++) { | 8642 for (intptr_t i = 0; i < exits.length(); i++) { |
8649 CreateMaterializationAt(exits[i], alloc, alloc->cls(), *fields); | 8643 CreateMaterializationAt(exits[i], alloc, alloc->cls(), *fields); |
8650 } | 8644 } |
8651 } | 8645 } |
8652 | 8646 |
8653 | 8647 |
8654 } // namespace dart | 8648 } // namespace dart |
OLD | NEW |