Index: src/builtins.cc |
diff --git a/src/builtins.cc b/src/builtins.cc |
index e460a8f39300beb9ef5963c3833f9ca27c6b5321..3d3913b457b4c68f59e6a1172f6a51ce27f44f86 100644 |
--- a/src/builtins.cc |
+++ b/src/builtins.cc |
@@ -207,19 +207,6 @@ static void MoveDoubleElements(FixedDoubleArray* dst, |
} |
-static void FillWithHoles(Heap* heap, FixedArray* dst, int from, int to) { |
- ASSERT(dst->map() != heap->fixed_cow_array_map()); |
- MemsetPointer(dst->data_start() + from, heap->the_hole_value(), to - from); |
-} |
- |
- |
-static void FillWithHoles(FixedDoubleArray* dst, int from, int to) { |
- for (int i = from; i < to; i++) { |
- dst->set_the_hole(i); |
- } |
-} |
- |
- |
static FixedArrayBase* LeftTrimFixedArray(Heap* heap, |
FixedArrayBase* elms, |
int to_trim) { |
@@ -901,12 +888,12 @@ BUILTIN(ArraySplice) { |
Handle<FixedDoubleArray> elms = |
Handle<FixedDoubleArray>::cast(elms_obj); |
MoveDoubleElements(*elms, 0, *elms, delta, len - delta); |
- FillWithHoles(*elms, len - delta, len); |
+ elms->FillWithHoles(len - delta, len); |
} else { |
Handle<FixedArray> elms = Handle<FixedArray>::cast(elms_obj); |
DisallowHeapAllocation no_gc; |
heap->MoveElements(*elms, 0, delta, len - delta); |
- FillWithHoles(heap, *elms, len - delta, len); |
+ elms->FillWithHoles(len - delta, len); |
} |
} |
elms_changed = true; |
@@ -917,14 +904,14 @@ BUILTIN(ArraySplice) { |
MoveDoubleElements(*elms, actual_start + item_count, |
*elms, actual_start + actual_delete_count, |
(len - actual_delete_count - actual_start)); |
- FillWithHoles(*elms, new_length, len); |
+ elms->FillWithHoles(new_length, len); |
} else { |
Handle<FixedArray> elms = Handle<FixedArray>::cast(elms_obj); |
DisallowHeapAllocation no_gc; |
heap->MoveElements(*elms, actual_start + item_count, |
actual_start + actual_delete_count, |
(len - actual_delete_count - actual_start)); |
- FillWithHoles(heap, *elms, new_length, len); |
+ elms->FillWithHoles(new_length, len); |
} |
} |
} else if (item_count > actual_delete_count) { |