Index: src/js/array.js |
diff --git a/src/js/array.js b/src/js/array.js |
index 0eb06fac8fd8fbd876446aab61a0515559884359..91c5fa443bedf1a2eb4b657874315422418b0d72 100644 |
--- a/src/js/array.js |
+++ b/src/js/array.js |
@@ -11,6 +11,7 @@ |
// ------------------------------------------------------------------- |
// Imports |
+var AddIndexedProperty; |
var Delete; |
var FLAG_harmony_tolength; |
var GlobalArray = global.Array; |
@@ -28,6 +29,7 @@ var ObserveEnqueueSpliceRecord; |
var unscopablesSymbol = utils.ImportNow("unscopables_symbol"); |
utils.Import(function(from) { |
+ AddIndexedProperty = from.AddIndexedProperty; |
Delete = from.Delete; |
MakeTypeError = from.MakeTypeError; |
MinSimple = from.MinSimple; |
@@ -245,7 +247,7 @@ function SparseSlice(array, start_i, del_count, len, deleted_elements) { |
for (var i = start_i; i < limit; ++i) { |
var current = array[i]; |
if (!IS_UNDEFINED(current) || i in array) { |
- %AddElement(deleted_elements, i - start_i, current); |
+ AddIndexedProperty(deleted_elements, i - start_i, current); |
} |
} |
} else { |
@@ -256,7 +258,7 @@ function SparseSlice(array, start_i, del_count, len, deleted_elements) { |
if (key >= start_i) { |
var current = array[key]; |
if (!IS_UNDEFINED(current) || key in array) { |
- %AddElement(deleted_elements, key - start_i, current); |
+ AddIndexedProperty(deleted_elements, key - start_i, current); |
} |
} |
} |
@@ -336,9 +338,9 @@ function SimpleSlice(array, start_i, del_count, len, deleted_elements) { |
var index = start_i + i; |
if (HAS_INDEX(array, index, is_array)) { |
var current = array[index]; |
- // The spec requires [[DefineOwnProperty]] here, %AddElement is close |
- // enough (in that it ignores the prototype). |
- %AddElement(deleted_elements, i, current); |
+ // The spec requires [[DefineOwnProperty]] here, AddIndexedProperty is |
+ // close enough (in that it ignores the prototype). |
+ AddIndexedProperty(deleted_elements, i, current); |
} |
} |
} |