Fix jsreftest regress-555246-1. Also attempt to fix XP build bustage with lval's constructor being skipped by labels.

This commit is contained in:
David Mandelin 2010-05-25 13:19:35 -07:00
parent b5b0edd4b5
commit 9a6626e752
2 changed files with 5 additions and 8 deletions

View File

@ -4018,7 +4018,7 @@ Decompile(SprintStack *ss, jsbytecode *pc, intN nb, JSOp nextop)
case JSOP_DOUBLE:
GET_DOUBLE_FROM_BYTECODE(jp->script, pc, 0, atom);
val = ATOM_TO_JSVAL(atom);
val = DOUBLE_TO_JSVAL(*ATOM_TO_DOUBLE(atom));
LOCAL_ASSERT(JSVAL_IS_DOUBLE(val));
todo = SprintDoubleValue(&ss->sprinter, val, &saveop);
break;

View File

@ -2223,12 +2223,10 @@ END_CASE(JSOP_ENUMELEM)
JSObject *obj;
uintN flags;
uintN argc;
Value lval;
Value *vp;
BEGIN_CASE(JSOP_NEW)
{
Value lval;
/* Get immediate argc and find the constructor function. */
argc = GET_ARGC(regs.pc);
vp = regs.sp - (2 + argc);
@ -2282,9 +2280,8 @@ BEGIN_CASE(JSOP_APPLY)
argc = GET_ARGC(regs.pc);
vp = regs.sp - (argc + 2);
lval = *vp;
if (lval.isFunObj()) {
obj = &lval.asFunObj();
if (vp->isFunObj()) {
obj = &vp->asFunObj();
fun = GET_FUNCTION_PRIVATE(cx, obj);
/* Clear frame flags since this is not a constructor call. */
@ -2414,12 +2411,12 @@ BEGIN_CASE(JSOP_APPLY)
}
if (fun->flags & JSFUN_FAST_NATIVE) {
DTrace::enterJSFun(cx, NULL, fun, fp, argc, vp + 2, &lval);
DTrace::enterJSFun(cx, NULL, fun, fp, argc, vp + 2, vp);
JS_ASSERT(fun->u.n.extra == 0);
JS_ASSERT(vp[1].isObjectOrNull() || PrimitiveValue::test(fun, vp[1]));
JSBool ok = ((FastNative) fun->u.n.native)(cx, argc, vp);
DTrace::exitJSFun(cx, NULL, fun, *vp, &lval);
DTrace::exitJSFun(cx, NULL, fun, *vp, vp);
regs.sp = vp + 1;
if (!ok)
goto error;