This commit is contained in:
shaver@mozilla.org 2008-07-13 22:33:53 -04:00
commit fbc565cb03
2 changed files with 14 additions and 12 deletions

View File

@ -216,7 +216,7 @@ math_ceil(JSContext *cx, uintN argc, jsval *vp)
}
JSBool
math_cos(JSContext *cx, uintN argc, jsval *vp)
js_math_cos(JSContext *cx, uintN argc, jsval *vp)
{
jsdouble x, z;
@ -338,7 +338,7 @@ math_min(JSContext *cx, uintN argc, jsval *vp)
}
JSBool
math_pow(JSContext *cx, uintN argc, jsval *vp)
js_math_pow(JSContext *cx, uintN argc, jsval *vp)
{
jsdouble x, y, z;
@ -480,7 +480,7 @@ math_round(JSContext *cx, uintN argc, jsval *vp)
}
JSBool
math_sin(JSContext *cx, uintN argc, jsval *vp)
js_math_sin(JSContext *cx, uintN argc, jsval *vp)
{
jsdouble x, z;
@ -534,16 +534,16 @@ static JSFunctionSpec math_static_methods[] = {
JS_FN("atan", math_atan, 1, 1, 0),
JS_FN("atan2", math_atan2, 2, 2, 0),
JS_FN("ceil", math_ceil, 1, 1, 0),
JS_FN("cos", math_cos, 1, 1, 0),
JS_FN("cos", js_math_cos, 1, 1, 0),
JS_FN("exp", math_exp, 1, 1, 0),
JS_FN("floor", math_floor, 1, 1, 0),
JS_FN("log", math_log, 1, 1, 0),
JS_FN("max", math_max, 0, 2, 0),
JS_FN("min", math_min, 0, 2, 0),
JS_FN("pow", math_pow, 2, 2, 0),
JS_FN("pow", js_math_pow, 2, 2, 0),
JS_FN("random", math_random, 0, 0, 0),
JS_FN("round", math_round, 1, 1, 0),
JS_FN("sin", math_sin, 1, 1, 0),
JS_FN("sin", js_math_sin, 1, 1, 0),
JS_FN("sqrt", math_sqrt, 1, 1, 0),
JS_FN("tan", math_tan, 1, 1, 0),
JS_FS_END

View File

@ -1915,13 +1915,13 @@ bool TraceRecorder::record_JSOP_CALLNAME()
}
JSBool
math_sin(JSContext *cx, uintN argc, jsval *vp);
js_math_sin(JSContext *cx, uintN argc, jsval *vp);
JSBool
math_cos(JSContext *cx, uintN argc, jsval *vp);
js_math_cos(JSContext *cx, uintN argc, jsval *vp);
JSBool
math_pow(JSContext *cx, uintN argc, jsval *vp);
js_math_pow(JSContext *cx, uintN argc, jsval *vp);
bool TraceRecorder::record_JSOP_CALL()
{
@ -1937,7 +1937,7 @@ bool TraceRecorder::record_JSOP_CALL()
JSFastNative native = (JSFastNative)fun->u.n.native;
LIns* result;
if (native == math_sin || native == math_cos) {
if (native == js_math_sin || native == js_math_cos) {
if (argc != 1)
ABORT_TRACE("Math.sin/cos: need exactly one arg");
@ -1946,8 +1946,8 @@ bool TraceRecorder::record_JSOP_CALL()
ABORT_TRACE("Math.sin/cos: only numeric arg permitted");
LIns* arg_ins = get(&arg);
result = lir->insCall(native == math_sin ? F_Math_dot_sin : F_Math_dot_cos, &arg_ins);
} else if (native == math_pow) {
result = lir->insCall(native == js_math_sin ? F_Math_dot_sin : F_Math_dot_cos, &arg_ins);
} else if (native == js_math_pow) {
if (argc != 2)
ABORT_TRACE("Math.pow: need exactly two args");
@ -2570,6 +2570,7 @@ bool TraceRecorder::record_JSOP_XMLPI()
{
return false;
}
bool TraceRecorder::record_JSOP_CALLPROP()
{
jsval& l = stackval(-1);
@ -2590,6 +2591,7 @@ bool TraceRecorder::record_JSOP_CALLPROP()
stack(0, obj_ins);
return true;
}
bool TraceRecorder::record_JSOP_GETFUNNS()
{
return false;