Commit 33c9fca3 authored by Shu-yu Guo's avatar Shu-yu Guo Committed by Commit Bot

Remove shipped feature flags

Removes

--harmony-string-replaceall (shipped since 8.5)
--harmony-logical-assignment (shipped since 8.5)
--harmony-atomics-waitasync (shipped since 8.7)

Bug: v8:9801,v8:10372,v8:10239
Change-Id: Ifb8db93948a067e75da5e581603acb916b91342a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2747201
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73356}
parent 3094d598
......@@ -531,7 +531,6 @@ Object FutexEmulation::WaitAsync(Isolate* isolate,
Handle<JSArrayBuffer> array_buffer,
size_t addr, T value, bool use_timeout,
int64_t rel_timeout_ns) {
DCHECK(FLAG_harmony_atomics_waitasync);
base::TimeDelta rel_timeout =
base::TimeDelta::FromNanoseconds(rel_timeout_ns);
......@@ -706,7 +705,6 @@ void FutexEmulation::CleanupAsyncWaiterPromise(FutexWaitListNode* node) {
// This function must run in the main thread of node's Isolate. This function
// may allocate memory. To avoid deadlocks, we shouldn't be holding g_mutex.
DCHECK(FLAG_harmony_atomics_waitasync);
DCHECK(node->IsAsync());
Isolate* isolate = node->isolate_for_async_waiters_;
......@@ -737,7 +735,6 @@ void FutexEmulation::CleanupAsyncWaiterPromise(FutexWaitListNode* node) {
void FutexEmulation::ResolveAsyncWaiterPromise(FutexWaitListNode* node) {
// This function must run in the main thread of node's Isolate.
DCHECK(FLAG_harmony_atomics_waitasync);
auto v8_isolate =
reinterpret_cast<v8::Isolate*>(node->isolate_for_async_waiters_);
......@@ -779,7 +776,6 @@ void FutexEmulation::ResolveAsyncWaiterPromise(FutexWaitListNode* node) {
void FutexEmulation::ResolveAsyncWaiterPromises(Isolate* isolate) {
// This function must run in the main thread of isolate.
DCHECK(FLAG_harmony_atomics_waitasync);
FutexWaitListNode* node;
{
......@@ -813,7 +809,6 @@ void FutexEmulation::ResolveAsyncWaiterPromises(Isolate* isolate) {
void FutexEmulation::HandleAsyncWaiterTimeout(FutexWaitListNode* node) {
// This function must run in the main thread of node's Isolate.
DCHECK(FLAG_harmony_atomics_waitasync);
DCHECK(node->IsAsync());
{
......@@ -966,7 +961,6 @@ void FutexWaitList::VerifyNode(FutexWaitListNode* node, FutexWaitListNode* head,
}
if (node->async_timeout_time_ != base::TimeTicks()) {
DCHECK(FLAG_harmony_atomics_waitasync);
DCHECK(node->IsAsync());
}
......
......@@ -286,9 +286,6 @@ DEFINE_IMPLICATION(harmony_weak_refs_with_cleanup_some, harmony_weak_refs)
V(harmony_sharedarraybuffer, "harmony sharedarraybuffer") \
V(harmony_atomics, "harmony atomics") \
V(harmony_weak_refs, "harmony weak references") \
V(harmony_string_replaceall, "harmony String.prototype.replaceAll") \
V(harmony_logical_assignment, "harmony logical assignment") \
V(harmony_atomics_waitasync, "harmony Atomics.waitAsync") \
V(harmony_regexp_match_indices, "harmony regexp match indices") \
V(harmony_private_brand_checks, "harmony private brand checks")
......
......@@ -2073,6 +2073,8 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
Builtins::kStringPrototypeRepeat, 1, true);
SimpleInstallFunction(isolate_, prototype, "replace",
Builtins::kStringPrototypeReplace, 2, true);
SimpleInstallFunction(isolate(), prototype, "replaceAll",
Builtins::kStringPrototypeReplaceAll, 2, true);
SimpleInstallFunction(isolate_, prototype, "search",
Builtins::kStringPrototypeSearch, 1, true);
SimpleInstallFunction(isolate_, prototype, "slice",
......@@ -3299,6 +3301,8 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
Builtins::kAtomicsIsLockFree, 1, true);
SimpleInstallFunction(isolate_, atomics_object, "wait",
Builtins::kAtomicsWait, 4, true);
SimpleInstallFunction(isolate(), atomics_object, "waitAsync",
Builtins::kAtomicsWaitAsync, 4, true);
SimpleInstallFunction(isolate_, atomics_object, "notify",
Builtins::kAtomicsNotify, 3, true);
}
......@@ -4318,7 +4322,6 @@ void Genesis::InitializeCallSiteBuiltins() {
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_regexp_sequence)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_top_level_await)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_logical_assignment)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_import_assertions)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_private_brand_checks)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_class_static_blocks)
......@@ -4330,12 +4333,6 @@ EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_intl_dateformat_day_period)
#undef EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE
void Genesis::InitializeGlobal_harmony_atomics_waitasync() {
if (!FLAG_harmony_atomics_waitasync) return;
SimpleInstallFunction(isolate(), isolate()->atomics_object(), "waitAsync",
Builtins::kAtomicsWaitAsync, 4, true);
}
void Genesis::InitializeGlobal_harmony_sharedarraybuffer() {
if (!FLAG_harmony_sharedarraybuffer) return;
......@@ -4467,17 +4464,6 @@ void Genesis::InitializeGlobal_harmony_regexp_match_indices() {
native_context()->set_regexp_prototype_map(prototype->map());
}
void Genesis::InitializeGlobal_harmony_string_replaceall() {
if (!FLAG_harmony_string_replaceall) return;
Handle<JSFunction> string_fun(native_context()->string_function(), isolate());
Handle<JSObject> string_prototype(
JSObject::cast(string_fun->instance_prototype()), isolate());
SimpleInstallFunction(isolate(), string_prototype, "replaceAll",
Builtins::kStringPrototypeReplaceAll, 2, true);
}
void Genesis::InitializeGlobal_regexp_linear_flag() {
if (!FLAG_enable_experimental_regexp_engine) return;
......
......@@ -36,7 +36,6 @@ UnoptimizedCompileFlags::UnoptimizedCompileFlags(Isolate* isolate,
set_collect_source_positions(!FLAG_enable_lazy_source_positions ||
isolate->NeedsDetailedOptimizedCodeLineInfo());
set_allow_harmony_top_level_await(FLAG_harmony_top_level_await);
set_allow_harmony_logical_assignment(FLAG_harmony_logical_assignment);
}
// static
......
......@@ -63,8 +63,7 @@ class Zone;
V(is_oneshot_iife, bool, 1, _) \
V(collect_source_positions, bool, 1, _) \
V(allow_harmony_top_level_await, bool, 1, _) \
V(is_repl_mode, bool, 1, _) \
V(allow_harmony_logical_assignment, bool, 1, _)
V(is_repl_mode, bool, 1, _)
class V8_EXPORT_PRIVATE UnoptimizedCompileFlags {
public:
......
......@@ -2851,10 +2851,6 @@ ParserBase<Impl>::ParseAssignmentExpressionCoverGrammar() {
Token::Value op = peek();
if (!Token::IsArrowOrAssignmentOp(op)) return expression;
if (Token::IsLogicalAssignmentOp(op) &&
!flags().allow_harmony_logical_assignment()) {
return expression;
}
// Arrow functions.
if (V8_UNLIKELY(op == Token::ARROW)) {
......
......@@ -1619,7 +1619,6 @@ const char* ReadString(unsigned* start) {
enum ParserFlag {
kAllowLazy,
kAllowNatives,
kAllowHarmonyLogicalAssignment,
};
enum ParserSyncTestResult {
......@@ -1630,15 +1629,11 @@ enum ParserSyncTestResult {
void SetGlobalFlags(base::EnumSet<ParserFlag> flags) {
i::FLAG_allow_natives_syntax = flags.contains(kAllowNatives);
i::FLAG_harmony_logical_assignment =
flags.contains(kAllowHarmonyLogicalAssignment);
}
void SetParserFlags(i::UnoptimizedCompileFlags* compile_flags,
base::EnumSet<ParserFlag> flags) {
compile_flags->set_allow_natives_syntax(flags.contains(kAllowNatives));
compile_flags->set_allow_harmony_logical_assignment(
flags.contains(kAllowHarmonyLogicalAssignment));
}
void TestParserSyncWithFlags(i::Handle<i::String> source,
......@@ -12401,9 +12396,7 @@ TEST(LogicalAssignmentDestructuringErrors) {
};
// clang-format on
static const ParserFlag flags[] = {kAllowHarmonyLogicalAssignment};
RunParserSyncTest(context_data, error_data, kError, nullptr, 0, flags,
arraysize(flags));
RunParserSyncTest(context_data, error_data, kError);
}
} // namespace test_parsing
......
......@@ -45,7 +45,6 @@ from testrunner.outproc import test262
# TODO(littledan): move the flag mapping into the status file
FEATURE_FLAGS = {
'Intl.DateTimeFormat-dayPeriod': '--harmony-intl-dateformat-day-period',
'String.prototype.replaceAll': '--harmony_string_replaceall',
'Symbol.prototype.description': '--harmony-symbol-description',
'FinalizationRegistry': '--harmony-weak-refs-with-cleanup-some',
'WeakRef': '--harmony-weak-refs-with-cleanup-some',
......@@ -55,8 +54,6 @@ FEATURE_FLAGS = {
'regexp-match-indices': '--harmony-regexp-match-indices',
# https://github.com/tc39/test262/pull/2395
'regexp-named-groups': '--harmony-regexp-match-indices',
'logical-assignment-operators': '--harmony-logical-assignment',
'Atomics.waitAsync': '--harmony-atomics-waitasync',
}
SKIPPED_FEATURES = set([])
......
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