Commit a0a8ecd0 authored by adamk's avatar adamk Committed by Commit bot

Remove runtime flags for sloppy mode block scoping features

These were all on by default in M49 without complaint.

R=littledan@chromium.org

Review URL: https://codereview.chromium.org/1858943002

Cr-Commit-Position: refs/heads/master@{#35342}
parent 920370d1
...@@ -2379,9 +2379,6 @@ void Bootstrapper::ExportExperimentalFromRuntime(Isolate* isolate, ...@@ -2379,9 +2379,6 @@ void Bootstrapper::ExportExperimentalFromRuntime(Isolate* isolate,
#define EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(id) \ #define EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(id) \
void Genesis::InitializeGlobal_##id() {} void Genesis::InitializeGlobal_##id() {}
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy_function)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy_let)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_observe) EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_observe)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode_regexps) EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode_regexps)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_do_expressions) EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_do_expressions)
...@@ -2918,9 +2915,6 @@ bool Genesis::InstallNatives(GlobalContextType context_type) { ...@@ -2918,9 +2915,6 @@ bool Genesis::InstallNatives(GlobalContextType context_type) {
bool Genesis::InstallExperimentalNatives() { bool Genesis::InstallExperimentalNatives() {
static const char* harmony_iterator_close_natives[] = {nullptr}; static const char* harmony_iterator_close_natives[] = {nullptr};
static const char* harmony_sloppy_natives[] = {nullptr};
static const char* harmony_sloppy_function_natives[] = {nullptr};
static const char* harmony_sloppy_let_natives[] = {nullptr};
static const char* harmony_species_natives[] = {"native harmony-species.js", static const char* harmony_species_natives[] = {"native harmony-species.js",
nullptr}; nullptr};
static const char* harmony_tailcalls_natives[] = {nullptr}; static const char* harmony_tailcalls_natives[] = {nullptr};
......
...@@ -219,9 +219,6 @@ DEFINE_IMPLICATION(es_staging, move_object_start) ...@@ -219,9 +219,6 @@ DEFINE_IMPLICATION(es_staging, move_object_start)
V(harmony_iterator_close, "harmony iterator finalization") \ V(harmony_iterator_close, "harmony iterator finalization") \
V(harmony_unicode_regexps, "harmony unicode regexps") \ V(harmony_unicode_regexps, "harmony unicode regexps") \
V(harmony_regexp_exec, "harmony RegExp exec override behavior") \ V(harmony_regexp_exec, "harmony RegExp exec override behavior") \
V(harmony_sloppy, "harmony features in sloppy mode") \
V(harmony_sloppy_let, "harmony let in sloppy mode") \
V(harmony_sloppy_function, "harmony sloppy function block scoping") \
V(harmony_regexp_subclass, "harmony regexp subclassing") \ V(harmony_regexp_subclass, "harmony regexp subclassing") \
V(harmony_restrictive_declarations, \ V(harmony_restrictive_declarations, \
"harmony limitations on sloppy mode function declarations") \ "harmony limitations on sloppy mode function declarations") \
...@@ -250,11 +247,6 @@ HARMONY_STAGED(FLAG_STAGED_FEATURES) ...@@ -250,11 +247,6 @@ HARMONY_STAGED(FLAG_STAGED_FEATURES)
HARMONY_SHIPPING(FLAG_SHIPPING_FEATURES) HARMONY_SHIPPING(FLAG_SHIPPING_FEATURES)
#undef FLAG_SHIPPING_FEATURES #undef FLAG_SHIPPING_FEATURES
// Feature dependencies.
DEFINE_IMPLICATION(harmony_sloppy_let, harmony_sloppy)
DEFINE_IMPLICATION(harmony_sloppy_function, harmony_sloppy)
// Flags for experimental implementation features. // Flags for experimental implementation features.
DEFINE_BOOL(compiled_keyed_generic_loads, false, DEFINE_BOOL(compiled_keyed_generic_loads, false,
"use optimizing compiler to generate keyed generic load stubs") "use optimizing compiler to generate keyed generic load stubs")
......
...@@ -430,9 +430,6 @@ class CallSite { ...@@ -430,9 +430,6 @@ class CallSite {
T(SloppyFunction, \ T(SloppyFunction, \
"In non-strict mode code, functions can only be declared at top level, " \ "In non-strict mode code, functions can only be declared at top level, " \
"inside a block, or as the body of an if statement.") \ "inside a block, or as the body of an if statement.") \
T(SloppyLexical, \
"Block-scoped declarations (let, const, function, class) not yet " \
"supported outside strict mode") \
T(SpeciesNotConstructor, \ T(SpeciesNotConstructor, \
"object.constructor[Symbol.species] is not a constructor") \ "object.constructor[Symbol.species] is not a constructor") \
T(StrictDelete, "Delete of an unqualified identifier in strict mode.") \ T(StrictDelete, "Delete of an unqualified identifier in strict mode.") \
......
...@@ -113,9 +113,6 @@ class ParserBase : public Traits { ...@@ -113,9 +113,6 @@ class ParserBase : public Traits {
allow_lazy_(false), allow_lazy_(false),
allow_natives_(false), allow_natives_(false),
allow_tailcalls_(false), allow_tailcalls_(false),
allow_harmony_sloppy_(false),
allow_harmony_sloppy_function_(false),
allow_harmony_sloppy_let_(false),
allow_harmony_restrictive_declarations_(false), allow_harmony_restrictive_declarations_(false),
allow_harmony_do_expressions_(false), allow_harmony_do_expressions_(false),
allow_harmony_function_name_(false), allow_harmony_function_name_(false),
...@@ -134,9 +131,6 @@ class ParserBase : public Traits { ...@@ -134,9 +131,6 @@ class ParserBase : public Traits {
ALLOW_ACCESSORS(lazy); ALLOW_ACCESSORS(lazy);
ALLOW_ACCESSORS(natives); ALLOW_ACCESSORS(natives);
ALLOW_ACCESSORS(tailcalls); ALLOW_ACCESSORS(tailcalls);
ALLOW_ACCESSORS(harmony_sloppy);
ALLOW_ACCESSORS(harmony_sloppy_function);
ALLOW_ACCESSORS(harmony_sloppy_let);
ALLOW_ACCESSORS(harmony_restrictive_declarations); ALLOW_ACCESSORS(harmony_restrictive_declarations);
ALLOW_ACCESSORS(harmony_do_expressions); ALLOW_ACCESSORS(harmony_do_expressions);
ALLOW_ACCESSORS(harmony_function_name); ALLOW_ACCESSORS(harmony_function_name);
...@@ -564,14 +558,6 @@ class ParserBase : public Traits { ...@@ -564,14 +558,6 @@ class ParserBase : public Traits {
LanguageMode language_mode() { return scope_->language_mode(); } LanguageMode language_mode() { return scope_->language_mode(); }
bool is_generator() const { return function_state_->is_generator(); } bool is_generator() const { return function_state_->is_generator(); }
bool allow_const() {
return is_strict(language_mode()) || allow_harmony_sloppy();
}
bool allow_let() {
return is_strict(language_mode()) || allow_harmony_sloppy_let();
}
// Report syntax errors. // Report syntax errors.
void ReportMessage(MessageTemplate::Template message, const char* arg = NULL, void ReportMessage(MessageTemplate::Template message, const char* arg = NULL,
ParseErrorType error_type = kSyntaxError) { ParseErrorType error_type = kSyntaxError) {
...@@ -926,9 +912,6 @@ class ParserBase : public Traits { ...@@ -926,9 +912,6 @@ class ParserBase : public Traits {
bool allow_lazy_; bool allow_lazy_;
bool allow_natives_; bool allow_natives_;
bool allow_tailcalls_; bool allow_tailcalls_;
bool allow_harmony_sloppy_;
bool allow_harmony_sloppy_function_;
bool allow_harmony_sloppy_let_;
bool allow_harmony_restrictive_declarations_; bool allow_harmony_restrictive_declarations_;
bool allow_harmony_do_expressions_; bool allow_harmony_do_expressions_;
bool allow_harmony_function_name_; bool allow_harmony_function_name_;
...@@ -1329,11 +1312,6 @@ ParserBase<Traits>::ParsePrimaryExpression(ExpressionClassifier* classifier, ...@@ -1329,11 +1312,6 @@ ParserBase<Traits>::ParsePrimaryExpression(ExpressionClassifier* classifier,
case Token::CLASS: { case Token::CLASS: {
BindingPatternUnexpectedToken(classifier); BindingPatternUnexpectedToken(classifier);
Consume(Token::CLASS); Consume(Token::CLASS);
if (!allow_harmony_sloppy() && is_sloppy(language_mode())) {
ReportMessage(MessageTemplate::kSloppyLexical);
*ok = false;
return this->EmptyExpression();
}
int class_token_position = position(); int class_token_position = position();
IdentifierT name = this->EmptyIdentifier(); IdentifierT name = this->EmptyIdentifier();
bool is_strict_reserved_name = false; bool is_strict_reserved_name = false;
...@@ -2787,9 +2765,6 @@ void ParserBase<Traits>::CheckArityRestrictions(int param_count, ...@@ -2787,9 +2765,6 @@ void ParserBase<Traits>::CheckArityRestrictions(int param_count,
template <class Traits> template <class Traits>
bool ParserBase<Traits>::IsNextLetKeyword() { bool ParserBase<Traits>::IsNextLetKeyword() {
DCHECK(peek() == Token::LET); DCHECK(peek() == Token::LET);
if (!allow_let()) {
return false;
}
Token::Value next_next = PeekAhead(); Token::Value next_next = PeekAhead();
switch (next_next) { switch (next_next) {
case Token::LBRACE: case Token::LBRACE:
...@@ -2890,9 +2865,7 @@ ParserBase<Traits>::ParseArrowFunctionLiteral( ...@@ -2890,9 +2865,7 @@ ParserBase<Traits>::ParseArrowFunctionLiteral(
CheckStrictOctalLiteral(formal_parameters.scope->start_position(), CheckStrictOctalLiteral(formal_parameters.scope->start_position(),
scanner()->location().end_pos, CHECK_OK); scanner()->location().end_pos, CHECK_OK);
} }
if (is_strict(language_mode()) || allow_harmony_sloppy()) { this->CheckConflictingVarDeclarations(formal_parameters.scope, CHECK_OK);
this->CheckConflictingVarDeclarations(formal_parameters.scope, CHECK_OK);
}
Traits::RewriteDestructuringAssignments(); Traits::RewriteDestructuringAssignments();
} }
......
This diff is collapsed.
...@@ -182,10 +182,7 @@ PreParser::Statement PreParser::ParseStatementListItem(bool* ok) { ...@@ -182,10 +182,7 @@ PreParser::Statement PreParser::ParseStatementListItem(bool* ok) {
case Token::CLASS: case Token::CLASS:
return ParseClassDeclaration(ok); return ParseClassDeclaration(ok);
case Token::CONST: case Token::CONST:
if (allow_const()) { return ParseVariableStatement(kStatementListItem, ok);
return ParseVariableStatement(kStatementListItem, ok);
}
break;
case Token::LET: case Token::LET:
if (IsNextLetKeyword()) { if (IsNextLetKeyword()) {
return ParseVariableStatement(kStatementListItem, ok); return ParseVariableStatement(kStatementListItem, ok);
...@@ -403,11 +400,6 @@ PreParser::Statement PreParser::ParseFunctionDeclaration(bool* ok) { ...@@ -403,11 +400,6 @@ PreParser::Statement PreParser::ParseFunctionDeclaration(bool* ok) {
PreParser::Statement PreParser::ParseClassDeclaration(bool* ok) { PreParser::Statement PreParser::ParseClassDeclaration(bool* ok) {
Expect(Token::CLASS, CHECK_OK); Expect(Token::CLASS, CHECK_OK);
if (!allow_harmony_sloppy() && is_sloppy(language_mode())) {
ReportMessage(MessageTemplate::kSloppyLexical);
*ok = false;
return Statement::Default();
}
int pos = position(); int pos = position();
bool is_strict_reserved = false; bool is_strict_reserved = false;
...@@ -473,7 +465,7 @@ PreParser::Statement PreParser::ParseVariableDeclarations( ...@@ -473,7 +465,7 @@ PreParser::Statement PreParser::ParseVariableDeclarations(
bool is_pattern = false; bool is_pattern = false;
if (peek() == Token::VAR) { if (peek() == Token::VAR) {
Consume(Token::VAR); Consume(Token::VAR);
} else if (peek() == Token::CONST && allow_const()) { } else if (peek() == Token::CONST) {
// TODO(ES6): The ES6 Draft Rev4 section 12.2.2 reads: // TODO(ES6): The ES6 Draft Rev4 section 12.2.2 reads:
// //
// ConstDeclaration : const ConstBinding (',' ConstBinding)* ';' // ConstDeclaration : const ConstBinding (',' ConstBinding)* ';'
...@@ -485,12 +477,10 @@ PreParser::Statement PreParser::ParseVariableDeclarations( ...@@ -485,12 +477,10 @@ PreParser::Statement PreParser::ParseVariableDeclarations(
// existing pages. Therefore we keep allowing const with the old // existing pages. Therefore we keep allowing const with the old
// non-harmony semantics in sloppy mode. // non-harmony semantics in sloppy mode.
Consume(Token::CONST); Consume(Token::CONST);
if (is_strict(language_mode()) || allow_harmony_sloppy()) { DCHECK(var_context != kStatement);
DCHECK(var_context != kStatement); require_initializer = true;
require_initializer = true; lexical = true;
lexical = true; } else if (peek() == Token::LET) {
}
} else if (peek() == Token::LET && allow_let()) {
Consume(Token::LET); Consume(Token::LET);
DCHECK(var_context != kStatement); DCHECK(var_context != kStatement);
lexical = true; lexical = true;
...@@ -606,14 +596,6 @@ PreParser::Statement PreParser::ParseExpressionOrLabelledStatement( ...@@ -606,14 +596,6 @@ PreParser::Statement PreParser::ParseExpressionOrLabelledStatement(
// accept "native function" in the preparser. // accept "native function" in the preparser.
} }
// Parsed expression statement. // Parsed expression statement.
// Detect attempts at 'let' declarations in sloppy mode.
if (!allow_harmony_sloppy_let() && peek() == Token::IDENTIFIER &&
is_sloppy(language_mode()) && expr.IsIdentifier() &&
expr.AsIdentifier().IsLet()) {
ReportMessage(MessageTemplate::kSloppyLexical, NULL);
*ok = false;
return Statement::Default();
}
ExpectSemicolon(CHECK_OK); ExpectSemicolon(CHECK_OK);
return Statement::ExpressionStatement(expr); return Statement::ExpressionStatement(expr);
} }
...@@ -790,10 +772,9 @@ PreParser::Statement PreParser::ParseForStatement(bool* ok) { ...@@ -790,10 +772,9 @@ PreParser::Statement PreParser::ParseForStatement(bool* ok) {
Expect(Token::FOR, CHECK_OK); Expect(Token::FOR, CHECK_OK);
Expect(Token::LPAREN, CHECK_OK); Expect(Token::LPAREN, CHECK_OK);
bool is_let_identifier_expression = false;
if (peek() != Token::SEMICOLON) { if (peek() != Token::SEMICOLON) {
ForEachStatement::VisitMode mode; ForEachStatement::VisitMode mode;
if (peek() == Token::VAR || (peek() == Token::CONST && allow_const()) || if (peek() == Token::VAR || peek() == Token::CONST ||
(peek() == Token::LET && IsNextLetKeyword())) { (peek() == Token::LET && IsNextLetKeyword())) {
int decl_count; int decl_count;
bool is_lexical; bool is_lexical;
...@@ -839,8 +820,6 @@ PreParser::Statement PreParser::ParseForStatement(bool* ok) { ...@@ -839,8 +820,6 @@ PreParser::Statement PreParser::ParseForStatement(bool* ok) {
ExpressionClassifier classifier(this); ExpressionClassifier classifier(this);
Expression lhs = ParseExpression(false, &classifier, CHECK_OK); Expression lhs = ParseExpression(false, &classifier, CHECK_OK);
int lhs_end_pos = scanner()->location().end_pos; int lhs_end_pos = scanner()->location().end_pos;
is_let_identifier_expression =
lhs.IsIdentifier() && lhs.AsIdentifier().IsLet();
bool is_for_each = CheckInOrOf(&mode, ok); bool is_for_each = CheckInOrOf(&mode, ok);
if (!*ok) return Statement::Default(); if (!*ok) return Statement::Default();
bool is_destructuring = is_for_each && bool is_destructuring = is_for_each &&
...@@ -875,13 +854,6 @@ PreParser::Statement PreParser::ParseForStatement(bool* ok) { ...@@ -875,13 +854,6 @@ PreParser::Statement PreParser::ParseForStatement(bool* ok) {
} }
// Parsed initializer at this point. // Parsed initializer at this point.
// Detect attempts at 'let' declarations in sloppy mode.
if (!allow_harmony_sloppy_let() && peek() == Token::IDENTIFIER &&
is_sloppy(language_mode()) && is_let_identifier_expression) {
ReportMessage(MessageTemplate::kSloppyLexical, NULL);
*ok = false;
return Statement::Default();
}
Expect(Token::SEMICOLON, CHECK_OK); Expect(Token::SEMICOLON, CHECK_OK);
if (peek() != Token::SEMICOLON) { if (peek() != Token::SEMICOLON) {
......
...@@ -512,7 +512,6 @@ TEST(RegExpLiteral) { ...@@ -512,7 +512,6 @@ TEST(RegExpLiteral) {
TEST(ClassLiteral) { TEST(ClassLiteral) {
FLAG_harmony_sloppy = true;
const char* src = const char* src =
"(function(a,b) {" "(function(a,b) {"
" class C {" " class C {"
......
...@@ -61,7 +61,6 @@ std::string Validate(Zone* zone, const char* source, ...@@ -61,7 +61,6 @@ std::string Validate(Zone* zone, const char* source,
i::ParseInfo info(zone, script); i::ParseInfo info(zone, script);
i::Parser parser(&info); i::Parser parser(&info);
parser.set_allow_harmony_sloppy(true);
info.set_global(); info.set_global();
info.set_lazy(false); info.set_lazy(false);
info.set_allow_lazy_parsing(false); info.set_allow_lazy_parsing(false);
......
...@@ -31,7 +31,6 @@ static void CollectTypes(HandleAndZoneScope* handles, const char* source, ...@@ -31,7 +31,6 @@ static void CollectTypes(HandleAndZoneScope* handles, const char* source,
i::ParseInfo info(handles->main_zone(), script); i::ParseInfo info(handles->main_zone(), script);
i::Parser parser(&info); i::Parser parser(&info);
parser.set_allow_harmony_sloppy(true);
info.set_global(); info.set_global();
info.set_lazy(false); info.set_lazy(false);
info.set_allow_lazy_parsing(false); info.set_allow_lazy_parsing(false);
......
This diff is collapsed.
...@@ -271,7 +271,6 @@ TEST(ResetTypingInfo) { ...@@ -271,7 +271,6 @@ TEST(ResetTypingInfo) {
i::ParseInfo info(handles.main_zone(), script); i::ParseInfo info(handles.main_zone(), script);
i::Parser parser(&info); i::Parser parser(&info);
parser.set_allow_harmony_sloppy(true);
info.set_global(); info.set_global();
info.set_lazy(false); info.set_lazy(false);
info.set_allow_lazy_parsing(false); info.set_allow_lazy_parsing(false);
......
// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Flags: --harmony-sloppy
function f() {
const a;
}
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
// Flags: --harmony-sloppy --harmony-sloppy-let //
let [let]; let [let];
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
// Flags: --harmony-sloppy --harmony-sloppy-let //
let {let}; let {let};
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
// Flags: --harmony-sloppy --harmony-sloppy-let //
let let; let let;
// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Flags: --no-harmony-sloppy --no-harmony-sloppy-let
// Flags: --no-harmony-sloppy-function
const = 42;
*%(basename)s:8: SyntaxError: Unexpected token const
const = 42;
^^^^^
SyntaxError: Unexpected token const
// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Flags: --no-harmony-sloppy --no-harmony-sloppy-let
// Flags: --no-harmony-sloppy-function
const
*%(basename)s:8: SyntaxError: Unexpected token const
const
^^^^^
SyntaxError: Unexpected token const
// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Flags: --no-harmony-sloppy --no-harmony-sloppy-let
// Flags: --no-harmony-sloppy-function
const x = 42;
*%(basename)s:8: SyntaxError: Unexpected token const
const x = 42;
^^^^^
SyntaxError: Unexpected token const
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
// Test for conflicting variable bindings. // Test for conflicting variable bindings.
// Flags: --harmony-sloppy --harmony-sloppy-let --harmony-sloppy-function
function CheckException(e) { function CheckException(e) {
var string = e.toString(); var string = e.toString();
assertTrue(string.indexOf("has already been declared") >= 0 || assertTrue(string.indexOf("has already been declared") >= 0 ||
......
...@@ -25,8 +25,6 @@ ...@@ -25,8 +25,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --harmony-sloppy --harmony-sloppy-let
// Test that we throw early syntax errors in harmony mode // Test that we throw early syntax errors in harmony mode
// when using an immutable binding in an assigment or with // when using an immutable binding in an assigment or with
// prefix/postfix decrement/increment operators. // prefix/postfix decrement/increment operators.
......
// Copyright 2011 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following
// disclaimer in the documentation and/or other materials provided
// with the distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --no-harmony-sloppy-let
function CheckException(e) {
var string = e.toString();
assertInstanceof(e, SyntaxError);
}
function Check(str) {
try {
eval("(function () { " + str + " })");
assertUnreachable();
} catch (e) {
CheckException(e);
}
try {
eval("(function () { { " + str + " } })");
assertUnreachable();
} catch (e) {
CheckException(e);
}
}
// Check for early syntax errors when using let
// declarations outside of strict mode.
Check("let x;");
Check("let x = 1;");
Check("let x, y;");
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-sloppy --harmony-sloppy-let --harmony-sloppy-function
// Var-let conflict in a function throws, even if the var is in an eval // Var-let conflict in a function throws, even if the var is in an eval
// Throws at the top level of a function // Throws at the top level of a function
......
...@@ -25,8 +25,6 @@ ...@@ -25,8 +25,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --harmony-sloppy --harmony-sloppy-let
function props(x) { function props(x) {
var array = []; var array = [];
for (let p in x) array.push(p); for (let p in x) array.push(p);
......
...@@ -25,8 +25,6 @@ ...@@ -25,8 +25,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --harmony-sloppy --harmony-sloppy-let
// We want to test the context chain shape. In each of the tests cases // We want to test the context chain shape. In each of the tests cases
// below, the outer with is to force a runtime lookup of the identifier 'x' // below, the outer with is to force a runtime lookup of the identifier 'x'
// to actually verify that the inner context has been discarded. A static // to actually verify that the inner context has been discarded. A static
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-sloppy --harmony-sloppy-let
// let is usable as a variable with var, but not let or ES6 const // let is usable as a variable with var, but not let or ES6 const
(function (){ (function (){
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax // Flags: --allow-natives-syntax
// Flags: --harmony-sloppy --harmony-sloppy-let
// Check that the following functions are optimizable. // Check that the following functions are optimizable.
var functions = [ f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, var functions = [ f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14,
......
...@@ -27,8 +27,6 @@ ...@@ -27,8 +27,6 @@
// Test let declarations in various settings. // Test let declarations in various settings.
// Flags: --harmony-sloppy --harmony-sloppy-let
// Global // Global
let x; let x;
let y = 2; let y = 2;
......
...@@ -25,8 +25,6 @@ ...@@ -25,8 +25,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --harmony-sloppy --harmony-sloppy-let --harmony-sloppy-function
// Test temporal dead zone semantics of let bound variables in // Test temporal dead zone semantics of let bound variables in
// function and block scopes. // function and block scopes.
......
// Copyright 2014 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --no-harmony-sloppy-let --no-harmony-sloppy-function
// Flags: --no-harmony-sloppy
function CheckError(source) {
var exception = null;
try {
eval(source);
} catch (e) {
exception = e;
}
assertNotNull(exception);
assertEquals(
"Block-scoped declarations (let, const, function, class) not yet supported outside strict mode",
exception.message);
}
function CheckOk(source) {
eval(source);
}
CheckError("let x = 1;");
CheckError("{ let x = 1; }");
CheckError("function f() { let x = 1; }");
CheckError("for (let x = 1; x < 1; x++) {}");
CheckError("for (let x of []) {}");
CheckError("for (let x in []) {}");
CheckError("class C {}");
CheckError("class C extends Array {}");
CheckError("(class {});");
CheckError("(class extends Array {});");
CheckError("(class C {});");
CheckError("(class C exends Array {});");
CheckOk("let = 1;");
CheckOk("{ let = 1; }");
CheckOk("function f() { let = 1; }");
CheckOk("for (let = 1; let < 1; let++) {}");
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
// Test for conflicting variable bindings. // Test for conflicting variable bindings.
// Flags: --harmony-sloppy --harmony-sloppy-function
function AssertEqualsStrictAndSloppy(value, code) { function AssertEqualsStrictAndSloppy(value, code) {
assertEquals(value, eval("(function() {" + code + "})()")); assertEquals(value, eval("(function() {" + code + "})()"));
assertEquals(value, eval("(function() { 'use strict'; " + code + "})()")); assertEquals(value, eval("(function() { 'use strict'; " + code + "})()"));
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --harmony-sloppy --harmony-sloppy-let --harmony-sloppy-function // Flags: --allow-natives-syntax
// Test functionality of block scopes. // Test functionality of block scopes.
// Hoisting of var declarations. // Hoisting of var declarations.
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --min-preparse-length=0 // Flags: --min-preparse-length=0
// Flags: --harmony-sloppy --harmony-sloppy-let
let xxx = 1; let xxx = 1;
let f = undefined; let f = undefined;
......
...@@ -2,9 +2,6 @@ ...@@ -2,9 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-sloppy --harmony-sloppy-let
// Flags: --harmony-sloppy-function
// Test Annex B 3.3 semantics for functions declared in blocks in sloppy mode. // Test Annex B 3.3 semantics for functions declared in blocks in sloppy mode.
// http://www.ecma-international.org/ecma-262/6.0/#sec-block-level-function-declarations-web-legacy-compatibility-semantics // http://www.ecma-international.org/ecma-262/6.0/#sec-block-level-function-declarations-web-legacy-compatibility-semantics
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-sloppy
// Flags: --allow-natives-syntax // Flags: --allow-natives-syntax
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-sloppy
(function Method() { (function Method() {
class C { class C {
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-sloppy
class Base {} class Base {}
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-sloppy --harmony-function-name --allow-natives-syntax // Flags: --allow-natives-syntax
(function TestBasics() { (function TestBasics() {
var C = class C {} var C = class C {}
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-sloppy-let
function assertUndef(x) { function assertUndef(x) {
assertEquals(undefined, x); assertEquals(undefined, x);
......
// Copyright 2015 the V8 project authors. All rights reserved. // Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
//
// Flags: --harmony-sloppy
assertEquals("function", (function f() { f = 42; return typeof f })()); assertEquals("function", (function f() { f = 42; return typeof f })());
assertEquals("function", assertEquals("function",
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-sloppy
(function testConstructClassStrict() { (function testConstructClassStrict() {
"use strict"; "use strict";
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-sloppy
(function testCallSuperPropertyStrict() { (function testCallSuperPropertyStrict() {
"use strict"; "use strict";
class BaseClass { class BaseClass {
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --allow-natives-syntax // Flags: --allow-natives-syntax
// Flags: --harmony-sloppy
(function TestSuperNamedLoads() { (function TestSuperNamedLoads() {
function Base() { } function Base() { }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-do-expressions --harmony-sloppy-let --allow-natives-syntax // Flags: --harmony-do-expressions --allow-natives-syntax
function returnValue(v) { return v; } function returnValue(v) { return v; }
function MyError() {} function MyError() {}
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-sloppy --harmony-sloppy-let
// See: http://code.google.com/p/v8/issues/detail?id=3926 // See: http://code.google.com/p/v8/issues/detail?id=3926
// Switch statements should disable hole check elimination // Switch statements should disable hole check elimination
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
// Flags: --harmony-sloppy-function
// In sloppy mode we allow function redeclarations within blocks for webcompat. // In sloppy mode we allow function redeclarations within blocks for webcompat.
(function() { (function() {
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-sloppy-let --harmony-sloppy
// Test that hoisting a function out of a lexical scope does not // Test that hoisting a function out of a lexical scope does not
// lead to a parsing error // lead to a parsing error
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-sloppy --harmony-sloppy-function --harmony-sloppy-let
// Flags: --no-harmony-restrictive-declarations // Flags: --no-harmony-restrictive-declarations
// At some point, this code led to DCHECK errors in debug mode // At some point, this code led to DCHECK errors in debug mode
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-sloppy --harmony-sloppy-function
// Flags: --no-harmony-restrictive-declarations // Flags: --no-harmony-restrictive-declarations
// Previously, this caused a CHECK fail in debug mode // Previously, this caused a CHECK fail in debug mode
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-sloppy --harmony-sloppy-function
// Flags: --no-harmony-restrictive-declarations // Flags: --no-harmony-restrictive-declarations
(function() { (function() {
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --harmony-sloppy
assertThrows(function f() { assertThrows(function f() {
var t = { toString: function() { throw new Error(); } }; var t = { toString: function() { throw new Error(); } };
var o = { [t]: 23 }; var o = { [t]: 23 };
......
...@@ -21,8 +21,6 @@ ...@@ -21,8 +21,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --harmony-sloppy
description('Tests for ES6 class constructor return values'); description('Tests for ES6 class constructor return values');
// ES6 // ES6
......
...@@ -21,8 +21,6 @@ ...@@ -21,8 +21,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --harmony-sloppy
description('Tests for calling the constructors of ES6 classes'); description('Tests for calling the constructors of ES6 classes');
class A { constructor() {} }; class A { constructor() {} };
......
...@@ -21,8 +21,6 @@ ...@@ -21,8 +21,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --harmony-sloppy
description('Tests for ES6 class syntax declarations'); description('Tests for ES6 class syntax declarations');
var constructorCallCount = 0; var constructorCallCount = 0;
......
...@@ -21,8 +21,6 @@ ...@@ -21,8 +21,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --harmony-sloppy
description('Tests for ES6 class syntax default constructor'); description('Tests for ES6 class syntax default constructor');
class A { }; class A { };
......
...@@ -21,8 +21,6 @@ ...@@ -21,8 +21,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --harmony-sloppy
description('Tests for ES6 class syntax expressions'); description('Tests for ES6 class syntax expressions');
var constructorCallCount = 0; var constructorCallCount = 0;
......
...@@ -21,8 +21,6 @@ ...@@ -21,8 +21,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --harmony-sloppy
description('Tests for ES6 class syntax "extends"'); description('Tests for ES6 class syntax "extends"');
class Base { class Base {
......
...@@ -21,8 +21,6 @@ ...@@ -21,8 +21,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --harmony-sloppy
description('Tests for ES6 class name semantics in class statements and expressions'); description('Tests for ES6 class name semantics in class statements and expressions');
function runTestShouldBe(statement, result) { function runTestShouldBe(statement, result) {
......
...@@ -21,8 +21,6 @@ ...@@ -21,8 +21,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --harmony-sloppy
description('Tests for the descriptors of the properties implicitly defined by ES6 class syntax'); description('Tests for the descriptors of the properties implicitly defined by ES6 class syntax');
function descriptor(object, propertyName) { function descriptor(object, propertyName) {
......
...@@ -21,8 +21,6 @@ ...@@ -21,8 +21,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --harmony-sloppy
description('Tests for scoping of variables in ES6 class syntax'); description('Tests for scoping of variables in ES6 class syntax');
var local = "FAIL"; var local = "FAIL";
......
...@@ -21,8 +21,6 @@ ...@@ -21,8 +21,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --harmony-sloppy
description('Tests for ES6 class syntax containing semicolon in the class body'); description('Tests for ES6 class syntax containing semicolon in the class body');
shouldThrow("class A { foo;() { } }", "'SyntaxError: Unexpected token ;'"); shouldThrow("class A { foo;() { } }", "'SyntaxError: Unexpected token ;'");
......
...@@ -21,8 +21,6 @@ ...@@ -21,8 +21,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --harmony-sloppy
description('Tests for ES6 class syntax "super"'); description('Tests for ES6 class syntax "super"');
var baseMethodValue = {}; var baseMethodValue = {};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment