Commit Graph

43 Commits

Author SHA1 Message Date
Basilisk-Dev e1b689d34e Implement ES2024 grouping and resolver builtins 2026-05-19 09:30:56 +08:00
Basilisk-Dev 903f228fa0 Issue #2229 - add better comments on top level await code 2026-02-11 07:01:35 +08:00
Basilisk-Dev 2e88bbe575 Issue #2229 - Initial implementation of top level await functionality 2026-02-11 07:00:29 +08:00
Moonchild 01ebabde5b No issue - Fix promise combinator function state. 2025-05-27 23:18:09 +08:00
André Bargull 51e4b86e6d [js] Handle dead wrappers 2023-09-28 11:50:55 +08:00
Brian Smith c3daecc218 Issue #1691 - Part 6d: Optimize handling of internally-created Promise objects. https://bugzilla.mozilla.org/show_bug.cgi?id=1358879 The patch uses a different test: PROMISE_FLAG_DEFAULT_REJECT_FUNCTION which doesn't exist in our codebase. It was added in this bug, which appears to be partly complete: https://bugzilla.mozilla.org/show_bug.cgi?id=1313049
(cherry picked from commit 97fc74b693813eaaa9ab833d9c51fc5868ff039f)
2023-04-30 21:18:51 +08:00
Brian Smith 7a6dab0b38 Issue #1691 - Part 4: Finish implementing call import. https://bugzilla.mozilla.org/show_bug.cgi?id=1499140
(cherry picked from commit 7bf7d64887944b127a72090dd62eb57f67c5089d)
2023-04-30 21:17:13 +08:00
Martok f75e9d9441 Issue #2089 - Implement the Promise.any combinator
Based-on: m-c 1568903/9,1560300
2023-02-02 09:32:17 +08:00
Martok 9fc50a9920 Issue #2089 - Rename shared Promise combinator functions, with helpers for element functions
Based-on: m-c 1568903/{5-8}
2023-02-02 09:31:56 +08:00
Martok 92906d4da5 Issue #2089 - Add cache for Promise property lookups
Based-on: m-c 1475678/11
2023-02-02 09:31:00 +08:00
Martok a215929a31 Issue #2089 - Report unhandled rejection for optimized away promise
Based-on: m-c 1498775
2023-02-01 07:42:07 +08:00
Martok 078daa705a Issue #2089 - Further runtime perf improvements for PromiseState
- Reduce slot size of PromiseReactionRecord to fit into OBJECT8 alloc kind
- Use the Call() helper from Interpreter.h to reduce code duplication
- Clear the incumbent global slot when it's no longer used

Based-on: m-c 1475678/{12-14}
2023-02-01 07:40:48 +08:00
Martok 5ff7a51da0 Issue #2089 - Create a shared helper for PerformPromiseRace, PerformPromiseAll and PerformPromiseAllSettled
Replace the previous non-CommonPerformPromiseAllRace port with the unified one

Based-on: m-c 1475678/10,1539694
2023-02-01 07:40:29 +08:00
Martok c0b1bf7e1e Issue #2089 - Add a PromiseCapability struct, directly initialize dense elements in PerformPromiseAll using NewbornArrayPush
Based-on: m-c 1475678/{8,9}
2023-02-01 07:40:02 +08:00
Martok 1fd51e14f3 Issue #2089 - Improve Runtime perf of Promises
- reduce typecasting
- reduce rooting already rooted values
- directly handle unwrapped promises

