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

Delete --harmony-unicode flag

It was shipped in V8 4.4.

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

Cr-Commit-Position: refs/heads/master@{#30035}
parent 5c34bacb
...@@ -1843,7 +1843,6 @@ EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrow_functions) ...@@ -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_tostring)
EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_sloppy) EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_sloppy)
EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_sloppy_let) 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_unicode_regexps)
EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_computed_property_names) EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_computed_property_names)
EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_rest_parameters) EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_rest_parameters)
...@@ -1881,7 +1880,6 @@ EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrow_functions) ...@@ -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_proxies)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy) EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy_let) 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_computed_property_names)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_rest_parameters) EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_rest_parameters)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_spreadcalls) EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_spreadcalls)
...@@ -2565,7 +2563,6 @@ bool Genesis::InstallExperimentalNatives() { ...@@ -2565,7 +2563,6 @@ bool Genesis::InstallExperimentalNatives() {
nullptr}; nullptr};
static const char* harmony_sloppy_natives[] = {nullptr}; static const char* harmony_sloppy_natives[] = {nullptr};
static const char* harmony_sloppy_let_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_unicode_regexps_natives[] = {nullptr};
static const char* harmony_computed_property_names_natives[] = {nullptr}; static const char* harmony_computed_property_names_natives[] = {nullptr};
static const char* harmony_rest_parameters_natives[] = {nullptr}; static const char* harmony_rest_parameters_natives[] = {nullptr};
......
...@@ -213,7 +213,6 @@ DEFINE_BOOL(legacy_const, true, "legacy semantics for const in sloppy mode") ...@@ -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_object_observe, "harmony Object.observe") \
V(harmony_spreadcalls, "harmony spread-calls") \ V(harmony_spreadcalls, "harmony spread-calls") \
V(harmony_spread_arrays, "harmony spread in array literals") \ V(harmony_spread_arrays, "harmony spread in array literals") \
V(harmony_unicode, "harmony unicode escapes") \
V(harmony_object, "harmony Object methods") V(harmony_object, "harmony Object methods")
// Once a shipping feature has proved stable in the wild, it will be dropped // Once a shipping feature has proved stable in the wild, it will be dropped
...@@ -241,7 +240,6 @@ HARMONY_SHIPPING(FLAG_SHIPPING_FEATURES) ...@@ -241,7 +240,6 @@ HARMONY_SHIPPING(FLAG_SHIPPING_FEATURES)
// Feature dependencies. // Feature dependencies.
DEFINE_IMPLICATION(harmony_unicode_regexps, harmony_unicode)
DEFINE_IMPLICATION(harmony_sloppy_let, harmony_sloppy) DEFINE_IMPLICATION(harmony_sloppy_let, harmony_sloppy)
......
...@@ -913,7 +913,6 @@ Parser::Parser(ParseInfo* info) ...@@ -913,7 +913,6 @@ Parser::Parser(ParseInfo* info)
set_allow_harmony_arrow_functions(FLAG_harmony_arrow_functions); set_allow_harmony_arrow_functions(FLAG_harmony_arrow_functions);
set_allow_harmony_sloppy(FLAG_harmony_sloppy); set_allow_harmony_sloppy(FLAG_harmony_sloppy);
set_allow_harmony_sloppy_let(FLAG_harmony_sloppy_let); set_allow_harmony_sloppy_let(FLAG_harmony_sloppy_let);
set_allow_harmony_unicode(FLAG_harmony_unicode);
set_allow_harmony_computed_property_names( set_allow_harmony_computed_property_names(
FLAG_harmony_computed_property_names); FLAG_harmony_computed_property_names);
set_allow_harmony_rest_parameters(FLAG_harmony_rest_parameters); set_allow_harmony_rest_parameters(FLAG_harmony_rest_parameters);
...@@ -4493,7 +4492,6 @@ PreParser::PreParseResult Parser::ParseLazyFunctionBodyWithPreParser( ...@@ -4493,7 +4492,6 @@ PreParser::PreParseResult Parser::ParseLazyFunctionBodyWithPreParser(
SET_ALLOW(harmony_arrow_functions); SET_ALLOW(harmony_arrow_functions);
SET_ALLOW(harmony_sloppy); SET_ALLOW(harmony_sloppy);
SET_ALLOW(harmony_sloppy_let); SET_ALLOW(harmony_sloppy_let);
SET_ALLOW(harmony_unicode);
SET_ALLOW(harmony_computed_property_names); SET_ALLOW(harmony_computed_property_names);
SET_ALLOW(harmony_rest_parameters); SET_ALLOW(harmony_rest_parameters);
SET_ALLOW(harmony_spreadcalls); SET_ALLOW(harmony_spreadcalls);
......
...@@ -139,10 +139,6 @@ class ParserBase : public Traits { ...@@ -139,10 +139,6 @@ class ParserBase : public Traits {
ALLOW_ACCESSORS(legacy_const); ALLOW_ACCESSORS(legacy_const);
#undef ALLOW_ACCESSORS #undef ALLOW_ACCESSORS
bool allow_harmony_unicode() const { return scanner()->HarmonyUnicode(); }
void set_allow_harmony_unicode(bool a) { scanner()->SetHarmonyUnicode(a); }
protected: protected:
enum AllowRestrictedIdentifiers { enum AllowRestrictedIdentifiers {
kAllowRestrictedIdentifiers, kAllowRestrictedIdentifiers,
......
...@@ -40,8 +40,7 @@ void Utf16CharacterStream::ResetToBookmark() { UNREACHABLE(); } ...@@ -40,8 +40,7 @@ void Utf16CharacterStream::ResetToBookmark() { UNREACHABLE(); }
Scanner::Scanner(UnicodeCache* unicode_cache) Scanner::Scanner(UnicodeCache* unicode_cache)
: unicode_cache_(unicode_cache), : unicode_cache_(unicode_cache),
bookmark_c0_(kNoBookmark), bookmark_c0_(kNoBookmark),
octal_pos_(Location::invalid()), octal_pos_(Location::invalid()) {
harmony_unicode_(false) {
bookmark_current_.literal_chars = &bookmark_current_literal_; bookmark_current_.literal_chars = &bookmark_current_literal_;
bookmark_current_.raw_literal_chars = &bookmark_current_raw_literal_; bookmark_current_.raw_literal_chars = &bookmark_current_raw_literal_;
bookmark_next_.literal_chars = &bookmark_next_literal_; bookmark_next_.literal_chars = &bookmark_next_literal_;
...@@ -1075,10 +1074,9 @@ uc32 Scanner::ScanIdentifierUnicodeEscape() { ...@@ -1075,10 +1074,9 @@ uc32 Scanner::ScanIdentifierUnicodeEscape() {
template <bool capture_raw> template <bool capture_raw>
uc32 Scanner::ScanUnicodeEscape() { uc32 Scanner::ScanUnicodeEscape() {
// Accept both \uxxxx and \u{xxxxxx} (if harmony unicode escapes are // Accept both \uxxxx and \u{xxxxxx}. In the latter case, the number of
// allowed). In the latter case, the number of hex digits between { } is // hex digits between { } is arbitrary. \ and u have already been read.
// arbitrary. \ and u have already been read. if (c0_ == '{') {
if (c0_ == '{' && HarmonyUnicode()) {
Advance<capture_raw>(); Advance<capture_raw>();
uc32 cp = ScanUnlimitedLengthHexNumber<capture_raw>(0x10ffff); uc32 cp = ScanUnlimitedLengthHexNumber<capture_raw>(0x10ffff);
if (cp < 0) { if (cp < 0) {
......
...@@ -478,9 +478,6 @@ class Scanner { ...@@ -478,9 +478,6 @@ class Scanner {
// tokens, which is what it is used for. // tokens, which is what it is used for.
void SeekForward(int pos); 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, // Returns true if there was a line terminator before the peek'ed token,
// possibly inside a multi-line comment. // possibly inside a multi-line comment.
bool HasAnyLineTerminatorBeforeNext() const { bool HasAnyLineTerminatorBeforeNext() const {
...@@ -790,8 +787,6 @@ class Scanner { ...@@ -790,8 +787,6 @@ class Scanner {
// Whether there is a multi-line comment that contains a // Whether there is a multi-line comment that contains a
// line-terminator after the current token, and before the next. // line-terminator after the current token, and before the next.
bool has_multiline_comment_before_next_; bool has_multiline_comment_before_next_;
// Whether we allow \u{xxxxx}.
bool harmony_unicode_;
}; };
} } // namespace v8::internal } } // namespace v8::internal
......
...@@ -1429,7 +1429,6 @@ enum ParserFlag { ...@@ -1429,7 +1429,6 @@ enum ParserFlag {
kAllowHarmonyRestParameters, kAllowHarmonyRestParameters,
kAllowHarmonySloppy, kAllowHarmonySloppy,
kAllowHarmonySloppyLet, kAllowHarmonySloppyLet,
kAllowHarmonyUnicode,
kAllowHarmonyComputedPropertyNames, kAllowHarmonyComputedPropertyNames,
kAllowHarmonySpreadCalls, kAllowHarmonySpreadCalls,
kAllowHarmonyDestructuring, kAllowHarmonyDestructuring,
...@@ -1459,7 +1458,6 @@ void SetParserFlags(i::ParserBase<Traits>* parser, ...@@ -1459,7 +1458,6 @@ void SetParserFlags(i::ParserBase<Traits>* parser,
flags.Contains(kAllowHarmonySpreadCalls)); flags.Contains(kAllowHarmonySpreadCalls));
parser->set_allow_harmony_sloppy(flags.Contains(kAllowHarmonySloppy)); parser->set_allow_harmony_sloppy(flags.Contains(kAllowHarmonySloppy));
parser->set_allow_harmony_sloppy_let(flags.Contains(kAllowHarmonySloppyLet)); parser->set_allow_harmony_sloppy_let(flags.Contains(kAllowHarmonySloppyLet));
parser->set_allow_harmony_unicode(flags.Contains(kAllowHarmonyUnicode));
parser->set_allow_harmony_computed_property_names( parser->set_allow_harmony_computed_property_names(
flags.Contains(kAllowHarmonyComputedPropertyNames)); flags.Contains(kAllowHarmonyComputedPropertyNames));
parser->set_allow_harmony_destructuring( parser->set_allow_harmony_destructuring(
...@@ -4861,9 +4859,7 @@ TEST(InvalidUnicodeEscapes) { ...@@ -4861,9 +4859,7 @@ TEST(InvalidUnicodeEscapes) {
"var foob\\v{1234}r = 0;", "var foob\\v{1234}r = 0;",
"var foob\\U{1234}r = 0;", "var foob\\U{1234}r = 0;",
NULL}; NULL};
static const ParserFlag always_flags[] = {kAllowHarmonyUnicode}; RunParserSyncTest(context_data, data, kError);
RunParserSyncTest(context_data, data, kError, NULL, 0, always_flags,
arraysize(always_flags));
} }
...@@ -4889,9 +4885,7 @@ TEST(UnicodeEscapes) { ...@@ -4889,9 +4885,7 @@ TEST(UnicodeEscapes) {
// Max value for the unicode escape // Max value for the unicode escape
"\"\\u{10ffff}\"", "\"\\u{10ffff}\"",
NULL}; NULL};
static const ParserFlag always_flags[] = {kAllowHarmonyUnicode}; RunParserSyncTest(context_data, data, kSuccess);
RunParserSyncTest(context_data, data, kSuccess, NULL, 0, always_flags,
arraysize(always_flags));
} }
......
...@@ -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-unicode
var num = 5; var num = 5;
var str = "str"; var str = "str";
function fn() { return "result"; } function fn() { return "result"; }
......
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
// ES6 extends the \uxxxx escape and also allows \u{xxxxx}. // ES6 extends the \uxxxx escape and also allows \u{xxxxx}.
// Flags: --harmony-unicode
// Unicode escapes in variable names. // Unicode escapes in variable names.
(function TestVariableNames1() { (function TestVariableNames1() {
......
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