From 4fc177867984a52c6fe37f0fa652a31742ea4412 Mon Sep 17 00:00:00 2001 From: Jeff Walden Date: Sun, 13 Nov 2016 00:33:38 -0800 Subject: [PATCH] Bug 1296814 - Remove for-in/of loop parsing code that redundantly marks the loop target as assigned -- Parser::forHeadStart already does this. r=anba --HG-- extra : rebase_source : 62a97d9560f32bc692ddcea345c428d788f664c5 --- js/src/frontend/Parser.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/js/src/frontend/Parser.cpp b/js/src/frontend/Parser.cpp index ca4fb01b9e97..bf7ab773a22f 100644 --- a/js/src/frontend/Parser.cpp +++ b/js/src/frontend/Parser.cpp @@ -5654,12 +5654,6 @@ Parser::forStatement(YieldHandling yieldHandling) stmt.refineForKind(StatementKind::ForOfLoop); } - if (!handler.isDeclarationList(target)) { - MOZ_ASSERT(!forLoopLexicalScope); - if (!checkAndMarkAsAssignmentLhs(target, PlainAssignment)) - return null(); - } - // Parser::declaration consumed everything up to the closing ')'. That // token follows an {Assignment,}Expression, so the next token must be // consumed as if an operator continued the expression, i.e. as None.