Bug 932517 - Followup: remove let-block logic in sloppy mode ES6 let declaration check. (rs=evilpie)
authorShu-yu Guo <shu@rfrn.org>
Wed, 28 Oct 2015 14:37:54 -0700
changeset 305260 44d5e0a257191e3103dc31c965c49bd2506b16ae
parent 305259 6b66dba1086c9a5c03a9a695058d47a83a948a4f
child 305261 b73ca97e79ca14e2f81aca2ab5fdce8ecc9041b6
push id1001
push userraliiev@mozilla.com
push dateMon, 18 Jan 2016 19:06:03 +0000
treeherdermozilla-release@8b89261f3ac4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersevilpie
bugs932517
milestone44.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 932517 - Followup: remove let-block logic in sloppy mode ES6 let declaration check. (rs=evilpie)
js/src/frontend/Parser.cpp
--- a/js/src/frontend/Parser.cpp
+++ b/js/src/frontend/Parser.cpp
@@ -6673,28 +6673,20 @@ Parser<ParseHandler>::shouldParseLetDecl
     switch (tt) {
       case TOK_NAME:
         // |let let| is disallowed per ES6 13.3.1.1.
         *parseDeclOut = tokenStream.nextName() != context->names().let;
         break;
 
       case TOK_LC:
       case TOK_LB:
-        // A following name is always a declaration.
-        //
         // |let {| and |let [| are destructuring declarations.
         *parseDeclOut = true;
         break;
 
-      case TOK_LP:
-        // Only parse let blocks for 1.7 and 1.8. Do not expose deprecated let
-        // blocks to content.
-        *parseDeclOut = versionNumber() == JSVERSION_1_7 || versionNumber() == JSVERSION_1_8;
-        break;
-
       default:
         break;
     }
 
     return true;
 }
 
 template <typename ParseHandler>