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 113376 cd90ea966f1813120aeedeae22377bd573cc9f2d
parent 113375 21a1ea0331401cb04f4fb2e7fd9dedde88eed4b7
child 113377 dd93918f374fb96674371ca9e8c3f68d3faf8486
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;