Pretenure prototype transitions array.
BUG= Review URL: https://codereview.chromium.org/1513313003 Cr-Commit-Position: refs/heads/master@{#32790}
This commit is contained in:
parent
bd104277c2
commit
0c778116bd
@ -37,10 +37,9 @@ FixedArray* TransitionArray::GetPrototypeTransitions() {
|
||||
}
|
||||
|
||||
|
||||
void TransitionArray::SetPrototypeTransitions(FixedArray* transitions,
|
||||
WriteBarrierMode mode) {
|
||||
void TransitionArray::SetPrototypeTransitions(FixedArray* transitions) {
|
||||
DCHECK(transitions->IsFixedArray());
|
||||
set(kPrototypeTransitionsIndex, transitions, mode);
|
||||
set(kPrototypeTransitionsIndex, transitions);
|
||||
}
|
||||
|
||||
|
||||
|
@ -269,7 +269,7 @@ Handle<FixedArray> TransitionArray::GrowPrototypeTransitionArray(
|
||||
new_capacity = Min(kMaxCachedPrototypeTransitions, new_capacity);
|
||||
DCHECK_GT(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) {
|
||||
// There was no prototype transitions array before, so the size
|
||||
// couldn't be copied. Initialize it explicitly.
|
||||
|
@ -119,9 +119,7 @@ class TransitionArray: public FixedArray {
|
||||
int value);
|
||||
|
||||
inline FixedArray* GetPrototypeTransitions();
|
||||
inline void SetPrototypeTransitions(
|
||||
FixedArray* prototype_transitions,
|
||||
WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
|
||||
inline void SetPrototypeTransitions(FixedArray* prototype_transitions);
|
||||
inline Object** GetPrototypeTransitionsSlot();
|
||||
inline bool HasPrototypeTransitions();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user