OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 "src/crankshaft/hydrogen.h" | 5 #include "src/crankshaft/hydrogen.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/allocation-site-scopes.h" | 9 #include "src/allocation-site-scopes.h" |
10 #include "src/ast/ast-numbering.h" | 10 #include "src/ast/ast-numbering.h" |
(...skipping 7686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7697 if (IsSloppyArgumentsElements(elements_kind)) { | 7697 if (IsSloppyArgumentsElements(elements_kind)) { |
7698 HInstruction* result = | 7698 HInstruction* result = |
7699 BuildKeyedGeneric(access_type, expr, slot, object, key, val); | 7699 BuildKeyedGeneric(access_type, expr, slot, object, key, val); |
7700 *has_side_effects = result->HasObservableSideEffects(); | 7700 *has_side_effects = result->HasObservableSideEffects(); |
7701 return AddInstruction(result); | 7701 return AddInstruction(result); |
7702 } | 7702 } |
7703 } | 7703 } |
7704 // Get transition target for each map (NULL == no transition). | 7704 // Get transition target for each map (NULL == no transition). |
7705 for (int i = 0; i < maps->length(); ++i) { | 7705 for (int i = 0; i < maps->length(); ++i) { |
7706 Handle<Map> map = maps->at(i); | 7706 Handle<Map> map = maps->at(i); |
7707 Handle<Map> transitioned_map = | 7707 Map* transitioned_map = |
7708 Map::FindTransitionedMap(map, &possible_transitioned_maps); | 7708 map->FindElementsKindTransitionedMap(&possible_transitioned_maps); |
7709 transition_target.Add(transitioned_map); | 7709 if (transitioned_map != nullptr) { |
| 7710 transition_target.Add(handle(transitioned_map)); |
| 7711 } else { |
| 7712 transition_target.Add(Handle<Map>()); |
| 7713 } |
7710 } | 7714 } |
7711 | 7715 |
7712 MapHandleList untransitionable_maps(maps->length()); | 7716 MapHandleList untransitionable_maps(maps->length()); |
7713 HTransitionElementsKind* transition = NULL; | 7717 HTransitionElementsKind* transition = NULL; |
7714 for (int i = 0; i < maps->length(); ++i) { | 7718 for (int i = 0; i < maps->length(); ++i) { |
7715 Handle<Map> map = maps->at(i); | 7719 Handle<Map> map = maps->at(i); |
7716 DCHECK(map->IsMap()); | 7720 DCHECK(map->IsMap()); |
7717 if (!transition_target.at(i).is_null()) { | 7721 if (!transition_target.at(i).is_null()) { |
7718 DCHECK(Map::IsValidElementsTransition( | 7722 DCHECK(Map::IsValidElementsTransition( |
7719 map->elements_kind(), | 7723 map->elements_kind(), |
(...skipping 5991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13711 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13715 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
13712 } | 13716 } |
13713 | 13717 |
13714 #ifdef DEBUG | 13718 #ifdef DEBUG |
13715 graph_->Verify(false); // No full verify. | 13719 graph_->Verify(false); // No full verify. |
13716 #endif | 13720 #endif |
13717 } | 13721 } |
13718 | 13722 |
13719 } // namespace internal | 13723 } // namespace internal |
13720 } // namespace v8 | 13724 } // namespace v8 |
OLD | NEW |