| 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 7229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7240 SetValue(instr, non_constant_); | 7240 SetValue(instr, non_constant_); |
| 7241 } | 7241 } |
| 7242 } | 7242 } |
| 7243 | 7243 |
| 7244 | 7244 |
| 7245 void ConstantPropagator::VisitCreateArray(CreateArrayInstr* instr) { | 7245 void ConstantPropagator::VisitCreateArray(CreateArrayInstr* instr) { |
| 7246 SetValue(instr, non_constant_); | 7246 SetValue(instr, non_constant_); |
| 7247 } | 7247 } |
| 7248 | 7248 |
| 7249 | 7249 |
| 7250 void ConstantPropagator::VisitCreateClosure(CreateClosureInstr* instr) { | |
| 7251 // TODO(kmillikin): Treat closures as constants. | |
| 7252 SetValue(instr, non_constant_); | |
| 7253 } | |
| 7254 | |
| 7255 | |
| 7256 void ConstantPropagator::VisitAllocateObject(AllocateObjectInstr* instr) { | 7250 void ConstantPropagator::VisitAllocateObject(AllocateObjectInstr* instr) { |
| 7257 SetValue(instr, non_constant_); | 7251 SetValue(instr, non_constant_); |
| 7258 } | 7252 } |
| 7259 | 7253 |
| 7260 | 7254 |
| 7261 void ConstantPropagator::VisitLoadUntagged(LoadUntaggedInstr* instr) { | 7255 void ConstantPropagator::VisitLoadUntagged(LoadUntaggedInstr* instr) { |
| 7262 SetValue(instr, non_constant_); | 7256 SetValue(instr, non_constant_); |
| 7263 } | 7257 } |
| 7264 | 7258 |
| 7265 | 7259 |
| (...skipping 1356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8622 } | 8616 } |
| 8623 | 8617 |
| 8624 // Insert materializations at environment uses. | 8618 // Insert materializations at environment uses. |
| 8625 for (intptr_t i = 0; i < exits.length(); i++) { | 8619 for (intptr_t i = 0; i < exits.length(); i++) { |
| 8626 CreateMaterializationAt(exits[i], alloc, alloc->cls(), *fields); | 8620 CreateMaterializationAt(exits[i], alloc, alloc->cls(), *fields); |
| 8627 } | 8621 } |
| 8628 } | 8622 } |
| 8629 | 8623 |
| 8630 | 8624 |
| 8631 } // namespace dart | 8625 } // namespace dart |
| OLD | NEW |