Based-on: m-c 1475678/{1-7}
2023-02-01 07:39:42 +08:00
Martok ee395231dd Issue #2089 - Don't use BlockOnPromise fast path with non-default resolving functions, combine default resolving functions flags
Based-on: m-c 1474348
2023-02-01 07:39:25 +08:00
Martok 9744b0c2bc Issue #2089 - Optimize Promise.then and Promise.all/race with default resolving functions
Based-on: m-c 1401508,1412200,1473970/{1-4}
2023-02-01 07:39:01 +08:00
Martok 55eacd43a4 Issue #2089 - Turn AsyncGeneratorResumeNext recursion into iteration to avoid stack overflow
Based-on: m-c 1416809
2023-02-01 07:38:35 +08:00
Martok 6e2201d3a8 Issue #2089 - Only create result Promises in Promise#then and Promise#catch if it's used or the creation is otherwise observable
Based-on: m-c 1342070
2023-02-01 07:38:16 +08:00
Martok ed8af362be Issue #2089 - Shrink Promise instances from 8 to 4 slots by moving debug information to an external object
Based-on: m-c 1342050
2023-02-01 07:37:53 +08:00
Martok ece0496985 Issue #2089 - Avoid copying/recreating iterator result, AsyncGeneratorRequest and GeneratorObject expression stacks
Based-on: m-c 1394682,1410283,1396499
2023-01-26 11:40:56 +08:00
Martok 8322304fb3 Issue #2089 - In Promises, use a C++ version of SpeciesConstructor when calling from C++
Based-on: m-c 1344656,1386534
2023-01-26 11:40:28 +08:00
Martok 0216108195 No issue - Throw error when resolving or rejecting promise returned by async function with testing function
Based-on: m-c 1418106
2023-01-26 11:39:31 +08:00
Jeremy Andrews 495db8d7bc Issue #1725 - Fix logic in PerformPromiseAllSettled.
This function essentially appears to work as written, there was an issue with it returning false too early in some situations that prevented it from working properly.
2021-07-23 08:57:36 +08:00
Moonchild ada10bce17 WIP: Base implementation 2021-07-23 08:57:35 +08:00
Moonchild dabd32f955 Issue #1656 - Part 7: Nuke vim config lines in JS 2020-09-25 22:04:24 +08:00
Gaming4JC 586cd0b71b Bug 1379525 - Part 2: Properly handle rejection in async-from-sync iteration.
Tag #1287
2019-12-18 09:17:08 +08:00
Gaming4JC 9e8369d01f Bug 1379525 - Part 1: Await on the value before yielding or returning inside async generator.
Tag #1287
2019-12-18 09:17:06 +08:00
Gaming4JC 3206741afa Bug 1355399 - Switch property retrieval in Async-from-Sync Iterator prototype methods.
Tag #1287
2019-12-18 09:17:04 +08:00
Gaming4JC 142e8bf444 Bug 1331092 - Part 7: Implement Async Generator yield*.
Tag #1287
2019-12-18 09:16:59 +08:00
Gaming4JC b5bcbfe58c Bug 1331092 - Part 2: Implement Async Generator except yield*.
Tag #1287
2019-12-18 09:16:56 +08:00
Gaming4JC 2bbebc6ebc Bug 1343481 - Part 6: Add native functions wrapper for GetInternalError and GetTypeError.
Tag #1287
2019-12-18 09:15:58 +08:00
Gaming4JC 04ec8aaf1c Bug 1343481 - Part 5: Rename AsyncFunction-related names in Promise.cpp to explicitly say Async Function.
Tag #1287
2019-12-18 09:15:56 +08:00
Gaming4JC f15e675b86 Bug 336705 - Part 1: Support creating and resolving Promises without resolve/reject functions.
Useful for internally-created Promises that'll only ever be resolved/rejected internally.

Tag #1287
2019-12-18 09:15:49 +08:00
Gaming4JC 70cbae88ea Bug 1317376 - Part 2: Detect Promise self-resolution when resolving through the Promise resolving fast path.
Tag #1287
2019-12-18 09:15:47 +08:00
Gaming4JC 300f97150c Bug 1317376 - Part 1: Remove unreachable code and remnants from the self-hosted implementation.
Tag #1287
2019-12-18 09:15:46 +08:00
André Bargull ff54e6899f Issue #1283 - Implement Promise.prototype.finally()
This resolves #1283.
2019-11-15 14:23:09 +08:00
Gaming4JC f376135778 1320408 - Part 21: Change PromiseObject::onSettled to static method. 2019-07-22 19:48:46 +08:00
Gaming4JC e5b36e01b9 1320408 - Part 20: Change PromiseObject::resolve and PromiseObject::reject to static method. 2019-07-22 19:48:40 +08:00
Gaming4JC cc8cb910dd 1320408 - Part 14: Change some GlobalObject methods to static method. 2019-07-22 19:48:14 +08:00
Gaming4JC 146dbe7bee 1323324 - Part 1: Make Promise::unforgeable{Resolve,Reject} spec-compliant. 2019-07-22 19:46:50 +08:00
janekptacijarabaci 4cb956bb3b Close iterator after error in Promise.{all,race}
Issue #17
2019-02-15 23:37:49 +08:00
roytam1 dcd9973243 import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00