Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index f876cda1fa1044f08666ba475715f1b20a66df7b..2b461c8ca7590a3ecd6c5dd1092b8b7c47559e3c 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -1013,7 +1013,8 @@ bool String::MakeExternal(v8::String::ExternalStringResource* resource) { |
self->set_resource(resource); |
if (is_internalized) self->Hash(); // Force regeneration of the hash value. |
- heap->AdjustLiveBytes(this->address(), new_size - size, Heap::FROM_MUTATOR); |
+ heap->AdjustLiveBytes(this->address(), new_size - size, |
+ Heap::SWEEPING_STARTED); |
return true; |
} |
@@ -1073,7 +1074,8 @@ bool String::MakeExternal(v8::String::ExternalOneByteStringResource* resource) { |
self->set_resource(resource); |
if (is_internalized) self->Hash(); // Force regeneration of the hash value. |
- heap->AdjustLiveBytes(this->address(), new_size - size, Heap::FROM_MUTATOR); |
+ heap->AdjustLiveBytes(this->address(), new_size - size, |
+ Heap::SWEEPING_STARTED); |
return true; |
} |
@@ -2091,7 +2093,7 @@ void JSObject::MigrateFastToFast(Handle<JSObject> object, Handle<Map> new_map) { |
// If there are properties in the new backing store, trim it to the correct |
// size and install the backing store into the object. |
if (external > 0) { |
- heap->RightTrimFixedArray<Heap::FROM_MUTATOR>(*array, inobject); |
+ heap->RightTrimFixedArray<Heap::SWEEPING_STARTED>(*array, inobject); |
object->set_properties(*array); |
} |
@@ -2104,7 +2106,8 @@ void JSObject::MigrateFastToFast(Handle<JSObject> object, Handle<Map> new_map) { |
Address address = object->address(); |
heap->CreateFillerObjectAt( |
address + new_instance_size, instance_size_delta); |
- heap->AdjustLiveBytes(address, -instance_size_delta, Heap::FROM_MUTATOR); |
+ heap->AdjustLiveBytes(address, -instance_size_delta, |
+ Heap::SWEEPING_STARTED); |
} |
// We are storing the new map using release store after creating a filler for |
@@ -4607,7 +4610,7 @@ void JSObject::MigrateFastToSlow(Handle<JSObject> object, |
heap->CreateFillerObjectAt(object->address() + new_instance_size, |
instance_size_delta); |
heap->AdjustLiveBytes(object->address(), -instance_size_delta, |
- Heap::FROM_MUTATOR); |
+ Heap::SWEEPING_STARTED); |
} |
// We are storing the new map using release store after creating a filler for |
@@ -8072,7 +8075,7 @@ Handle<PolymorphicCodeCacheHashTable> PolymorphicCodeCacheHashTable::Put( |
void FixedArray::Shrink(int new_length) { |
DCHECK(0 <= new_length && new_length <= length()); |
if (new_length < length()) { |
- GetHeap()->RightTrimFixedArray<Heap::FROM_MUTATOR>( |
+ GetHeap()->RightTrimFixedArray<Heap::SWEEPING_STARTED>( |
this, length() - new_length); |
} |
} |
@@ -9435,7 +9438,7 @@ Handle<String> SeqString::Truncate(Handle<SeqString> string, int new_length) { |
// that are a multiple of pointer size. |
heap->CreateFillerObjectAt(start_of_string + new_size, delta); |
} |
- heap->AdjustLiveBytes(start_of_string, -delta, Heap::FROM_MUTATOR); |
+ heap->AdjustLiveBytes(start_of_string, -delta, Heap::SWEEPING_STARTED); |
// We are storing the new length using release store after creating a filler |
// for the left-over space to avoid races with the sweeper thread. |
@@ -9856,7 +9859,8 @@ void SharedFunctionInfo::EvictFromOptimizedCodeMap(Code* optimized_code, |
} |
if (dst != length) { |
// Always trim even when array is cleared because of heap verifier. |
- GetHeap()->RightTrimFixedArray<Heap::FROM_MUTATOR>(code_map, length - dst); |
+ GetHeap()->RightTrimFixedArray<Heap::SWEEPING_STARTED>(code_map, |
+ length - dst); |
if (code_map->length() == kEntriesStart) ClearOptimizedCodeMap(); |
} |
} |
@@ -9867,7 +9871,7 @@ void SharedFunctionInfo::TrimOptimizedCodeMap(int shrink_by) { |
DCHECK(shrink_by % kEntryLength == 0); |
DCHECK(shrink_by <= code_map->length() - kEntriesStart); |
// Always trim even when array is cleared because of heap verifier. |
- GetHeap()->RightTrimFixedArray<Heap::FROM_GC>(code_map, shrink_by); |
+ GetHeap()->RightTrimFixedArray<Heap::SWEEPING_IS_OFF>(code_map, shrink_by); |
if (code_map->length() == kEntriesStart) { |
ClearOptimizedCodeMap(); |
} |