Commit 74341301 authored by Mathias Bynens's avatar Mathias Bynens Committed by Commit Bot

Remove always-true --harmony-json-stringify runtime flag

It shipped in Chrome 72.

Bug: v8:7782
Change-Id: I9ddee4370dd65821020dd7292d9e9b9850d060df
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1581603Reviewed-by: 's avatarSathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60985}
parent 343898ed
......@@ -4158,7 +4158,6 @@ EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_class_fields)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_dynamic_import)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_import_meta)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_numeric_separator)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_json_stringify)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_regexp_sequence)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_await_optimization)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_hashbang)
......
......@@ -247,7 +247,6 @@ DEFINE_IMPLICATION(harmony_private_methods, harmony_private_fields)
V(harmony_import_meta, "harmony import.meta property") \
V(harmony_dynamic_import, "harmony dynamic import") \
V(harmony_global, "harmony global") \
V(harmony_json_stringify, "well-formed JSON.stringify") \
V(harmony_public_fields, "harmony public instance fields in class literals") \
V(harmony_static_fields, "harmony static fields in class literals") \
V(harmony_string_matchall, "harmony String.prototype.matchAll") \
......
......@@ -883,7 +883,7 @@ void JsonStringifier::SerializeStringUnchecked_(
SrcChar c = src[i];
if (DoNotEscape(c)) {
dest->Append(c);
} else if (FLAG_harmony_json_stringify && c >= 0xD800 && c <= 0xDFFF) {
} else if (c >= 0xD800 && c <= 0xDFFF) {
// The current character is a surrogate.
if (c <= 0xDBFF) {
// The current character is a leading surrogate.
......@@ -946,7 +946,7 @@ void JsonStringifier::SerializeString_(Handle<String> string) {
SrcChar c = reader.Get<SrcChar>(i);
if (DoNotEscape(c)) {
builder_.Append<SrcChar, DestChar>(c);
} else if (FLAG_harmony_json_stringify && c >= 0xD800 && c <= 0xDFFF) {
} else if (c >= 0xD800 && c <= 0xDFFF) {
// The current character is a surrogate.
if (c <= 0xDBFF) {
// The current character is a leading surrogate.
......@@ -1002,8 +1002,7 @@ bool JsonStringifier::DoNotEscape(uint8_t c) {
template <>
bool JsonStringifier::DoNotEscape(uint16_t c) {
// https://tc39.github.io/ecma262/#table-json-single-character-escapes
return c >= 0x23 && c != 0x5C && c != 0x7F &&
(!FLAG_harmony_json_stringify || (c < 0xD800 || c > 0xDFFF));
return c >= 0x23 && c != 0x5C && c != 0x7F && (c < 0xD800 || c > 0xDFFF);
}
void JsonStringifier::NewLine() {
......
......@@ -1228,7 +1228,6 @@ TEST(JSONStringifySliceMadeExternal) {
}
TEST(JSONStringifyWellFormed) {
FLAG_harmony_json_stringify = true;
CcTest::InitializeVM();
v8::HandleScope handle_scope(CcTest::isolate());
v8::Local<v8::Context> context = CcTest::isolate()->GetCurrentContext();
......
......@@ -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-json-stringify
// Test JSON.stringify for cases that hit
// JsonStringifier::SerializeString_.
......
......@@ -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-json-stringify
// Test JSON.stringify for cases that hit
// JsonStringifier::SerializeStringUnchecked_.
......
......@@ -56,7 +56,6 @@ FEATURE_FLAGS = {
'Intl.Segmenter': '--harmony-intl-segmenter',
'Symbol.prototype.description': '--harmony-symbol-description',
'globalThis': '--harmony-global',
'well-formed-json-stringify': '--harmony-json-stringify',
'export-star-as-namespace-from-module': '--harmony-namespace-exports',
'Object.fromEntries': '--harmony-object-from-entries',
'hashbang': '--harmony-hashbang',
......
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