Index: src/runtime.js |
diff --git a/src/runtime.js b/src/runtime.js |
index 82c668a6e26438475b00f59cacb0b2ceb2788836..e5e306d8cd83a32fd6510004b58a3bd5beefa4a4 100644 |
--- a/src/runtime.js |
+++ b/src/runtime.js |
@@ -717,14 +717,14 @@ function IsConcatSpreadable(O) { |
function DefaultNumber(x) { |
var valueOf = x.valueOf; |
if (IS_CALLABLE(valueOf)) { |
- var v = %_CallFunction(x, valueOf); |
+ var v = %_Call(valueOf, x); |
if (IS_SYMBOL(v)) throw MakeTypeError(kSymbolToNumber); |
if (IS_SIMD_VALUE(x)) throw MakeTypeError(kSimdToNumber); |
if (IsPrimitive(v)) return v; |
} |
var toString = x.toString; |
if (IS_CALLABLE(toString)) { |
- var s = %_CallFunction(x, toString); |
+ var s = %_Call(toString, x); |
if (IsPrimitive(s)) return s; |
} |
throw MakeTypeError(kCannotConvertToPrimitive); |
@@ -736,13 +736,13 @@ function DefaultString(x) { |
if (IS_SYMBOL(x)) throw MakeTypeError(kSymbolToString); |
var toString = x.toString; |
if (IS_CALLABLE(toString)) { |
- var s = %_CallFunction(x, toString); |
+ var s = %_Call(toString, x); |
if (IsPrimitive(s)) return s; |
} |
var valueOf = x.valueOf; |
if (IS_CALLABLE(valueOf)) { |
- var v = %_CallFunction(x, valueOf); |
+ var v = %_Call(valueOf, x); |
if (IsPrimitive(v)) return v; |
} |
} |