diff --git a/src/heap.cc b/src/heap.cc index b1096b37e2..f48d9cc452 100644 --- a/src/heap.cc +++ b/src/heap.cc @@ -3414,7 +3414,7 @@ void Heap::FlushNumberStringCache() { // Flush the number to string cache. int len = number_string_cache()->length(); for (int i = 0; i < len; i++) { - number_string_cache()->set_undefined(this, i); + number_string_cache()->set_undefined(i); } } diff --git a/src/mark-compact.cc b/src/mark-compact.cc index f065da1f94..4eb51b549e 100644 --- a/src/mark-compact.cc +++ b/src/mark-compact.cc @@ -2590,7 +2590,7 @@ void MarkCompactCollector::ClearNonLivePrototypeTransitions(Map* map) { for (int i = new_number_of_transitions * step; i < number_of_transitions * step; i++) { - prototype_transitions->set_undefined(heap_, header + i); + prototype_transitions->set_undefined(header + i); } } diff --git a/src/objects-inl.h b/src/objects-inl.h index b165ad4638..f629d9f19f 100644 --- a/src/objects-inl.h +++ b/src/objects-inl.h @@ -2092,28 +2092,21 @@ void FixedArray::NoWriteBarrierSet(FixedArray* array, void FixedArray::set_undefined(int index) { - ASSERT(map() != HEAP->fixed_cow_array_map()); - set_undefined(GetHeap(), index); -} - - -void FixedArray::set_undefined(Heap* heap, int index) { + ASSERT(map() != GetHeap()->fixed_cow_array_map()); ASSERT(index >= 0 && index < this->length()); - ASSERT(!heap->InNewSpace(heap->undefined_value())); - WRITE_FIELD(this, kHeaderSize + index * kPointerSize, - heap->undefined_value()); + ASSERT(!GetHeap()->InNewSpace(GetHeap()->undefined_value())); + WRITE_FIELD(this, + kHeaderSize + index * kPointerSize, + GetHeap()->undefined_value()); } void FixedArray::set_null(int index) { - set_null(GetHeap(), index); -} - - -void FixedArray::set_null(Heap* heap, int index) { ASSERT(index >= 0 && index < this->length()); - ASSERT(!heap->InNewSpace(heap->null_value())); - WRITE_FIELD(this, kHeaderSize + index * kPointerSize, heap->null_value()); + ASSERT(!GetHeap()->InNewSpace(GetHeap()->null_value())); + WRITE_FIELD(this, + kHeaderSize + index * kPointerSize, + GetHeap()->null_value()); } diff --git a/src/objects.h b/src/objects.h index 988f1ab636..00c534d139 100644 --- a/src/objects.h +++ b/src/objects.h @@ -2913,11 +2913,7 @@ class FixedArray: public FixedArrayBase { // Setters for frequently used oddballs located in old space. inline void set_undefined(int index); - // TODO(isolates): duplicate. - inline void set_undefined(Heap* heap, int index); inline void set_null(int index); - // TODO(isolates): duplicate. - inline void set_null(Heap* heap, int index); inline void set_the_hole(int index); inline Object** GetFirstElementAddress();