Commit graph

1,055 commits

Author SHA1 Message Date
roytam1
eb8748c537 Merge remote-tracking branch 'origin/tracking' into custom 2023-03-06 16:29:00 +08:00
Moonchild
3fb11e542c Issue #2046 - correct debug assert for intl_FormatRelativeTime()
Probably fallout from the refactoring in #2109
Tag #1382
2023-03-06 16:27:12 +08:00
roytam1
ba020f4a76 Merge remote-tracking branch 'origin/tracking' into custom 2023-02-23 21:16:30 +08:00
Moonchild
fa014f9e95 Issue #2046 - Follow-up: Fix debug assert using old chars definition. 2023-02-23 21:16:05 +08:00
roytam1
a52c44343e Merge remote-tracking branch 'origin/tracking' into custom 2023-02-22 07:09:09 +08:00
Moonchild
db89c5a05d No issue - Refactor FindErrorInstanceOrPrototype
The logic here wasn't very transparent or easy to follow.
Doing a positive check to set the result instead of defaulting to it
also potentially prevents issues.
2023-02-22 07:07:58 +08:00
roytam1
fc9eb6a1b3 Merge remote-tracking branch 'origin/tracking' into custom 2023-02-21 08:21:33 +08:00
Martok
87eaaee953 Issue #2046 - Move a bunch of functions in builtin/intl/CommonFunctions.js into more-specific files, where those functions are only used in a single more-specific file 2023-02-21 08:20:01 +08:00
Martok
cf2e2ed906 Issue #2046 - Move builtin/Intl.js (which now contains only shared functionality) to builtin/intl/CommonFunctions.js 2023-02-21 08:19:43 +08:00
Martok
45720521cf Issue #2046 - Move Intl.Collator self-hosted code to a new builtin/intl/Collator.js file 2023-02-21 08:19:25 +08:00
Martok
a56b9e8324 Issue #2046 - Move Intl.NumberFormat self-hosted code to a new builtin/intl/NumberFormat.js file 2023-02-21 08:19:09 +08:00
Martok
38284ba8b4 Issue #2046 - Move Intl.DateTimeFormat self-hosted code to a new builtin/intl/DateTimeFormat.js file 2023-02-21 08:18:52 +08:00
Martok
e55cdd19a0 Issue #2046 - Move Intl.PluralRules self-hosted code to a new builtin/intl/PluralRules.js file 2023-02-21 08:18:37 +08:00
Martok
ae0eddc165 Issue #2046 - Move Intl.RelativeTimeFormat self-hosted code to a new builtin/intl/RelativeTimeFormat.js file 2023-02-21 08:18:19 +08:00
Martok
7f2b67f7dd Issue #2046 - Move the self-hosting of non-constructor properties of Intl to a new builtin/intl/IntlObject.js file 2023-02-21 08:18:01 +08:00
Martok
f8e3f81197 Issue #2046 - Move various generated files from builtin/Intl* to builtin/intl/*, and add "Generated" to their names for clarity 2023-02-21 08:17:46 +08:00
Martok
5574b06ff5 Issue #2046 - Move builtin/Intl.* to builtin/intl/IntlObject.* 2023-02-21 08:17:20 +08:00
Martok
5ad62567e0 Issue #2046 - Trim builtin/Intl.*'s #include set down to what is required for Intl itself 2023-02-21 08:16:55 +08:00
Martok
c7dab6c035 Issue #2046 - Move Intl.RelativeTimeFormat functionality into builtin/intl/RelativeTimeFormat.* 2023-02-21 08:16:37 +08:00
Martok
ed316832bf Issue #2046 - Move Intl.PluralRules functionality into builtin/intl/PluralRules.* 2023-02-21 08:16:19 +08:00
Martok
c981fb13ea Issue #2046 - Move Intl.DateTimeFormat functionality into builtin/intl/DateTimeFormat.* 2023-02-21 08:16:04 +08:00
Martok
ce98604d2e Issue #2046 - Move SharedIntlData into its own builtin/intl/SharedIntlData.* files so the world doesn't have to import all shared Intl functionality. 2023-02-21 08:15:47 +08:00
Martok
53c2f58c5b Issue #2046 - Move Intl.Collator functionality into builtin/intl/Collator.* 2023-02-21 08:15:31 +08:00
Martok
6da7d528d6 Issue #2046 - Move NewUNumberFormatForPluralRules next to its only use 2023-02-21 08:15:13 +08:00
Martok
e7565ff1ae Issue #2046 - Move Intl.NumberFormat functionality into builtin/intl/NumberFormat.* 2023-02-21 08:14:56 +08:00
Martok
eee13d2653 Issue #2046 - Create helper method to call ICU string conversion methods
Based-on: m-c 1333844
2023-02-21 08:14:41 +08:00
Martok
50e3c1f5e6 Issue #2046 - Move functionality used in the implementation of multiple Intl.* constructors into builtin/intl/CommonFunctions.* 2023-02-21 08:14:25 +08:00
Martok
0172619642 Issue #2046 - Move ScopedICUObject into builtin/intl/ScopedICUObject.h 2023-02-21 08:14:10 +08:00
roytam1
a234f69178 Merge remote-tracking branch 'origin/tracking' into custom 2023-02-02 21:44:02 +08:00
Moonchild
8d3f23ed00 Issue #2103 - Fix typo in RegExp Parser
This corrects the typo where the left-hand character would determine if
the right-hand character would be added or not.

