From 3fb53cf83aefb48e35124735812e11bae13fcd36 Mon Sep 17 00:00:00 2001 From: "mstarzinger@chromium.org" Date: Wed, 28 Aug 2013 14:26:22 +0000 Subject: [PATCH] Remove obsolete Oddball setters in FixedArray. R=bmeurer@chromium.org Review URL: https://codereview.chromium.org/23705002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16404 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/heap.cc | 2 +- src/mark-compact.cc | 2 +- src/objects-inl.h | 25 +++++++++---------------- src/objects.h | 4 ---- 4 files changed, 11 insertions(+), 22 deletions(-) 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();