Index: src/harmony-array.js |
diff --git a/src/harmony-array.js b/src/harmony-array.js |
index 5637917f2366865b44e656cba2dc3645b45fd9fe..3a46bad979cd559a7f23ebce9984de3dfb309513 100644 |
--- a/src/harmony-array.js |
+++ b/src/harmony-array.js |
@@ -18,7 +18,7 @@ |
CHECK_OBJECT_COERCIBLE(this, "Array.prototype.copyWithin"); |
var array = TO_OBJECT_INLINE(this); |
- var length = ToLength(array.length); |
+ var length = $toLength(array.length); |
target = TO_INTEGER(target); |
var to; |
@@ -70,8 +70,8 @@ |
function ArrayFind(predicate /* thisArg */) { // length == 1 |
CHECK_OBJECT_COERCIBLE(this, "Array.prototype.find"); |
- var array = ToObject(this); |
- var length = ToInteger(array.length); |
+ var array = $toObject(this); |
+ var length = $toInteger(array.length); |
if (!IS_SPEC_FUNCTION(predicate)) { |
throw MakeTypeError(kCalledNonCallable, predicate); |
@@ -92,7 +92,7 @@ |
for (var i = 0; i < length; i++) { |
if (i in array) { |
var element = array[i]; |
- var newThisArg = needs_wrapper ? ToObject(thisArg) : thisArg; |
+ var newThisArg = needs_wrapper ? $toObject(thisArg) : thisArg; |
if (%_CallFunction(newThisArg, element, i, array, predicate)) { |
return element; |
} |
@@ -107,8 +107,8 @@ |
function ArrayFindIndex(predicate /* thisArg */) { // length == 1 |
CHECK_OBJECT_COERCIBLE(this, "Array.prototype.findIndex"); |
- var array = ToObject(this); |
- var length = ToInteger(array.length); |
+ var array = $toObject(this); |
+ var length = $toInteger(array.length); |
if (!IS_SPEC_FUNCTION(predicate)) { |
throw MakeTypeError(kCalledNonCallable, predicate); |
@@ -129,7 +129,7 @@ |
for (var i = 0; i < length; i++) { |
if (i in array) { |
var element = array[i]; |
- var newThisArg = needs_wrapper ? ToObject(thisArg) : thisArg; |
+ var newThisArg = needs_wrapper ? $toObject(thisArg) : thisArg; |
if (%_CallFunction(newThisArg, element, i, array, predicate)) { |
return i; |
} |
@@ -144,7 +144,7 @@ |
function ArrayFill(value /* [, start [, end ] ] */) { // length == 1 |
CHECK_OBJECT_COERCIBLE(this, "Array.prototype.fill"); |
- var array = ToObject(this); |
+ var array = $toObject(this); |
var length = TO_UINT32(array.length); |
var i = 0; |
@@ -184,7 +184,7 @@ |
// ES6, draft 10-14-14, section 22.1.2.1 |
function ArrayFrom(arrayLike, mapfn, receiver) { |
- var items = ToObject(arrayLike); |
+ var items = $toObject(arrayLike); |
var mapping = !IS_UNDEFINED(mapfn); |
if (mapping) { |
@@ -232,8 +232,8 @@ |
%AddElement(result, k++, mappedValue, NONE); |
} |
} else { |
- var len = ToLength(items.length); |
- result = %IsConstructor(this) ? new this(len) : new $Array(len); |
+ var len = $toLength(items.length); |
+ result = %IsConstructor(this) ? new this(len) : new GlobalArray(len); |
for (k = 0; k < len; ++k) { |
nextValue = items[k]; |