Bug 739685 - rm useless makeAtom calls in BindNameToSlot (r=dvander)
authorLuke Wagner <luke@mozilla.com>
Mon, 26 Mar 2012 22:33:28 -0700
changeset 90534 4166e7ce816c0235aeb06c55b72b4abe030dcd94
parent 90533 1c7d12a257d0e784805998a463f4458d3683cb0c
child 90535 d15eb9db765a7a6cb6177fcbc01fbe5e7ab3d201
push id22366
push usermak77@bonardo.net
push dateThu, 29 Mar 2012 15:38:30 +0000
treeherdermozilla-central@ff3521bc6559 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdvander
bugs739685
milestone14.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 739685 - rm useless makeAtom calls in BindNameToSlot (r=dvander)
js/src/frontend/BytecodeEmitter.cpp
--- a/js/src/frontend/BytecodeEmitter.cpp
+++ b/js/src/frontend/BytecodeEmitter.cpp
@@ -1310,40 +1310,32 @@ BindNameToSlot(JSContext *cx, BytecodeEm
 
             JS_ASSERT(caller->isScriptFrame());
 
             /*
              * If this is an eval in the global scope, then unbound variables
              * must be globals, so try to use GNAME ops.
              */
             if (caller->isGlobalFrame() && TryConvertToGname(bce, pn, &op)) {
-                jsatomid _;
-                if (!bce->makeAtomIndex(atom, &_))
-                    return JS_FALSE;
-
                 pn->setOp(op);
                 pn->pn_dflags |= PND_BOUND;
                 return JS_TRUE;
             }
 
             /*
              * Out of tricks, so we must rely on PICs to optimize named
              * accesses from direct eval called from function code.
              */
             return JS_TRUE;
         }
 
         /* Optimize accesses to undeclared globals. */
         if (!TryConvertToGname(bce, pn, &op))
             return JS_TRUE;
 
-        jsatomid _;
-        if (!bce->makeAtomIndex(atom, &_))
-            return JS_FALSE;
-
         pn->setOp(op);
         pn->pn_dflags |= PND_BOUND;
 
         return JS_TRUE;
     }
 
     uint16_t level = cookie.level();
     JS_ASSERT(bce->staticLevel >= level);