| 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 7582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7593 if (IsSloppyArgumentsElements(elements_kind)) { | 7593 if (IsSloppyArgumentsElements(elements_kind)) { |
| 7594 HInstruction* result = | 7594 HInstruction* result = |
| 7595 BuildKeyedGeneric(access_type, expr, slot, object, key, val); | 7595 BuildKeyedGeneric(access_type, expr, slot, object, key, val); |
| 7596 *has_side_effects = result->HasObservableSideEffects(); | 7596 *has_side_effects = result->HasObservableSideEffects(); |
| 7597 return AddInstruction(result); | 7597 return AddInstruction(result); |
| 7598 } | 7598 } |
| 7599 } | 7599 } |
| 7600 // Get transition target for each map (NULL == no transition). | 7600 // Get transition target for each map (NULL == no transition). |
| 7601 for (int i = 0; i < maps->length(); ++i) { | 7601 for (int i = 0; i < maps->length(); ++i) { |
| 7602 Handle<Map> map = maps->at(i); | 7602 Handle<Map> map = maps->at(i); |
| 7603 Handle<Map> transitioned_map = | 7603 Map* transitioned_map = |
| 7604 Map::FindTransitionedMap(map, &possible_transitioned_maps); | 7604 map->FindElementsKindTransitionedMap(&possible_transitioned_maps); |
| 7605 transition_target.Add(transitioned_map); | 7605 if (transitioned_map != nullptr) { |
| 7606 transition_target.Add(handle(transitioned_map)); |
| 7607 } else { |
| 7608 transition_target.Add(Handle<Map>()); |
| 7609 } |
| 7606 } | 7610 } |
| 7607 | 7611 |
| 7608 MapHandleList untransitionable_maps(maps->length()); | 7612 MapHandleList untransitionable_maps(maps->length()); |
| 7609 HTransitionElementsKind* transition = NULL; | 7613 HTransitionElementsKind* transition = NULL; |
| 7610 for (int i = 0; i < maps->length(); ++i) { | 7614 for (int i = 0; i < maps->length(); ++i) { |
| 7611 Handle<Map> map = maps->at(i); | 7615 Handle<Map> map = maps->at(i); |
| 7612 DCHECK(map->IsMap()); | 7616 DCHECK(map->IsMap()); |
| 7613 if (!transition_target.at(i).is_null()) { | 7617 if (!transition_target.at(i).is_null()) { |
| 7614 DCHECK(Map::IsValidElementsTransition( | 7618 DCHECK(Map::IsValidElementsTransition( |
| 7615 map->elements_kind(), | 7619 map->elements_kind(), |
| (...skipping 5906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13522 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13526 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 13523 } | 13527 } |
| 13524 | 13528 |
| 13525 #ifdef DEBUG | 13529 #ifdef DEBUG |
| 13526 graph_->Verify(false); // No full verify. | 13530 graph_->Verify(false); // No full verify. |
| 13527 #endif | 13531 #endif |
| 13528 } | 13532 } |
| 13529 | 13533 |
| 13530 } // namespace internal | 13534 } // namespace internal |
| 13531 } // namespace v8 | 13535 } // namespace v8 |
| OLD | NEW |