Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(339)

Side by Side Diff: src/crankshaft/hydrogen.cc

Issue 2015513002: [runtime] Ensure that all elements kind transitions are chained to the root map. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebasing Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/access-info.cc ('k') | src/ic/ic.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 7668 matching lines...) Expand 10 before | Expand all | Expand 10 after
7679 if (IsSloppyArgumentsElements(elements_kind)) { 7679 if (IsSloppyArgumentsElements(elements_kind)) {
7680 HInstruction* result = 7680 HInstruction* result =
7681 BuildKeyedGeneric(access_type, expr, slot, object, key, val); 7681 BuildKeyedGeneric(access_type, expr, slot, object, key, val);
7682 *has_side_effects = result->HasObservableSideEffects(); 7682 *has_side_effects = result->HasObservableSideEffects();
7683 return AddInstruction(result); 7683 return AddInstruction(result);
7684 } 7684 }
7685 } 7685 }
7686 // Get transition target for each map (NULL == no transition). 7686 // Get transition target for each map (NULL == no transition).
7687 for (int i = 0; i < maps->length(); ++i) { 7687 for (int i = 0; i < maps->length(); ++i) {
7688 Handle<Map> map = maps->at(i); 7688 Handle<Map> map = maps->at(i);
7689 Handle<Map> transitioned_map = 7689 Map* transitioned_map =
7690 Map::FindTransitionedMap(map, &possible_transitioned_maps); 7690 map->FindElementsKindTransitionedMap(&possible_transitioned_maps);
7691 transition_target.Add(transitioned_map); 7691 if (transitioned_map != nullptr) {
7692 transition_target.Add(handle(transitioned_map));
7693 } else {
7694 transition_target.Add(Handle<Map>());
7695 }
7692 } 7696 }
7693 7697
7694 MapHandleList untransitionable_maps(maps->length()); 7698 MapHandleList untransitionable_maps(maps->length());
7695 HTransitionElementsKind* transition = NULL; 7699 HTransitionElementsKind* transition = NULL;
7696 for (int i = 0; i < maps->length(); ++i) { 7700 for (int i = 0; i < maps->length(); ++i) {
7697 Handle<Map> map = maps->at(i); 7701 Handle<Map> map = maps->at(i);
7698 DCHECK(map->IsMap()); 7702 DCHECK(map->IsMap());
7699 if (!transition_target.at(i).is_null()) { 7703 if (!transition_target.at(i).is_null()) {
7700 DCHECK(Map::IsValidElementsTransition( 7704 DCHECK(Map::IsValidElementsTransition(
7701 map->elements_kind(), 7705 map->elements_kind(),
(...skipping 5995 matching lines...) Expand 10 before | Expand all | Expand 10 after
13697 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13701 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13698 } 13702 }
13699 13703
13700 #ifdef DEBUG 13704 #ifdef DEBUG
13701 graph_->Verify(false); // No full verify. 13705 graph_->Verify(false); // No full verify.
13702 #endif 13706 #endif
13703 } 13707 }
13704 13708
13705 } // namespace internal 13709 } // namespace internal
13706 } // namespace v8 13710 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/access-info.cc ('k') | src/ic/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698