Index: src/array.js |
diff --git a/src/array.js b/src/array.js |
index 4520a34e35055da4129e60c7e12f1dc2fe3d2bd1..ab18135a70192f56db150b03e74ed9e161e171c4 100644 |
--- a/src/array.js |
+++ b/src/array.js |
@@ -394,7 +394,7 @@ function ArrayToString() { |
array = TO_OBJECT(this); |
func = array.join; |
} |
- if (!IS_SPEC_FUNCTION(func)) { |
+ if (!IS_CALLABLE(func)) { |
return %_CallFunction(array, ObjectToString); |
} |
return %_CallFunction(array, func); |
@@ -911,7 +911,7 @@ function InnerArraySort(length, comparefn) { |
// In-place QuickSort algorithm. |
// For short (length <= 22) arrays, insertion sort is used for efficiency. |
- if (!IS_SPEC_FUNCTION(comparefn)) { |
+ if (!IS_CALLABLE(comparefn)) { |
comparefn = function (x, y) { |
if (x === y) return 0; |
if (%_IsSmi(x) && %_IsSmi(y)) { |
@@ -1203,7 +1203,7 @@ function ArraySort(comparefn) { |
// preserving the semantics, since the calls to the receiver function can add |
// or delete elements from the array. |
function InnerArrayFilter(f, receiver, array, length) { |
- if (!IS_SPEC_FUNCTION(f)) throw MakeTypeError(kCalledNonCallable, f); |
+ if (!IS_CALLABLE(f)) throw MakeTypeError(kCalledNonCallable, f); |
var needs_wrapper = false; |
if (IS_NULL(receiver)) { |
if (%IsSloppyModeFunction(f)) receiver = UNDEFINED; |
@@ -1243,7 +1243,7 @@ function ArrayFilter(f, receiver) { |
} |
function InnerArrayForEach(f, receiver, array, length) { |
- if (!IS_SPEC_FUNCTION(f)) throw MakeTypeError(kCalledNonCallable, f); |
+ if (!IS_CALLABLE(f)) throw MakeTypeError(kCalledNonCallable, f); |
var needs_wrapper = false; |
if (IS_NULL(receiver)) { |
if (%IsSloppyModeFunction(f)) receiver = UNDEFINED; |
@@ -1276,7 +1276,7 @@ function ArrayForEach(f, receiver) { |
function InnerArraySome(f, receiver, array, length) { |
- if (!IS_SPEC_FUNCTION(f)) throw MakeTypeError(kCalledNonCallable, f); |
+ if (!IS_CALLABLE(f)) throw MakeTypeError(kCalledNonCallable, f); |
var needs_wrapper = false; |
if (IS_NULL(receiver)) { |
if (%IsSloppyModeFunction(f)) receiver = UNDEFINED; |
@@ -1313,7 +1313,7 @@ function ArraySome(f, receiver) { |
function InnerArrayEvery(f, receiver, array, length) { |
- if (!IS_SPEC_FUNCTION(f)) throw MakeTypeError(kCalledNonCallable, f); |
+ if (!IS_CALLABLE(f)) throw MakeTypeError(kCalledNonCallable, f); |
var needs_wrapper = false; |
if (IS_NULL(receiver)) { |
if (%IsSloppyModeFunction(f)) receiver = UNDEFINED; |
@@ -1347,7 +1347,7 @@ function ArrayEvery(f, receiver) { |
function InnerArrayMap(f, receiver, array, length) { |
- if (!IS_SPEC_FUNCTION(f)) throw MakeTypeError(kCalledNonCallable, f); |
+ if (!IS_CALLABLE(f)) throw MakeTypeError(kCalledNonCallable, f); |
var needs_wrapper = false; |
if (IS_NULL(receiver)) { |
if (%IsSloppyModeFunction(f)) receiver = UNDEFINED; |
@@ -1511,7 +1511,7 @@ function ArrayLastIndexOf(element, index) { |
function InnerArrayReduce(callback, current, array, length, argumentsLength) { |
- if (!IS_SPEC_FUNCTION(callback)) { |
+ if (!IS_CALLABLE(callback)) { |
throw MakeTypeError(kCalledNonCallable, callback); |
} |
@@ -1554,7 +1554,7 @@ function ArrayReduce(callback, current) { |
function InnerArrayReduceRight(callback, current, array, length, |
argumentsLength) { |
- if (!IS_SPEC_FUNCTION(callback)) { |
+ if (!IS_CALLABLE(callback)) { |
throw MakeTypeError(kCalledNonCallable, callback); |
} |