Index: src/builtins.cc |
=================================================================== |
--- src/builtins.cc (revision 564) |
+++ src/builtins.cc (working copy) |
@@ -177,7 +177,7 @@ |
Object* obj = Heap::AllocateFixedArrayWithHoles(len->value()); |
if (obj->IsFailure()) return obj; |
FixedArray* elms = FixedArray::cast(obj); |
- FixedArray::WriteBarrierMode mode = elms->GetWriteBarrierMode(); |
+ WriteBarrierMode mode = elms->GetWriteBarrierMode(); |
// Fill in the content |
for (int index = 0; index < number_of_elements; index++) { |
elms->set(index, BUILTIN_ARG(index+1), mode); |
@@ -185,7 +185,7 @@ |
// Set length and elements on the array. |
array->set_elements(FixedArray::cast(obj)); |
- array->set_length(len); |
+ array->set_length(len, SKIP_WRITE_BARRIER); |
return array; |
} |
@@ -214,7 +214,7 @@ |
Object* obj = Heap::AllocateFixedArrayWithHoles(capacity); |
if (obj->IsFailure()) return obj; |
FixedArray* new_elms = FixedArray::cast(obj); |
- FixedArray::WriteBarrierMode mode = new_elms->GetWriteBarrierMode(); |
+ WriteBarrierMode mode = new_elms->GetWriteBarrierMode(); |
// Fill out the new array with old elements. |
for (int i = 0; i < len; i++) new_elms->set(i, elms->get(i), mode); |
// Add the provided values. |
@@ -225,7 +225,7 @@ |
array->set_elements(new_elms); |
} |
// Set the length. |
- array->set_length(Smi::FromInt(new_length)); |
+ array->set_length(Smi::FromInt(new_length), SKIP_WRITE_BARRIER); |
return array->length(); |
} |
BUILTIN_END |
@@ -244,12 +244,11 @@ |
Object* top = elms->get(len - 1); |
// Set the length. |
- array->set_length(Smi::FromInt(len - 1)); |
+ array->set_length(Smi::FromInt(len - 1), SKIP_WRITE_BARRIER); |
if (!top->IsTheHole()) { |
// Delete the top element. |
elms->set_the_hole(len - 1); |
- |
return top; |
} |