Bug 811562 - Decorate %_CallFunction arguments with JSOP_NOTEARG. (r=luke)
authorShu-yu Guo <shu@rfrn.org>
Wed, 14 Nov 2012 22:56:50 -0800
changeset 113353 ec87a47d93ca487b77ef43c4671ff18780071b3b
parent 113352 34a4de5feafe590343d1346e51f969909fbf51d4
child 113354 e6a99483698fa284e1b865aed9e4532cbf1baea4
push id23869
push useremorley@mozilla.com
push dateThu, 15 Nov 2012 16:18:16 +0000
treeherdermozilla-central@a37525d304d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke
bugs811562
milestone19.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 811562 - Decorate %_CallFunction arguments with JSOP_NOTEARG. (r=luke)
js/src/frontend/BytecodeEmitter.cpp
--- a/js/src/frontend/BytecodeEmitter.cpp
+++ b/js/src/frontend/BytecodeEmitter.cpp
@@ -5377,21 +5377,25 @@ EmitCallOrNew(JSContext *cx, BytecodeEmi
             ParseNode *funNode = pn2->pn_next;
             while (funNode->pn_next)
                 funNode = funNode->pn_next;
             if (!EmitTree(cx, bce, funNode))
                 return false;
             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;
             emitArgs = false;
             break;
         }
         if (!EmitNameOp(cx, bce, pn2, callop))
             return false;