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

Side by Side Diff: src/transitions.cc

Issue 1472363007: Tenure transition array. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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 | « no previous file | no next file » | 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/transitions.h" 5 #include "src/transitions.h"
6 6
7 #include "src/objects-inl.h" 7 #include "src/objects-inl.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 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 return (t->length() - kFirstIndex) / kTransitionSize; 385 return (t->length() - kFirstIndex) / kTransitionSize;
386 } 386 }
387 387
388 388
389 // Private static helper functions. 389 // Private static helper functions.
390 390
391 Handle<TransitionArray> TransitionArray::Allocate(Isolate* isolate, 391 Handle<TransitionArray> TransitionArray::Allocate(Isolate* isolate,
392 int number_of_transitions, 392 int number_of_transitions,
393 int slack) { 393 int slack) {
394 Handle<FixedArray> array = isolate->factory()->NewFixedArray( 394 Handle<FixedArray> array = isolate->factory()->NewFixedArray(
395 LengthFor(number_of_transitions + slack)); 395 LengthFor(number_of_transitions + slack), TENURED);
396 array->set(kPrototypeTransitionsIndex, Smi::FromInt(0)); 396 array->set(kPrototypeTransitionsIndex, Smi::FromInt(0));
397 array->set(kTransitionLengthIndex, Smi::FromInt(number_of_transitions)); 397 array->set(kTransitionLengthIndex, Smi::FromInt(number_of_transitions));
398 return Handle<TransitionArray>::cast(array); 398 return Handle<TransitionArray>::cast(array);
399 } 399 }
400 400
401 401
402 static void ZapTransitionArray(TransitionArray* transitions) { 402 static void ZapTransitionArray(TransitionArray* transitions) {
403 MemsetPointer(transitions->data_start(), 403 MemsetPointer(transitions->data_start(),
404 transitions->GetHeap()->the_hole_value(), 404 transitions->GetHeap()->the_hole_value(),
405 transitions->length()); 405 transitions->length());
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 PropertyAttributes attributes, 540 PropertyAttributes attributes,
541 int* out_insertion_index) { 541 int* out_insertion_index) {
542 int transition = SearchName(name, out_insertion_index); 542 int transition = SearchName(name, out_insertion_index);
543 if (transition == kNotFound) { 543 if (transition == kNotFound) {
544 return kNotFound; 544 return kNotFound;
545 } 545 }
546 return SearchDetails(transition, kind, attributes, out_insertion_index); 546 return SearchDetails(transition, kind, attributes, out_insertion_index);
547 } 547 }
548 } // namespace internal 548 } // namespace internal
549 } // namespace v8 549 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698