Index: src/heap.cc |
diff --git a/src/heap.cc b/src/heap.cc |
index cfb786ac7ab9e8b3f00910029d31b5d6f63e14ca..d96b6f7d21b4e319bd48722c3e8a6fd0ac39b320 100644 |
--- a/src/heap.cc |
+++ b/src/heap.cc |
@@ -2978,11 +2978,10 @@ Object* Heap::AllocateFixedArrayWithHoles(int length) { |
FixedArray* array = FixedArray::cast(result); |
array->set_length(length); |
// Initialize body. |
- Object* value = the_hole_value(); |
- for (int index = 0; index < length; index++) { |
- ASSERT(!Heap::InNewSpace(value)); // value = the hole |
- array->set(index, value, SKIP_WRITE_BARRIER); |
- } |
+ ASSERT(!Heap::InNewSpace(the_hole_value())); |
+ MemsetPointer(HeapObject::RawField(array, FixedArray::kHeaderSize), |
+ the_hole_value(), |
+ length); |
} |
return result; |
} |