Backed out changeset 4dc794806128 (bug 1317374) for spidermonkey bustage a=backout
authorWes Kocher <wkocher@mozilla.com>
Fri, 13 Jan 2017 17:02:57 -0800
changeset 374453 9e96ce6d55f78b62f9ccb47c1afbf48b750d9ea5
parent 374452 4dc794806128e77d96d05cc730533953466e594f
child 374454 6b716be52be01188cd7c5f82538c55f83d9dad27
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1317374
milestone53.0a1
backs out4dc794806128e77d96d05cc730533953466e594f
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
Backed out changeset 4dc794806128 (bug 1317374) for spidermonkey bustage a=backout MozReview-Commit-ID: EJDwWWtrHTb
js/src/frontend/Parser.cpp
js/src/tests/ecma_6/LexicalEnvironment/block-scoped-functions-annex-b-parameter.js
--- a/js/src/frontend/Parser.cpp
+++ b/js/src/frontend/Parser.cpp
@@ -1172,22 +1172,16 @@ Parser<ParseHandler>::tryDeclareVar(Hand
                 bool annexB33Allowance = declaredKind == DeclarationKind::LexicalFunction &&
                                          kind == DeclarationKind::VarForAnnexBLexicalFunction &&
                                          scope == pc->innermostScope();
 
                 if (!annexB35Allowance && !annexB33Allowance) {
                     *redeclaredKind = Some(declaredKind);
                     return true;
                 }
-            } else if (kind == DeclarationKind::VarForAnnexBLexicalFunction) {
-                MOZ_ASSERT(DeclarationKindIsParameter(declaredKind));
-
-                // Annex B.3.3.1 disallows redeclaring parameter names.
-                *redeclaredKind = Some(declaredKind);
-                return true;
             }
         } else {
             if (!scope->addDeclaredName(pc, p, name, kind))
                 return false;
         }
     }
 
     if (!pc->sc()->strict() && pc->sc()->isEvalContext())
deleted file mode 100644
--- a/js/src/tests/ecma_6/LexicalEnvironment/block-scoped-functions-annex-b-parameter.js
+++ /dev/null
@@ -1,16 +0,0 @@
-// Annex B.3.3.1 disallows Annex B lexical function behavior when redeclaring a
-// parameter.
-
-(function(f) {
-  if (true) function f() {  }
-  assertEq(f, 123);
-}(123));
-
-(function(f) {
-  { function f() {  } }
-  assertEq(f, 123);
-}(123));
-
-
-if (typeof reportCompare === "function")
-  reportCompare(true, true);