Merge MC -> JM

This commit is contained in:
Brian Hackett
2011-07-15 14:40:15 -07:00
1037 changed files with 28242 additions and 13051 deletions

View File

@@ -287,7 +287,7 @@ num_isNaN(JSContext *cx, uintN argc, Value *vp)
return JS_TRUE;
}
jsdouble x;
if (!ValueToNumber(cx, vp[2], &x))
if (!ToNumber(cx, vp[2], &x))
return false;
vp->setBoolean(JSDOUBLE_IS_NaN(x));
return JS_TRUE;
@@ -301,7 +301,7 @@ num_isFinite(JSContext *cx, uintN argc, Value *vp)
return JS_TRUE;
}
jsdouble x;
if (!ValueToNumber(cx, vp[2], &x))
if (!ToNumber(cx, vp[2], &x))
return JS_FALSE;
vp->setBoolean(JSDOUBLE_IS_FINITE(x));
return JS_TRUE;
@@ -573,7 +573,7 @@ Number(JSContext *cx, uintN argc, Value *vp)
bool isConstructing = IsConstructing(vp);
if (argc > 0) {
if (!ValueToNumber(cx, &vp[2]))
if (!ToNumber(cx, &vp[2]))
return false;
vp[0] = vp[2];
} else {
@@ -1293,7 +1293,7 @@ NumberValueToStringBuffer(JSContext *cx, const Value &v, StringBuffer &sb)
}
bool
ValueToNumberSlow(JSContext *cx, Value v, double *out)
ToNumberSlow(JSContext *cx, Value v, double *out)
{
JS_ASSERT(!v.isNumber());
goto skip_int_double;
@@ -1339,7 +1339,7 @@ ValueToECMAInt32Slow(JSContext *cx, const Value &v, int32_t *out)
if (v.isDouble()) {
d = v.toDouble();
} else {
if (!ValueToNumberSlow(cx, v, &d))
if (!ToNumberSlow(cx, v, &d))
return false;
}
*out = js_DoubleToECMAInt32(d);
@@ -1354,7 +1354,7 @@ ValueToECMAUint32Slow(JSContext *cx, const Value &v, uint32_t *out)
if (v.isDouble()) {
d = v.toDouble();
} else {
if (!ValueToNumberSlow(cx, v, &d))
if (!ToNumberSlow(cx, v, &d))
return false;
}
*out = js_DoubleToECMAUint32(d);
@@ -1401,7 +1401,7 @@ ValueToInt32Slow(JSContext *cx, const Value &v, int32_t *out)
jsdouble d;
if (v.isDouble()) {
d = v.toDouble();
} else if (!ValueToNumberSlow(cx, v, &d)) {
} else if (!ToNumberSlow(cx, v, &d)) {
return false;
}
@@ -1421,7 +1421,7 @@ ValueToUint16Slow(JSContext *cx, const Value &v, uint16_t *out)
jsdouble d;
if (v.isDouble()) {
d = v.toDouble();
} else if (!ValueToNumberSlow(cx, v, &d)) {
} else if (!ToNumberSlow(cx, v, &d)) {
return false;
}