diff --git a/AUTHORS b/AUTHORS index 9ad2949716..3a4a088d11 100644 --- a/AUTHORS +++ b/AUTHORS @@ -63,6 +63,7 @@ Anna Henningsen Antoine du Hamel Anton Bershanskiy <8knots@protonmail.com> Anton Bikineev +Ao Wang Archil Sharashenidze Bangfu Tao Ben Coe diff --git a/src/builtins/promise-all.tq b/src/builtins/promise-all.tq index cd55ec9f3b..29c468ed3e 100644 --- a/src/builtins/promise-all.tq +++ b/src/builtins/promise-all.tq @@ -319,12 +319,12 @@ Reject(JSAny) { transitioning macro GeneratePromiseAll( implicit context: Context)( receiver: JSAny, iterable: JSAny, createResolveElementFunctor: F1, - createRejectElementFunctor: F2): JSAny { + createRejectElementFunctor: F2, message: constexpr string): JSAny { const nativeContext = LoadNativeContext(context); // Let C be the this value. // If Type(C) is not Object, throw a TypeError exception. const receiver = Cast(receiver) - otherwise ThrowTypeError(MessageTemplate::kCalledOnNonObject, 'Promise.all'); + otherwise ThrowTypeError(MessageTemplate::kCalledOnNonObject, message); // Let promiseCapability be ? NewPromiseCapability(C). // Don't fire debugEvent so that forwarding the rejection through all does @@ -368,7 +368,7 @@ transitioning javascript builtin PromiseAll( js-implicit context: Context, receiver: JSAny)(iterable: JSAny): JSAny { return GeneratePromiseAll( receiver, iterable, PromiseAllResolveElementFunctor{}, - PromiseAllRejectElementFunctor{}); + PromiseAllRejectElementFunctor{}, 'Promise.all'); } // ES#sec-promise.allsettled @@ -377,7 +377,7 @@ transitioning javascript builtin PromiseAllSettled( js-implicit context: Context, receiver: JSAny)(iterable: JSAny): JSAny { return GeneratePromiseAll( receiver, iterable, PromiseAllSettledResolveElementFunctor{}, - PromiseAllSettledRejectElementFunctor{}); + PromiseAllSettledRejectElementFunctor{}, 'Promise.allSettled'); } extern macro PromiseAllResolveElementSharedFunConstant(): SharedFunctionInfo; diff --git a/tools/v8heapconst.py b/tools/v8heapconst.py index db11e83b56..135450c237 100644 --- a/tools/v8heapconst.py +++ b/tools/v8heapconst.py @@ -525,27 +525,27 @@ KNOWN_OBJECTS = { ("old_space", 0x04ac9): "StringSplitCache", ("old_space", 0x04ed1): "RegExpMultipleCache", ("old_space", 0x052d9): "BuiltinsConstantsTable", - ("old_space", 0x05701): "AsyncFunctionAwaitRejectSharedFun", - ("old_space", 0x05725): "AsyncFunctionAwaitResolveSharedFun", - ("old_space", 0x05749): "AsyncGeneratorAwaitRejectSharedFun", - ("old_space", 0x0576d): "AsyncGeneratorAwaitResolveSharedFun", - ("old_space", 0x05791): "AsyncGeneratorYieldResolveSharedFun", - ("old_space", 0x057b5): "AsyncGeneratorReturnResolveSharedFun", - ("old_space", 0x057d9): "AsyncGeneratorReturnClosedRejectSharedFun", - ("old_space", 0x057fd): "AsyncGeneratorReturnClosedResolveSharedFun", - ("old_space", 0x05821): "AsyncIteratorValueUnwrapSharedFun", - ("old_space", 0x05845): "PromiseAllResolveElementSharedFun", - ("old_space", 0x05869): "PromiseAllSettledResolveElementSharedFun", - ("old_space", 0x0588d): "PromiseAllSettledRejectElementSharedFun", - ("old_space", 0x058b1): "PromiseAnyRejectElementSharedFun", - ("old_space", 0x058d5): "PromiseCapabilityDefaultRejectSharedFun", - ("old_space", 0x058f9): "PromiseCapabilityDefaultResolveSharedFun", - ("old_space", 0x0591d): "PromiseCatchFinallySharedFun", - ("old_space", 0x05941): "PromiseGetCapabilitiesExecutorSharedFun", - ("old_space", 0x05965): "PromiseThenFinallySharedFun", - ("old_space", 0x05989): "PromiseThrowerFinallySharedFun", - ("old_space", 0x059ad): "PromiseValueThunkFinallySharedFun", - ("old_space", 0x059d1): "ProxyRevokeSharedFun", + ("old_space", 0x05705): "AsyncFunctionAwaitRejectSharedFun", + ("old_space", 0x05729): "AsyncFunctionAwaitResolveSharedFun", + ("old_space", 0x0574d): "AsyncGeneratorAwaitRejectSharedFun", + ("old_space", 0x05771): "AsyncGeneratorAwaitResolveSharedFun", + ("old_space", 0x05795): "AsyncGeneratorYieldResolveSharedFun", + ("old_space", 0x057b9): "AsyncGeneratorReturnResolveSharedFun", + ("old_space", 0x057dd): "AsyncGeneratorReturnClosedRejectSharedFun", + ("old_space", 0x05801): "AsyncGeneratorReturnClosedResolveSharedFun", + ("old_space", 0x05825): "AsyncIteratorValueUnwrapSharedFun", + ("old_space", 0x05849): "PromiseAllResolveElementSharedFun", + ("old_space", 0x0586d): "PromiseAllSettledResolveElementSharedFun", + ("old_space", 0x05891): "PromiseAllSettledRejectElementSharedFun", + ("old_space", 0x058b5): "PromiseAnyRejectElementSharedFun", + ("old_space", 0x058d9): "PromiseCapabilityDefaultRejectSharedFun", + ("old_space", 0x058fd): "PromiseCapabilityDefaultResolveSharedFun", + ("old_space", 0x05921): "PromiseCatchFinallySharedFun", + ("old_space", 0x05945): "PromiseGetCapabilitiesExecutorSharedFun", + ("old_space", 0x05969): "PromiseThenFinallySharedFun", + ("old_space", 0x0598d): "PromiseThrowerFinallySharedFun", + ("old_space", 0x059b1): "PromiseValueThunkFinallySharedFun", + ("old_space", 0x059d5): "ProxyRevokeSharedFun", } # Lower 32 bits of first page addresses for various heap spaces.