Bug 670794: Remove unused variable 'forInLet' from jsemit.cpp. r=waldo
authorDaniel Holbert <dholbert@cs.stanford.edu>
Mon, 11 Jul 2011 18:57:45 -0700
changeset 76040 ab57a16c66fc6df3b72542de6470d949e94f87f0
parent 76039 9df6877bbb9a62987ae9e9caef99e24338f1dd50
child 76041 f2ca662099dac226136749631b5f7f0448bbe7d8
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
reviewerswaldo
bugs670794
milestone8.0a1
Bug 670794: Remove unused variable 'forInLet' from jsemit.cpp. r=waldo
js/src/jsemit.cpp
--- a/js/src/jsemit.cpp
+++ b/js/src/jsemit.cpp
@@ -4097,17 +4097,17 @@ MaybeEmitGroupAssignment(JSContext *cx, 
 #endif /* JS_HAS_DESTRUCTURING */
 
 static JSBool
 EmitVariables(JSContext *cx, JSCodeGenerator *cg, JSParseNode *pn,
               JSBool inLetHead, ptrdiff_t *headNoteIndex)
 {
     bool let, forInVar, first;
 #if JS_HAS_BLOCK_SCOPE
-    bool forInLet, popScope;
+    bool popScope;
     JSStmtInfo *stmt, *scopeStmt;
 #endif
     ptrdiff_t off, noteIndex, tmp;
     JSParseNode *pn2, *pn3, *next;
     JSOp op;
     jsatomid atomIndex;
     uintN oldflags;
 
@@ -4124,17 +4124,16 @@ EmitVariables(JSContext *cx, JSCodeGener
      * The same goes for let declarations in the head of any kind of for loop.
      * Unlike a let declaration 'let x = i' within a block, where x is hoisted
      * to the start of the block, a 'for (let x = i...) ...' loop evaluates i
      * in the containing scope, and puts x in the loop body's scope.
      */
     let = (pn->pn_op == JSOP_NOP);
     forInVar = (pn->pn_xflags & PNX_FORINVAR) != 0;
 #if JS_HAS_BLOCK_SCOPE
-    forInLet = let && forInVar;
     popScope = (inLetHead || (let && (cg->flags & TCF_IN_FOR_INIT)));
     if (popScope) {
         stmt = cg->topStmt;
         scopeStmt = cg->topScopeStmt;
     }
 # ifdef __GNUC__
     else stmt = scopeStmt = NULL;   /* quell GCC overwarning */
 # endif