| Index: src/objects-inl.h
|
| diff --git a/src/objects-inl.h b/src/objects-inl.h
|
| index 13ae603520b222ff9f4a6bdfacbf57718742af15..f629d9f19f52b122f9f71c838c787ab91314df5f 100644
|
| --- a/src/objects-inl.h
|
| +++ b/src/objects-inl.h
|
| @@ -1312,7 +1312,7 @@ void JSObject::ValidateElements() {
|
|
|
|
|
| bool JSObject::ShouldTrackAllocationInfo() {
|
| - if (map()->CanTrackAllocationSite()) {
|
| + if (AllocationSite::CanTrack(map()->instance_type())) {
|
| if (!IsJSArray()) {
|
| return true;
|
| }
|
| @@ -1349,6 +1349,11 @@ AllocationSiteMode AllocationSite::GetMode(ElementsKind from,
|
| }
|
|
|
|
|
| +inline bool AllocationSite::CanTrack(InstanceType type) {
|
| + return type == JS_ARRAY_TYPE;
|
| +}
|
| +
|
| +
|
| MaybeObject* JSObject::EnsureCanContainHeapObjectElements() {
|
| ValidateElements();
|
| ElementsKind elements_kind = map()->elements_kind();
|
| @@ -2087,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());
|
| }
|
|
|
|
|
| @@ -3593,11 +3591,6 @@ Code::Flags Code::flags() {
|
| }
|
|
|
|
|
| -inline bool Map::CanTrackAllocationSite() {
|
| - return instance_type() == JS_ARRAY_TYPE;
|
| -}
|
| -
|
| -
|
| void Map::set_owns_descriptors(bool is_shared) {
|
| set_bit_field3(OwnsDescriptors::update(bit_field3(), is_shared));
|
| }
|
|
|