| 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/flow_graph_builder.h" | 9 #include "vm/flow_graph_builder.h" |
| 10 #include "vm/flow_graph_compiler.h" | 10 #include "vm/flow_graph_compiler.h" |
| (...skipping 4534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4545 SetValue(instr, non_constant_); | 4545 SetValue(instr, non_constant_); |
| 4546 return; | 4546 return; |
| 4547 } | 4547 } |
| 4548 if (IsConstant(object)) { | 4548 if (IsConstant(object)) { |
| 4549 const intptr_t len = instr->type_arguments().Length(); | 4549 const intptr_t len = instr->type_arguments().Length(); |
| 4550 if (instr->type_arguments().IsRawInstantiatedRaw(len) && | 4550 if (instr->type_arguments().IsRawInstantiatedRaw(len) && |
| 4551 object.IsNull()) { | 4551 object.IsNull()) { |
| 4552 SetValue(instr, object); | 4552 SetValue(instr, object); |
| 4553 return; | 4553 return; |
| 4554 } | 4554 } |
| 4555 if (instr->type_arguments().IsUninstantiatedIdentity() && | 4555 if (instr->type_arguments().IsUninstantiatedIdentity()) { |
| 4556 !object.IsNull() && | |
| 4557 object.IsTypeArguments() && | |
| 4558 (TypeArguments::Cast(object).Length() == len)) { | |
| 4559 SetValue(instr, object); | 4556 SetValue(instr, object); |
| 4560 return; | 4557 return; |
| 4561 } | 4558 } |
| 4562 SetValue(instr, non_constant_); | 4559 SetValue(instr, non_constant_); |
| 4563 } | 4560 } |
| 4564 } | 4561 } |
| 4565 | 4562 |
| 4566 | 4563 |
| 4567 void ConstantPropagator::VisitExtractConstructorTypeArguments( | 4564 void ConstantPropagator::VisitExtractConstructorTypeArguments( |
| 4568 ExtractConstructorTypeArgumentsInstr* instr) { | 4565 ExtractConstructorTypeArgumentsInstr* instr) { |
| (...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5382 if (changed) { | 5379 if (changed) { |
| 5383 // We may have changed the block order and the dominator tree. | 5380 // We may have changed the block order and the dominator tree. |
| 5384 flow_graph->DiscoverBlocks(); | 5381 flow_graph->DiscoverBlocks(); |
| 5385 GrowableArray<BitVector*> dominance_frontier; | 5382 GrowableArray<BitVector*> dominance_frontier; |
| 5386 flow_graph->ComputeDominators(&dominance_frontier); | 5383 flow_graph->ComputeDominators(&dominance_frontier); |
| 5387 } | 5384 } |
| 5388 } | 5385 } |
| 5389 | 5386 |
| 5390 | 5387 |
| 5391 } // namespace dart | 5388 } // namespace dart |
| OLD | NEW |