OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <ostream> | 5 #include <ostream> |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/compilation-dependencies.h" | 8 #include "src/compilation-dependencies.h" |
9 #include "src/compiler/access-info.h" | 9 #include "src/compiler/access-info.h" |
10 #include "src/field-index-inl.h" | 10 #include "src/field-index-inl.h" |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 possible_transition_targets.Add(map); | 185 possible_transition_targets.Add(map); |
186 } | 186 } |
187 } | 187 } |
188 } | 188 } |
189 | 189 |
190 // Separate the actual receiver maps and the possible transition sources. | 190 // Separate the actual receiver maps and the possible transition sources. |
191 MapHandleList receiver_maps(maps.length()); | 191 MapHandleList receiver_maps(maps.length()); |
192 MapTransitionList transitions(maps.length()); | 192 MapTransitionList transitions(maps.length()); |
193 for (Handle<Map> map : maps) { | 193 for (Handle<Map> map : maps) { |
194 if (Map::TryUpdate(map).ToHandle(&map)) { | 194 if (Map::TryUpdate(map).ToHandle(&map)) { |
195 Handle<Map> transition_target = | 195 Map* transition_target = |
196 Map::FindTransitionedMap(map, &possible_transition_targets); | 196 map->FindElementsKindTransitionedMap(&possible_transition_targets); |
197 if (transition_target.is_null()) { | 197 if (transition_target == nullptr) { |
198 receiver_maps.Add(map); | 198 receiver_maps.Add(map); |
199 } else { | 199 } else { |
200 transitions.push_back(std::make_pair(map, transition_target)); | 200 transitions.push_back(std::make_pair(map, handle(transition_target))); |
201 } | 201 } |
202 } | 202 } |
203 } | 203 } |
204 | 204 |
205 for (Handle<Map> receiver_map : receiver_maps) { | 205 for (Handle<Map> receiver_map : receiver_maps) { |
206 // Compute the element access information. | 206 // Compute the element access information. |
207 ElementAccessInfo access_info; | 207 ElementAccessInfo access_info; |
208 if (!ComputeElementAccessInfo(receiver_map, access_mode, &access_info)) { | 208 if (!ComputeElementAccessInfo(receiver_map, access_mode, &access_info)) { |
209 return false; | 209 return false; |
210 } | 210 } |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 } | 458 } |
459 return false; | 459 return false; |
460 } | 460 } |
461 | 461 |
462 | 462 |
463 Factory* AccessInfoFactory::factory() const { return isolate()->factory(); } | 463 Factory* AccessInfoFactory::factory() const { return isolate()->factory(); } |
464 | 464 |
465 } // namespace compiler | 465 } // namespace compiler |
466 } // namespace internal | 466 } // namespace internal |
467 } // namespace v8 | 467 } // namespace v8 |
OLD | NEW |