diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc index 37beeff7dd..4ababef2d7 100644 --- a/src/bootstrapper.cc +++ b/src/bootstrapper.cc @@ -1843,7 +1843,6 @@ EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrow_functions) EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_tostring) EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_sloppy) EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_sloppy_let) -EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode) EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode_regexps) EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_computed_property_names) EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_rest_parameters) @@ -1881,7 +1880,6 @@ EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrow_functions) EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_proxies) EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy) EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy_let) -EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode) EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_computed_property_names) EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_rest_parameters) EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_spreadcalls) @@ -2565,7 +2563,6 @@ bool Genesis::InstallExperimentalNatives() { nullptr}; static const char* harmony_sloppy_natives[] = {nullptr}; static const char* harmony_sloppy_let_natives[] = {nullptr}; - static const char* harmony_unicode_natives[] = {nullptr}; static const char* harmony_unicode_regexps_natives[] = {nullptr}; static const char* harmony_computed_property_names_natives[] = {nullptr}; static const char* harmony_rest_parameters_natives[] = {nullptr}; diff --git a/src/flag-definitions.h b/src/flag-definitions.h index 50132151a5..bfd966ad01 100644 --- a/src/flag-definitions.h +++ b/src/flag-definitions.h @@ -213,7 +213,6 @@ DEFINE_BOOL(legacy_const, true, "legacy semantics for const in sloppy mode") V(harmony_object_observe, "harmony Object.observe") \ V(harmony_spreadcalls, "harmony spread-calls") \ V(harmony_spread_arrays, "harmony spread in array literals") \ - V(harmony_unicode, "harmony unicode escapes") \ V(harmony_object, "harmony Object methods") // Once a shipping feature has proved stable in the wild, it will be dropped @@ -241,7 +240,6 @@ HARMONY_SHIPPING(FLAG_SHIPPING_FEATURES) // Feature dependencies. -DEFINE_IMPLICATION(harmony_unicode_regexps, harmony_unicode) DEFINE_IMPLICATION(harmony_sloppy_let, harmony_sloppy) diff --git a/src/parser.cc b/src/parser.cc index febeadd60a..711c9ef8d1 100644 --- a/src/parser.cc +++ b/src/parser.cc @@ -913,7 +913,6 @@ Parser::Parser(ParseInfo* info) set_allow_harmony_arrow_functions(FLAG_harmony_arrow_functions); set_allow_harmony_sloppy(FLAG_harmony_sloppy); set_allow_harmony_sloppy_let(FLAG_harmony_sloppy_let); - set_allow_harmony_unicode(FLAG_harmony_unicode); set_allow_harmony_computed_property_names( FLAG_harmony_computed_property_names); set_allow_harmony_rest_parameters(FLAG_harmony_rest_parameters); @@ -4493,7 +4492,6 @@ PreParser::PreParseResult Parser::ParseLazyFunctionBodyWithPreParser( SET_ALLOW(harmony_arrow_functions); SET_ALLOW(harmony_sloppy); SET_ALLOW(harmony_sloppy_let); - SET_ALLOW(harmony_unicode); SET_ALLOW(harmony_computed_property_names); SET_ALLOW(harmony_rest_parameters); SET_ALLOW(harmony_spreadcalls); diff --git a/src/preparser.h b/src/preparser.h index 53b3266ac7..f4961e76a8 100644 --- a/src/preparser.h +++ b/src/preparser.h @@ -139,10 +139,6 @@ class ParserBase : public Traits { ALLOW_ACCESSORS(legacy_const); #undef ALLOW_ACCESSORS - bool allow_harmony_unicode() const { return scanner()->HarmonyUnicode(); } - - void set_allow_harmony_unicode(bool a) { scanner()->SetHarmonyUnicode(a); } - protected: enum AllowRestrictedIdentifiers { kAllowRestrictedIdentifiers, diff --git a/src/scanner.cc b/src/scanner.cc index d0ed539281..c6c0a8d6a2 100644 --- a/src/scanner.cc +++ b/src/scanner.cc @@ -40,8 +40,7 @@ void Utf16CharacterStream::ResetToBookmark() { UNREACHABLE(); } Scanner::Scanner(UnicodeCache* unicode_cache) : unicode_cache_(unicode_cache), bookmark_c0_(kNoBookmark), - octal_pos_(Location::invalid()), - harmony_unicode_(false) { + octal_pos_(Location::invalid()) { bookmark_current_.literal_chars = &bookmark_current_literal_; bookmark_current_.raw_literal_chars = &bookmark_current_raw_literal_; bookmark_next_.literal_chars = &bookmark_next_literal_; @@ -1075,10 +1074,9 @@ uc32 Scanner::ScanIdentifierUnicodeEscape() { template uc32 Scanner::ScanUnicodeEscape() { - // Accept both \uxxxx and \u{xxxxxx} (if harmony unicode escapes are - // allowed). In the latter case, the number of hex digits between { } is - // arbitrary. \ and u have already been read. - if (c0_ == '{' && HarmonyUnicode()) { + // Accept both \uxxxx and \u{xxxxxx}. In the latter case, the number of + // hex digits between { } is arbitrary. \ and u have already been read. + if (c0_ == '{') { Advance(); uc32 cp = ScanUnlimitedLengthHexNumber(0x10ffff); if (cp < 0) { diff --git a/src/scanner.h b/src/scanner.h index 16c0676013..8966d01584 100644 --- a/src/scanner.h +++ b/src/scanner.h @@ -478,9 +478,6 @@ class Scanner { // tokens, which is what it is used for. void SeekForward(int pos); - bool HarmonyUnicode() const { return harmony_unicode_; } - void SetHarmonyUnicode(bool unicode) { harmony_unicode_ = unicode; } - // Returns true if there was a line terminator before the peek'ed token, // possibly inside a multi-line comment. bool HasAnyLineTerminatorBeforeNext() const { @@ -790,8 +787,6 @@ class Scanner { // Whether there is a multi-line comment that contains a // line-terminator after the current token, and before the next. bool has_multiline_comment_before_next_; - // Whether we allow \u{xxxxx}. - bool harmony_unicode_; }; } } // namespace v8::internal diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc index 7ec0d3f12e..f104bfb830 100644 --- a/test/cctest/test-parsing.cc +++ b/test/cctest/test-parsing.cc @@ -1429,7 +1429,6 @@ enum ParserFlag { kAllowHarmonyRestParameters, kAllowHarmonySloppy, kAllowHarmonySloppyLet, - kAllowHarmonyUnicode, kAllowHarmonyComputedPropertyNames, kAllowHarmonySpreadCalls, kAllowHarmonyDestructuring, @@ -1459,7 +1458,6 @@ void SetParserFlags(i::ParserBase* parser, flags.Contains(kAllowHarmonySpreadCalls)); parser->set_allow_harmony_sloppy(flags.Contains(kAllowHarmonySloppy)); parser->set_allow_harmony_sloppy_let(flags.Contains(kAllowHarmonySloppyLet)); - parser->set_allow_harmony_unicode(flags.Contains(kAllowHarmonyUnicode)); parser->set_allow_harmony_computed_property_names( flags.Contains(kAllowHarmonyComputedPropertyNames)); parser->set_allow_harmony_destructuring( @@ -4861,9 +4859,7 @@ TEST(InvalidUnicodeEscapes) { "var foob\\v{1234}r = 0;", "var foob\\U{1234}r = 0;", NULL}; - static const ParserFlag always_flags[] = {kAllowHarmonyUnicode}; - RunParserSyncTest(context_data, data, kError, NULL, 0, always_flags, - arraysize(always_flags)); + RunParserSyncTest(context_data, data, kError); } @@ -4889,9 +4885,7 @@ TEST(UnicodeEscapes) { // Max value for the unicode escape "\"\\u{10ffff}\"", NULL}; - static const ParserFlag always_flags[] = {kAllowHarmonyUnicode}; - RunParserSyncTest(context_data, data, kSuccess, NULL, 0, always_flags, - arraysize(always_flags)); + RunParserSyncTest(context_data, data, kSuccess); } diff --git a/test/mjsunit/es6/templates.js b/test/mjsunit/es6/templates.js index feb7364613..621b06074e 100644 --- a/test/mjsunit/es6/templates.js +++ b/test/mjsunit/es6/templates.js @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Flags: --harmony-unicode - var num = 5; var str = "str"; function fn() { return "result"; } diff --git a/test/mjsunit/harmony/unicode-escapes.js b/test/mjsunit/es6/unicode-escapes.js similarity index 97% rename from test/mjsunit/harmony/unicode-escapes.js rename to test/mjsunit/es6/unicode-escapes.js index b39ee1a5b0..be269366cf 100644 --- a/test/mjsunit/harmony/unicode-escapes.js +++ b/test/mjsunit/es6/unicode-escapes.js @@ -4,8 +4,6 @@ // ES6 extends the \uxxxx escape and also allows \u{xxxxx}. -// Flags: --harmony-unicode - // Unicode escapes in variable names. (function TestVariableNames1() {