Resolves #2103
2023-02-02 21:43:39 +08:00
roytam1
ea9d00f005 Merge remote-tracking branch 'origin/tracking' into custom 2023-02-02 09:32:40 +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
61c99bf6cd Issue #2089 - Implement AggregateError
Based-on: m-c 1568903/4,1641355(partial),1652148,1643397
2023-02-02 09:31:39 +08:00
Martok
209c8e06a2 Issue #2089 - Move ErrorObject parts from jsexn.cpp to ErrorObject.cpp
Based-on: m-c 1568903/2
2023-02-02 09:31:16 +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
roytam1
4475b2d9f7 revert last rev (7faa37b7) and revert rev b7e45308 and 9824659d instead.
because crash still happens. crash log:

RegExpShared::finalize(FreeOp* fop)
{
    for (auto& comp : compilationArray)
        js_free(comp.byteCode);
    for (size_t i = 0; i < tables.length(); i++)
        js_free(tables[i]);
    tables.~JitCodeTables(); // <----
}

Stack trace:
 	mozglue.dll!arena_dalloc(void * ptr, unsigned int offset) Line 4209	C
 	mozglue.dll!je_free(void * ptr) Line 6099	C
>	xul.dll!js::RegExpShared::finalize(js::FreeOp * fop) Line 982	C++
 	xul.dll!js::gc::Arena::finalize<js::RegExpShared>(js::FreeOp * fop, js::gc::AllocKind thingKind, unsigned int thingSize) Line 460	C++
 	xul.dll!FinalizeTypedArenas<js::RegExpShared>(js::FreeOp * fop, js::gc::Arena * * src, js::gc::SortedArenaList & dest, js::gc::AllocKind thingKind, js::SliceBudget & budget, js::gc::ArenaLists::KeepArenasEnum keepArenas) Line 521	C++
 	xul.dll!js::gc::ArenaLists::backgroundFinalize(js::FreeOp * fop, js::gc::Arena * listHead, js::gc::Arena * * empty) Line 2597	C++
 	xul.dll!js::gc::GCRuntime::sweepBackgroundThings(js::gc::ZoneList & zones, js::LifoAlloc & freeBlocks) Line 2982	C++
 	xul.dll!js::GCHelperState::doSweep(js::AutoLockGC & lock) Line 3183	C++
 	xul.dll!js::GCHelperState::work() Line 3103	C++
 	xul.dll!js::HelperThread::handleGCHelperWorkload(js::AutoLockHelperThreadState & locked) Line 1823	C++
 	xul.dll!js::HelperThread::threadLoop() Line 1888	C++
 	xul.dll!js::detail::ThreadTrampoline<void (__cdecl&)(void *),js::HelperThread *>::Start(void * aPack) Line 227	C++
 	[External Code]
 	[Frames below may be incorrect and/or missing, no symbols loaded for ucrtbase.dll]
2023-02-01 21:46:04 +08:00
roytam1
7faa37b7df reverting rev 22dc363c and 233802c9 for now since I got a crash in destructor of RegExpShared. 2023-02-01 10:56:26 +08:00
roytam1
5ee6b84d50 Merge remote-tracking branch 'origin/tracking' into custom 2023-02-01 07:43:04 +08:00
Job Bautista
10ef0da5a0 Issue #2099 - Remove unnecessary cast in GeneratorObject::suspend's do loop.
This resolves build bustage with --enable-debug.
2023-02-01 07:42:40 +08:00
Job Bautista
22dc363c3a Issue #2083 - Follow-up: RegExpShared::source should be a GCPtr.
A hangover from before RegExpShared was a GC thing, as noted by m-c 1399928.
2023-02-01 07:42:23 +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