Commit 0c778116 authored by hpayer's avatar hpayer Committed by Commit bot

Pretenure prototype transitions array.

BUG=

Review URL: https://codereview.chromium.org/1513313003

Cr-Commit-Position: refs/heads/master@{#32790}
parent bd104277
...@@ -37,10 +37,9 @@ FixedArray* TransitionArray::GetPrototypeTransitions() { ...@@ -37,10 +37,9 @@ FixedArray* TransitionArray::GetPrototypeTransitions() {
} }
void TransitionArray::SetPrototypeTransitions(FixedArray* transitions, void TransitionArray::SetPrototypeTransitions(FixedArray* transitions) {
WriteBarrierMode mode) {
DCHECK(transitions->IsFixedArray()); DCHECK(transitions->IsFixedArray());
set(kPrototypeTransitionsIndex, transitions, mode); set(kPrototypeTransitionsIndex, transitions);
} }
......
...@@ -269,7 +269,7 @@ Handle<FixedArray> TransitionArray::GrowPrototypeTransitionArray( ...@@ -269,7 +269,7 @@ Handle<FixedArray> TransitionArray::GrowPrototypeTransitionArray(
new_capacity = Min(kMaxCachedPrototypeTransitions, new_capacity); new_capacity = Min(kMaxCachedPrototypeTransitions, new_capacity);
DCHECK_GT(new_capacity, capacity); DCHECK_GT(new_capacity, capacity);
int grow_by = new_capacity - capacity; int grow_by = new_capacity - capacity;
array = isolate->factory()->CopyFixedArrayAndGrow(array, grow_by); array = isolate->factory()->CopyFixedArrayAndGrow(array, grow_by, TENURED);
if (capacity < 0) { if (capacity < 0) {
// There was no prototype transitions array before, so the size // There was no prototype transitions array before, so the size
// couldn't be copied. Initialize it explicitly. // couldn't be copied. Initialize it explicitly.
......
...@@ -119,9 +119,7 @@ class TransitionArray: public FixedArray { ...@@ -119,9 +119,7 @@ class TransitionArray: public FixedArray {
int value); int value);
inline FixedArray* GetPrototypeTransitions(); inline FixedArray* GetPrototypeTransitions();
inline void SetPrototypeTransitions( inline void SetPrototypeTransitions(FixedArray* prototype_transitions);
FixedArray* prototype_transitions,
WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
inline Object** GetPrototypeTransitionsSlot(); inline Object** GetPrototypeTransitionsSlot();
inline bool HasPrototypeTransitions(); inline bool HasPrototypeTransitions();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment