| 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/dart_entry.h" | 9 #include "vm/dart_entry.h" |
| 10 #include "vm/flow_graph_builder.h" | 10 #include "vm/flow_graph_builder.h" |
| (...skipping 5092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5103 } | 5103 } |
| 5104 } | 5104 } |
| 5105 } | 5105 } |
| 5106 | 5106 |
| 5107 void EnsureAliasingForIndexes() { | 5107 void EnsureAliasingForIndexes() { |
| 5108 BitVector* indexes = Get(Alias::Indexes()); | 5108 BitVector* indexes = Get(Alias::Indexes()); |
| 5109 if (indexes == NULL) { | 5109 if (indexes == NULL) { |
| 5110 return; | 5110 return; |
| 5111 } | 5111 } |
| 5112 | 5112 |
| 5113 // Constant indexes alias all non-constant indexes and non-constant | 5113 // Constant indexes alias all non-constant indexes. |
| 5114 // indexes alias all constant indexes. Ids start at 1. | 5114 // Non-constant indexes alias all constant indexes. |
| 5115 // First update alias set for const-indices, then |
| 5116 // update set for all indices. Ids start at 1. |
| 5115 for (intptr_t id = 1; id <= max_index_id_; id++) { | 5117 for (intptr_t id = 1; id <= max_index_id_; id++) { |
| 5116 BitVector* const_indexes = Get(Alias::ConstantIndex(id)); | 5118 BitVector* const_indexes = Get(Alias::ConstantIndex(id)); |
| 5117 if (const_indexes != NULL) { | 5119 if (const_indexes != NULL) { |
| 5118 const_indexes->AddAll(indexes); | 5120 const_indexes->AddAll(indexes); |
| 5121 } |
| 5122 } |
| 5123 |
| 5124 for (intptr_t id = 1; id <= max_index_id_; id++) { |
| 5125 BitVector* const_indexes = Get(Alias::ConstantIndex(id)); |
| 5126 if (const_indexes != NULL) { |
| 5119 indexes->AddAll(const_indexes); | 5127 indexes->AddAll(const_indexes); |
| 5120 } | 5128 } |
| 5121 } | 5129 } |
| 5122 } | 5130 } |
| 5123 | 5131 |
| 5124 void AddIdForAlias(const Alias alias, intptr_t place_id) { | 5132 void AddIdForAlias(const Alias alias, intptr_t place_id) { |
| 5125 const intptr_t idx = alias.ToIndex(); | 5133 const intptr_t idx = alias.ToIndex(); |
| 5126 while (sets_.length() <= idx) { | 5134 while (sets_.length() <= idx) { |
| 5127 sets_.Add(NULL); | 5135 sets_.Add(NULL); |
| 5128 } | 5136 } |
| (...skipping 3306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8435 } | 8443 } |
| 8436 | 8444 |
| 8437 // Insert materializations at environment uses. | 8445 // Insert materializations at environment uses. |
| 8438 for (intptr_t i = 0; i < exits.length(); i++) { | 8446 for (intptr_t i = 0; i < exits.length(); i++) { |
| 8439 CreateMaterializationAt(exits[i], alloc, alloc->cls(), *fields); | 8447 CreateMaterializationAt(exits[i], alloc, alloc->cls(), *fields); |
| 8440 } | 8448 } |
| 8441 } | 8449 } |
| 8442 | 8450 |
| 8443 | 8451 |
| 8444 } // namespace dart | 8452 } // namespace dart |
| OLD | NEW |