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

[flags] Remove --harmony-promise-any

It's shipped since M85.

Bug: v8:9808
Change-Id: I0c2dcda601aad33d4acb379b242799f9b09e8930
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2510869
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71137}
parent dd80f2e4
...@@ -280,7 +280,6 @@ DEFINE_IMPLICATION(harmony_weak_refs_with_cleanup_some, harmony_weak_refs) ...@@ -280,7 +280,6 @@ DEFINE_IMPLICATION(harmony_weak_refs_with_cleanup_some, harmony_weak_refs)
#define HARMONY_SHIPPING_BASE(V) \ #define HARMONY_SHIPPING_BASE(V) \
V(harmony_sharedarraybuffer, "harmony sharedarraybuffer") \ V(harmony_sharedarraybuffer, "harmony sharedarraybuffer") \
V(harmony_atomics, "harmony atomics") \ V(harmony_atomics, "harmony atomics") \
V(harmony_promise_any, "harmony Promise.any") \
V(harmony_private_methods, "harmony private methods in class literals") \ V(harmony_private_methods, "harmony private methods in class literals") \
V(harmony_weak_refs, "harmony weak references") \ V(harmony_weak_refs, "harmony weak references") \
V(harmony_string_replaceall, "harmony String.prototype.replaceAll") \ V(harmony_string_replaceall, "harmony String.prototype.replaceAll") \
......
...@@ -2393,6 +2393,10 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object, ...@@ -2393,6 +2393,10 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
InstallFunctionWithBuiltinId(isolate_, promise_fun, "allSettled", InstallFunctionWithBuiltinId(isolate_, promise_fun, "allSettled",
Builtins::kPromiseAllSettled, 1, true); Builtins::kPromiseAllSettled, 1, true);
Handle<JSFunction> promise_any = InstallFunctionWithBuiltinId(
isolate_, promise_fun, "any", Builtins::kPromiseAny, 1, true);
native_context()->set_promise_any(*promise_any);
InstallFunctionWithBuiltinId(isolate_, promise_fun, "race", InstallFunctionWithBuiltinId(isolate_, promise_fun, "race",
Builtins::kPromiseRace, 1, true); Builtins::kPromiseRace, 1, true);
...@@ -2652,6 +2656,11 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object, ...@@ -2652,6 +2656,11 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
InstallError(isolate_, global, factory->Error_string(), InstallError(isolate_, global, factory->Error_string(),
Context::ERROR_FUNCTION_INDEX); Context::ERROR_FUNCTION_INDEX);
// -- A g g r e g a t e E r r o r
InstallError(isolate_, global, factory->AggregateError_string(),
Context::AGGREGATE_ERROR_FUNCTION_INDEX,
Builtins::kAggregateErrorConstructor, 2, 2);
// -- E v a l E r r o r // -- E v a l E r r o r
InstallError(isolate_, global, factory->EvalError_string(), InstallError(isolate_, global, factory->EvalError_string(),
Context::EVAL_ERROR_FUNCTION_INDEX); Context::EVAL_ERROR_FUNCTION_INDEX);
...@@ -4339,34 +4348,6 @@ void Genesis::InitializeGlobal_harmony_weak_refs_with_cleanup_some() { ...@@ -4339,34 +4348,6 @@ void Genesis::InitializeGlobal_harmony_weak_refs_with_cleanup_some() {
DONT_ENUM); DONT_ENUM);
} }
void Genesis::InitializeGlobal_harmony_promise_any() {
if (!FLAG_harmony_promise_any) {
return;
}
Factory* factory = isolate()->factory();
Handle<JSGlobalObject> global(native_context()->global_object(), isolate());
InstallError(isolate_, global, factory->AggregateError_string(),
Context::AGGREGATE_ERROR_FUNCTION_INDEX,
Builtins::kAggregateErrorConstructor, 2, 2);
// Setup %AggregateErrorPrototype%.
Handle<JSFunction> aggregate_error_function(
native_context()->aggregate_error_function(), isolate());
Handle<JSObject> prototype(
JSObject::cast(aggregate_error_function->instance_prototype()),
isolate());
Handle<JSFunction> promise_fun(
JSFunction::cast(
isolate()->native_context()->get(Context::PROMISE_FUNCTION_INDEX)),
isolate());
Handle<JSFunction> promise_any = InstallFunctionWithBuiltinId(
isolate_, promise_fun, "any", Builtins::kPromiseAny, 1, true);
native_context()->set_promise_any(*promise_any);
}
void Genesis::InitializeGlobal_harmony_regexp_match_indices() { void Genesis::InitializeGlobal_harmony_regexp_match_indices() {
if (!FLAG_harmony_regexp_match_indices) return; if (!FLAG_harmony_regexp_match_indices) return;
......
...@@ -259,7 +259,6 @@ RUNTIME_FUNCTION(Runtime_ResolvePromise) { ...@@ -259,7 +259,6 @@ RUNTIME_FUNCTION(Runtime_ResolvePromise) {
// A helper function to be called when constructing AggregateError objects. This // A helper function to be called when constructing AggregateError objects. This
// takes care of the Error-related construction, e.g., stack traces. // takes care of the Error-related construction, e.g., stack traces.
RUNTIME_FUNCTION(Runtime_ConstructAggregateErrorHelper) { RUNTIME_FUNCTION(Runtime_ConstructAggregateErrorHelper) {
DCHECK(FLAG_harmony_promise_any);
HandleScope scope(isolate); HandleScope scope(isolate);
DCHECK_EQ(3, args.length()); DCHECK_EQ(3, args.length());
CONVERT_ARG_HANDLE_CHECKED(JSFunction, target, 0); CONVERT_ARG_HANDLE_CHECKED(JSFunction, target, 0);
...@@ -278,7 +277,6 @@ RUNTIME_FUNCTION(Runtime_ConstructAggregateErrorHelper) { ...@@ -278,7 +277,6 @@ RUNTIME_FUNCTION(Runtime_ConstructAggregateErrorHelper) {
// A helper function to be called when constructing AggregateError objects. This // A helper function to be called when constructing AggregateError objects. This
// takes care of the Error-related construction, e.g., stack traces. // takes care of the Error-related construction, e.g., stack traces.
RUNTIME_FUNCTION(Runtime_ConstructInternalAggregateErrorHelper) { RUNTIME_FUNCTION(Runtime_ConstructInternalAggregateErrorHelper) {
DCHECK(FLAG_harmony_promise_any);
HandleScope scope(isolate); HandleScope scope(isolate);
DCHECK_GE(args.length(), 1); DCHECK_GE(args.length(), 1);
CONVERT_ARG_HANDLE_CHECKED(Smi, message, 0); CONVERT_ARG_HANDLE_CHECKED(Smi, message, 0);
......
// Copyright 2020 the V8 project authors. All rights reserved. // Copyright 2020 the V8 project authors. All rights reserved.
// 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-promise-any
// Test debug events when we only listen to uncaught exceptions and a // Test debug events when we only listen to uncaught exceptions and a
// Promise p3 created by Promise.any has a catch handler, and is rejected // Promise p3 created by Promise.any has a catch handler, and is rejected
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// 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-promise-any --ignore-unhandled-promises // Flags: --ignore-unhandled-promises
// Test debug events when we only listen to uncaught exceptions and a // Test debug events when we only listen to uncaught exceptions and a
// Promise p3 created by Promise.any has no catch handler, and is rejected // Promise p3 created by Promise.any has no catch handler, and is rejected
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// 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: --allow-natives-syntax --async-stack-traces --harmony-promise-any // Flags: --allow-natives-syntax --async-stack-traces
// Basic test with Promise.any(). // Basic test with Promise.any().
(function() { (function() {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// 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: --allow-unsafe-function-constructor --harmony-promise-any // Flags: --allow-unsafe-function-constructor
(function testReflectConstructArity() { (function testReflectConstructArity() {
......
...@@ -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-promise-any
(function TestNoParameters() { (function TestNoParameters() {
// Can't omit the "errors" parameter; there's nothing to iterate. // Can't omit the "errors" parameter; there's nothing to iterate.
assertThrows(() => { new AggregateError(); }); assertThrows(() => { new AggregateError(); });
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// 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: --allow-natives-syntax --harmony-promise-any // Flags: --allow-natives-syntax
load('test/mjsunit/test-async.js'); load('test/mjsunit/test-async.js');
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// 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: --allow-natives-syntax --harmony-promise-any // Flags: --allow-natives-syntax
load('test/mjsunit/test-async.js'); load('test/mjsunit/test-async.js');
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// 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: --allow-natives-syntax --harmony-promise-any // Flags: --allow-natives-syntax
load('test/mjsunit/test-async.js'); load('test/mjsunit/test-async.js');
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// 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: --allow-natives-syntax --harmony-promise-any // Flags: --allow-natives-syntax
load('test/mjsunit/test-async.js'); load('test/mjsunit/test-async.js');
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// 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: --allow-natives-syntax --harmony-promise-any // Flags: --allow-natives-syntax
load('test/mjsunit/test-async.js'); load('test/mjsunit/test-async.js');
......
...@@ -59,9 +59,7 @@ FEATURE_FLAGS = { ...@@ -59,9 +59,7 @@ FEATURE_FLAGS = {
'regexp-named-groups': '--harmony-regexp-match-indices', 'regexp-named-groups': '--harmony-regexp-match-indices',
'class-methods-private': '--harmony-private-methods', 'class-methods-private': '--harmony-private-methods',
'class-static-methods-private': '--harmony-private-methods', 'class-static-methods-private': '--harmony-private-methods',
'AggregateError': '--harmony-promise-any',
'logical-assignment-operators': '--harmony-logical-assignment', 'logical-assignment-operators': '--harmony-logical-assignment',
'Promise.any': '--harmony-promise-any',
'Atomics.waitAsync': '--harmony-atomics-waitasync', 'Atomics.waitAsync': '--harmony-atomics-waitasync',
} }
......
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