Bug 1158547 - Removes the useless declaration in Parser.cpp. r=jorendorff
authorryan <nathmatics@gmail.com>
Tue, 28 Apr 2015 11:44:00 +0200
changeset 273134 86f56b03114ed1c4b8a606e3a6051c59774ee678
parent 273133 439f825c98be0a48ee3b0df9b6d1aedaad729e9d
child 273135 7516ef90ea6045ccecdc611bcd2794b662bcb403
push id863
push userraliiev@mozilla.com
push dateMon, 03 Aug 2015 13:22:43 +0000
treeherdermozilla-release@f6321b14228d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorendorff
bugs1158547
milestone40.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 1158547 - Removes the useless declaration in Parser.cpp. r=jorendorff
js/src/frontend/Parser.cpp
--- a/js/src/frontend/Parser.cpp
+++ b/js/src/frontend/Parser.cpp
@@ -4799,17 +4799,16 @@ Parser<FullParseHandler>::forStatement()
          * Parse the rest of the for/in or for/of head.
          *
          * Here pn1 is everything to the left of 'in' or 'of'. At the end of
          * this block, pn1 is a decl or nullptr, pn2 is the assignment target
          * that receives the enumeration value each iteration, and pn3 is the
          * rhs of 'in'.
          */
         if (headKind == PNK_FOROF) {
-            forStmt.type = STMT_FOR_OF_LOOP;
             forStmt.type = (headKind == PNK_FOROF) ? STMT_FOR_OF_LOOP : STMT_FOR_IN_LOOP;
             if (isForEach) {
                 report(ParseError, false, null(), JSMSG_BAD_FOR_EACH_LOOP);
                 return null();
             }
         } else {
             forStmt.type = STMT_FOR_IN_LOOP;
             iflags |= JSITER_ENUMERATE;