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

Side by Side Diff: src/transitions.cc

Issue 1203653003: Don't insert elements transitions into normalized maps (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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/objects.cc ('k') | test/mjsunit/regress/regress-499790.js » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/objects.h" 7 #include "src/objects.h"
8 #include "src/transitions-inl.h" 8 #include "src/transitions-inl.h"
9 #include "src/utils.h" 9 #include "src/utils.h"
10 10
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 if (details.type() != DATA) return Handle<String>::null(); 216 if (details.type() != DATA) return Handle<String>::null();
217 if (details.attributes() != NONE) return Handle<String>::null(); 217 if (details.attributes() != NONE) return Handle<String>::null();
218 Name* name = GetSimpleTransitionKey(target); 218 Name* name = GetSimpleTransitionKey(target);
219 if (!name->IsString()) return Handle<String>::null(); 219 if (!name->IsString()) return Handle<String>::null();
220 return Handle<String>(String::cast(name)); 220 return Handle<String>(String::cast(name));
221 } 221 }
222 222
223 223
224 // static 224 // static
225 bool TransitionArray::CanHaveMoreTransitions(Handle<Map> map) { 225 bool TransitionArray::CanHaveMoreTransitions(Handle<Map> map) {
226 if (map->is_dictionary_map()) return false;
226 Object* raw_transitions = map->raw_transitions(); 227 Object* raw_transitions = map->raw_transitions();
227 if (IsFullTransitionArray(raw_transitions)) { 228 if (IsFullTransitionArray(raw_transitions)) {
228 TransitionArray* transitions = TransitionArray::cast(raw_transitions); 229 TransitionArray* transitions = TransitionArray::cast(raw_transitions);
229 return transitions->number_of_transitions() < kMaxNumberOfTransitions; 230 return transitions->number_of_transitions() < kMaxNumberOfTransitions;
230 } 231 }
231 return true; 232 return true;
232 } 233 }
233 234
234 235
235 // static 236 // static
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 PropertyAttributes attributes, 514 PropertyAttributes attributes,
514 int* out_insertion_index) { 515 int* out_insertion_index) {
515 int transition = SearchName(name, out_insertion_index); 516 int transition = SearchName(name, out_insertion_index);
516 if (transition == kNotFound) { 517 if (transition == kNotFound) {
517 return kNotFound; 518 return kNotFound;
518 } 519 }
519 return SearchDetails(transition, kind, attributes, out_insertion_index); 520 return SearchDetails(transition, kind, attributes, out_insertion_index);
520 } 521 }
521 } // namespace internal 522 } // namespace internal
522 } // namespace v8 523 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | test/mjsunit/regress/regress-499790.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698