| Index: src/heap.cc
|
| ===================================================================
|
| --- src/heap.cc (revision 9581)
|
| +++ src/heap.cc (working copy)
|
| @@ -1443,9 +1443,9 @@
|
| HeapObject** slot,
|
| HeapObject* object,
|
| int object_size) {
|
| - ASSERT((size_restriction != SMALL) ||
|
| - (object_size <= Page::kMaxHeapObjectSize));
|
| - ASSERT(object->Size() == object_size);
|
| + SLOW_ASSERT((size_restriction != SMALL) ||
|
| + (object_size <= Page::kMaxHeapObjectSize));
|
| + SLOW_ASSERT(object->Size() == object_size);
|
|
|
| Heap* heap = map->GetHeap();
|
| if (heap->ShouldBePromoted(object->address(), object_size)) {
|
| @@ -1678,9 +1678,9 @@
|
|
|
|
|
| void Heap::ScavengeObjectSlow(HeapObject** p, HeapObject* object) {
|
| - ASSERT(HEAP->InFromSpace(object));
|
| + SLOW_ASSERT(HEAP->InFromSpace(object));
|
| MapWord first_word = object->map_word();
|
| - ASSERT(!first_word.IsForwardingAddress());
|
| + SLOW_ASSERT(!first_word.IsForwardingAddress());
|
| Map* map = first_word.ToMap();
|
| map->GetHeap()->DoScavengeObject(map, p, object);
|
| }
|
| @@ -3688,7 +3688,7 @@
|
| MaybeObject* Heap::CopyJSObject(JSObject* source) {
|
| // Never used to copy functions. If functions need to be copied we
|
| // have to be careful to clear the literals array.
|
| - ASSERT(!source->IsJSFunction());
|
| + SLOW_ASSERT(!source->IsJSFunction());
|
|
|
| // Make the clone.
|
| Map* map = source->map();
|
| @@ -3714,7 +3714,7 @@
|
| { MaybeObject* maybe_clone = new_space_.AllocateRaw(object_size);
|
| if (!maybe_clone->ToObject(&clone)) return maybe_clone;
|
| }
|
| - ASSERT(InNewSpace(clone));
|
| + SLOW_ASSERT(InNewSpace(clone));
|
| // Since we know the clone is allocated in new space, we can copy
|
| // the contents without worrying about updating the write barrier.
|
| CopyBlock(HeapObject::cast(clone)->address(),
|
| @@ -3722,7 +3722,8 @@
|
| object_size);
|
| }
|
|
|
| - ASSERT(JSObject::cast(clone)->GetElementsKind() == source->GetElementsKind());
|
| + SLOW_ASSERT(
|
| + JSObject::cast(clone)->GetElementsKind() == source->GetElementsKind());
|
| FixedArrayBase* elements = FixedArrayBase::cast(source->elements());
|
| FixedArray* properties = FixedArray::cast(source->properties());
|
| // Update elements if necessary.
|
| @@ -4802,12 +4803,12 @@
|
| HeapObject::cast(object));
|
| Object* new_object = *slot;
|
| if (InNewSpace(new_object)) {
|
| - ASSERT(Heap::InToSpace(new_object));
|
| - ASSERT(new_object->IsHeapObject());
|
| + SLOW_ASSERT(Heap::InToSpace(new_object));
|
| + SLOW_ASSERT(new_object->IsHeapObject());
|
| store_buffer_.EnterDirectlyIntoStoreBuffer(
|
| reinterpret_cast<Address>(slot));
|
| }
|
| - ASSERT(!MarkCompactCollector::IsOnEvacuationCandidate(new_object));
|
| + SLOW_ASSERT(!MarkCompactCollector::IsOnEvacuationCandidate(new_object));
|
| } else if (record_slots &&
|
| MarkCompactCollector::IsOnEvacuationCandidate(object)) {
|
| mark_compact_collector()->RecordSlot(slot, slot, object);
|
|
|