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 6098 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6109 InsertAlias(Place::CreateAnyInstanceAnyIndexAlias(isolate_, | 6109 InsertAlias(Place::CreateAnyInstanceAnyIndexAlias(isolate_, |
6110 kAnyInstanceAnyIndexAlias)); | 6110 kAnyInstanceAnyIndexAlias)); |
6111 for (intptr_t i = 0; i < places_.length(); i++) { | 6111 for (intptr_t i = 0; i < places_.length(); i++) { |
6112 AddRepresentative(places_[i]); | 6112 AddRepresentative(places_[i]); |
6113 } | 6113 } |
6114 ComputeKillSets(); | 6114 ComputeKillSets(); |
6115 } | 6115 } |
6116 | 6116 |
6117 intptr_t LookupAliasId(const Place& alias) { | 6117 intptr_t LookupAliasId(const Place& alias) { |
6118 const Place* result = aliases_map_.Lookup(&alias); | 6118 const Place* result = aliases_map_.Lookup(&alias); |
6119 return (result != NULL) ? result->id() : kNoAlias; | 6119 return (result != NULL) ? result->id() : static_cast<intptr_t>(kNoAlias); |
6120 } | 6120 } |
6121 | 6121 |
6122 bool IsStore(Instruction* instr, BitVector** killed) { | 6122 bool IsStore(Instruction* instr, BitVector** killed) { |
6123 bool is_load = false, is_store = false; | 6123 bool is_load = false, is_store = false; |
6124 Place place(instr, &is_load, &is_store); | 6124 Place place(instr, &is_load, &is_store); |
6125 if (is_store && (place.kind() != Place::kNone)) { | 6125 if (is_store && (place.kind() != Place::kNone)) { |
6126 const intptr_t alias_id = LookupAliasId(place.ToAlias()); | 6126 const intptr_t alias_id = LookupAliasId(place.ToAlias()); |
6127 if (alias_id != kNoAlias) { | 6127 if (alias_id != kNoAlias) { |
6128 *killed = GetKilledSet(alias_id); | 6128 *killed = GetKilledSet(alias_id); |
6129 } | 6129 } |
(...skipping 4287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10417 | 10417 |
10418 // Insert materializations at environment uses. | 10418 // Insert materializations at environment uses. |
10419 for (intptr_t i = 0; i < exits_collector_.exits().length(); i++) { | 10419 for (intptr_t i = 0; i < exits_collector_.exits().length(); i++) { |
10420 CreateMaterializationAt( | 10420 CreateMaterializationAt( |
10421 exits_collector_.exits()[i], alloc, alloc->cls(), *slots); | 10421 exits_collector_.exits()[i], alloc, alloc->cls(), *slots); |
10422 } | 10422 } |
10423 } | 10423 } |
10424 | 10424 |
10425 | 10425 |
10426 } // namespace dart | 10426 } // namespace dart |
OLD | NEW |