Bug 811562 - Decorate %_CallFunction arguments with JSOP_NOTEARG. (r=luke)

This commit is contained in:
Shu-yu Guo 2012-11-14 22:56:50 -08:00
parent 360f41735f
commit 215740ebf7

View File

@ -5382,11 +5382,15 @@ EmitCallOrNew(JSContext *cx, BytecodeEmitter *bce, ParseNode *pn, ptrdiff_t top)
ParseNode *receiver = pn2->pn_next;
if (!EmitTree(cx, bce, receiver))
return false;
if (Emit1(cx, bce, JSOP_NOTEARG) < 0)
return false;
bool oldEmittingForInit = bce->emittingForInit;
bce->emittingForInit = false;
for (ParseNode *argpn = receiver->pn_next; argpn != funNode; argpn = argpn->pn_next) {
if (!EmitTree(cx, bce, argpn))
return false;
if (Emit1(cx, bce, JSOP_NOTEARG) < 0)
return false;
}
bce->emittingForInit = oldEmittingForInit;
argc -= 2;