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}
This commit is contained in:
adamk 2015-08-05 12:08:22 -07:00 committed by Commit bot
parent 5c34bacb72
commit cd455055a0
9 changed files with 6 additions and 34 deletions

View File

@ -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};

View File

@ -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)

View File

@ -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);

View File

@ -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,

View File

@ -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 <bool capture_raw>
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<capture_raw>();
uc32 cp = ScanUnlimitedLengthHexNumber<capture_raw>(0x10ffff);
if (cp < 0) {

View File

@ -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

View File

@ -1429,7 +1429,6 @@ enum ParserFlag {
kAllowHarmonyRestParameters,
kAllowHarmonySloppy,
kAllowHarmonySloppyLet,
kAllowHarmonyUnicode,
kAllowHarmonyComputedPropertyNames,
kAllowHarmonySpreadCalls,
kAllowHarmonyDestructuring,
@ -1459,7 +1458,6 @@ void SetParserFlags(i::ParserBase<Traits>* 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);
}

View File

@ -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"; }

View File

@ -4,8 +4,6 @@
// ES6 extends the \uxxxx escape and also allows \u{xxxxx}.
// Flags: --harmony-unicode
// Unicode escapes in variable names.
(function TestVariableNames1() {