Граф коммитов

90611 Коммитов

Автор SHA1 Сообщение Дата
Cosmin Sabou 680b4364c7 Backed out 13 changesets (bug 1690111) for causing fetch related crashes.
Backed out changeset 5f2c25d194ad (bug 1690111)
Backed out changeset 76c408bcd053 (bug 1690111)
Backed out changeset 6d0649fdafff (bug 1690111)
Backed out changeset c1330b5e8c43 (bug 1690111)
Backed out changeset 5fa36d8fd2a5 (bug 1690111)
Backed out changeset daf7d747853a (bug 1690111)
Backed out changeset f70e09a7f5c6 (bug 1690111)
Backed out changeset 40c6d6eed7f8 (bug 1690111)
Backed out changeset 692f2a759573 (bug 1690111)
Backed out changeset 7140866dd9f6 (bug 1690111)
Backed out changeset 2865fe682139 (bug 1690111)
Backed out changeset 9dcd2416f8a5 (bug 1690111)
Backed out changeset 9c411bf84079 (bug 1690111)
2023-09-11 17:55:24 +03:00
Steve Fink ca8393bf28 Bug 1690111 - Implement JS::EnsureNonInlineArrayBufferOrView. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D176596
2023-09-11 12:52:19 +00:00
Peter Van der Beken 7eea5225b7 Bug 1690111 - Add JS::AutoCheckCannotGC::reset. r=peterv
Depends on D131301

Differential Revision: https://phabricator.services.mozilla.com/D185069
2023-09-11 12:52:19 +00:00
Steve Fink 5d4aa85f64 Bug 1690111 - Implement the ability to pin lengths (prevent changes to length, eg via detaching) for ArrayBuffers and their views. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D131301
2023-09-11 12:52:19 +00:00
Jan de Mooij 0fb89a4460 Bug 1852238 - Unbox GetName and BindName inputs instead of relying on the type policy. r=iain
This is similar to the `CloseIter` IC, they all take an object instead of a boxed
value.

Differential Revision: https://phabricator.services.mozilla.com/D187784
2023-09-11 09:17:29 +00:00
André Bargull 11351261a9 Bug 1851520: Add missing JSAPI tests for CharacterEncoding. r=jandem
Overview:
- The error message kind was `JSEXN_NOTE`. Probably a copy-paste error, because
  the previous error entry has `JSEXN_NOTE`. Change this to `JSEXN_ERR` to use
  a correct error kind.
- Add missing null-termination in `EncodeWideToUtf8` and `EncodeUtf8ToWide`.
- And finally add a JSAPI test to cover this code.


Adding "testCharacterEncoding.cpp" caused unified builds to change and
"testJitABIcalls.cpp" is now in a unified build bundle which doesn't include
declarations for `JSContext` and `JS::Value`, which in turn caused build errors
when including "jit/ABIFunctions.h". Add the missing forward definitions to
"jit/ABIFunctions.h" to fix these build errors.

Differential Revision: https://phabricator.services.mozilla.com/D187764
2023-09-10 10:07:47 +00:00
Iain Ireland 21152fbf60 Bug 1851911: Disable bailout loop assertion after purging stubs in JitScript::traceWeak r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D187739
2023-09-08 19:28:04 +00:00
Tom Schuster 9917ffc2ef Bug 1846224 - Use RFPTarget for JS locale en-US spoofing. r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D184945
2023-09-08 19:24:44 +00:00
Tom Schuster 3fe3a9321d Bug 1846224 - Add a JavaScript per-realm locale override. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D184944
2023-09-08 19:24:44 +00:00
Ryan Hunt e7d47fea02 Bug 1847524 - wasm: Fix i31ref instructions in dead code. r=yury
i31ref instructions must validate in dead code, but should not
attempt to codegen.

Differential Revision: https://phabricator.services.mozilla.com/D187569
2023-09-08 17:57:33 +00:00
Ryan Hunt 9115ac056d Bug 1841119 - wasm: Keep recursion group alive for globals, tables, and tags. r=yury
Globals, tables, and tags can refer to specific TypeDef objects stored in RecGroups with the GC extension. These are normally kept alive by their containing instance, but it's possible for exported version of these to outlive their containing instance. This commit adds a strong reference from the JS-API objects to the
RecGroup that a TypeDef is in.

Differential Revision: https://phabricator.services.mozilla.com/D187568
2023-09-08 17:56:47 +00:00
Cosmin Sabou 5187f2523e Backed out changeset 2cbc53cb5d01 (bug 1851911) for causing bustages on JitScript.h. CLOSED TREE 2023-09-08 20:50:09 +03:00
Yoshi Cheng-Hao Huang 23681131f9 Bug 1850755 - Part 3: Remove shell options --enable-well-formed-unicode-strings in js/src/tests/non262/String/well-formed.js. r=spidermonkey-reviewers,jandem
Differential Revision: https://phabricator.services.mozilla.com/D187674
2023-09-08 17:10:50 +00:00
Yoshi Cheng-Hao Huang 6da8029221 Bug 1850755 - Part 2: Update test262-update.py and test262 tests. r=spidermonkey-reviewers,dminor
Differential Revision: https://phabricator.services.mozilla.com/D187448
2023-09-08 17:10:50 +00:00
Yoshi Cheng-Hao Huang ca92b6788a Bug 1850755 - Part 1: Turn on well-formed-unicode-strings by default in Browser and JS Shell. r=spidermonkey-reviewers,jandem
Well-Formed Unicode strings is in TC39 Stage 4 and has been merged into
ECMA262 spec,
https://github.com/tc39/ecma262/pull/3039

Differential Revision: https://phabricator.services.mozilla.com/D187182
2023-09-08 17:10:50 +00:00
Iain Ireland f8cb048a49 Bug 1851911: Disable bailout loop assertion after purging stubs in JitScript::traceWeak r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D187739
2023-09-08 16:46:52 +00:00
Iulian Moraru dd918f58bd Backed out 5 changesets (bug 1846224, bug 1845940) for causing spidermonkey build bustages on TestingUtility.cpp. CLOSED TREE
Backed out changeset fc9692101130 (bug 1846224)
Backed out changeset 61486ba55cae (bug 1846224)
Backed out changeset a85aaad7d2f8 (bug 1846224)
Backed out changeset e90bc9bc5729 (bug 1846224)
Backed out changeset 38262976d922 (bug 1845940)
2023-09-08 17:13:44 +03:00
Tom Schuster a14c9980e2 Bug 1846224 - Use RFPTarget for JS locale en-US spoofing. r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D184945
2023-09-08 13:38:11 +00:00
Tom Schuster 847fe59347 Bug 1846224 - Add a JavaScript per-realm locale override. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D184944
2023-09-08 13:38:11 +00:00
Jan de Mooij 2b9d2f3f5b Bug 1851976 - Mark infallible unbox non-movable. r=iain
We were adding an infallible unbox for the array passed to `JSOp::SpreadCall`.
This is fine, but we then loop hoisted it before the branch checking if the value
is an object or `undefined` (from `JSOp::OptimizeSpreadCall`). The unbox then failed
for the case where the value is `undefined`.

Differential Revision: https://phabricator.services.mozilla.com/D187709
2023-09-08 10:09:35 +00:00
Iulian Moraru 3614741dfe Backed out 3 changesets (bug 1850755) for causing jsreftest failures on well-formed.js. CLOSED TREE
Backed out changeset 40e6ebb21fef (bug 1850755)
Backed out changeset a69e473af87e (bug 1850755)
Backed out changeset 5a0171dba079 (bug 1850755)
2023-09-08 12:52:15 +03:00
Yoshi Cheng-Hao Huang 467346268b Bug 1850755 - Part 3: Remove shell options in js/src/tests/non262/String/well-formed.js. r=spidermonkey-reviewers,jandem
Differential Revision: https://phabricator.services.mozilla.com/D187674
2023-09-08 08:54:10 +00:00
Yoshi Cheng-Hao Huang 7be07a67fa Bug 1850755 - Part 2: Update test262-update.py and test262 tests. r=spidermonkey-reviewers,dminor
Differential Revision: https://phabricator.services.mozilla.com/D187448
2023-09-08 08:54:10 +00:00
Yoshi Cheng-Hao Huang e1dd3942ec Bug 1850755 - Part 1: Turn on well-formed-unicode-strings by default in Browser and JS Shell. r=spidermonkey-reviewers,jandem
Well-Formed Unicode strings is in TC39 Stage 4 and has been merged into
ECMA262 spec,
https://github.com/tc39/ecma262/pull/3039

Differential Revision: https://phabricator.services.mozilla.com/D187182
2023-09-08 08:54:09 +00:00
Iain Ireland 02deb3a858 Bug 1847290: More precise tracked sites in Ion r=jandem
The jitdump code that maps Ion code to source lines [depends on the trackedSite of the MIR node](https://searchfox.org/mozilla-central/rev/e7b8d13b7513b6fbd97d69e882d7faeed05309d0/js/src/jit/PerfSpewer.cpp#491). Post-WarpBuilder, we only update the tracked site at the beginning of a basic block, which makes source attribution imprecise.

In bug 1689990, Anba cleaned up some unused tracked site code and added an assertion that the tracked site for each op matched the tracked site for its containing block, in preparation for later removing the tracked site from the op entirely. We never followed up on that. This patch reverts the relevant parts of Anba's patch and instead borrows code from [here in IonBuilder](https://searchfox.org/mozilla-esr78/source/js/src/jit/IonBuilder.cpp#1630-1632).

This doesn't get us perfectly accurate source attribution, but Jeff and Denis have confirmed that it makes it significantly more useful.

Differential Revision: https://phabricator.services.mozilla.com/D186816
2023-09-08 05:44:16 +00:00
Ryan Hunt b3b912f859 Bug 1851468 - wasm: Set ContextOptions defaults to help consumers that don't read preferences. r=yury
WorkletThread does not read from preferences to initialize JS::ContextOptions
and relies on the default values it has. This lead to a regression from
bug 1832378 where certain wasm features had their field's default change.
This didn't affect other globals because we read preferences from those
and so the default value is ignored.

This commit fixes the default value for wasm features in JS::ContextOptions
as a temporary fix, and adds a quick test in worklets.

Ideally worklets will read from preferences for consistency and to allow
us to force enable/disable features. But that's a bigger change.

Differential Revision: https://phabricator.services.mozilla.com/D187583
2023-09-07 15:30:57 +00:00
Yury Delendik fd29b97c09 Bug 1851568 - Improve validation of tail call result types. r=bvisness
Differential Revision: https://phabricator.services.mozilla.com/D187501
2023-09-07 12:29:34 +00:00
Jan de Mooij e3cea5c34e Bug 1851872 part 2 - Use weak GetterSetter pointer for GuardHasGetterSetter. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D187580
2023-09-07 12:29:08 +00:00
Jan de Mooij 58cf76e4be Bug 1851872 part 1 - Use weak BaseScript pointer for GuardFunctionScript. r=iain
This just follows the `WeakShape` and `WeakObject` field types.

Differential Revision: https://phabricator.services.mozilla.com/D187579
2023-09-07 12:29:08 +00:00
Butkovits Atila 104bd0f208 Backed out 3 changesets (bug 1850755) for causing SM bustages complaing about xulRuntime.shell. CLOSED TREE
Backed out changeset 6c632ec74ee0 (bug 1850755)
Backed out changeset cd202b5a63ea (bug 1850755)
Backed out changeset a2d5b721e236 (bug 1850755)
2023-09-07 11:31:37 +03:00
Otto Länd 13854844cf Bug 1850755: apply code formatting via Lando
# ignore-this-changeset
2023-09-07 08:05:24 +00:00
Yoshi Cheng-Hao Huang 45c8d79957 Bug 1850755 - Part 2: Update test262-update.py and test262 tests. r=spidermonkey-reviewers,dminor
Differential Revision: https://phabricator.services.mozilla.com/D187448
2023-09-07 07:58:00 +00:00
Yoshi Cheng-Hao Huang fa82b83de2 Bug 1850755 - Turn on well-formed-unicode-strings by default in Browser and JS Shell. r=spidermonkey-reviewers,jandem
Well-Formed Unicode strings is in TC39 Stage 4 and has been merged into
ECMA262 spec,
https://github.com/tc39/ecma262/pull/3039

Differential Revision: https://phabricator.services.mozilla.com/D187182
2023-09-07 07:57:59 +00:00
Doug Thayer fd2c6e6e34 Bug 1851416 - Properly guard that the proxy hasn't been revoked r=iain
Maybe a little bit alarming how simple this testcase is.

Differential Revision: https://phabricator.services.mozilla.com/D187511
2023-09-07 03:47:18 +00:00
Masatoshi Kimura 859181dc99 Bug 1849927 - Bump WINVER to 0x0A00. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D186750
2023-09-06 19:30:04 +00:00
owlishDeveloper 30f829cb6e Bug 1850587 - Adjust expectations for the tests to account for isolation strategy in Fission r=nika
Differential Revision: https://phabricator.services.mozilla.com/D187073
2023-09-06 19:29:14 +00:00
Iain Ireland 507c198333 Bug 1851135: Fix magic value check r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D187299
2023-09-06 18:22:43 +00:00
Narcis Beleuzu 0c1740cbef Backed out changeset 0489416a8aec (bug 1851416) for bustages on testDirectProxyGet14.js . CLOSED TREE 2023-09-06 20:18:57 +03:00
Logan Rosen f024d94b2b Bug 1786490 - reformat the tree using black 23.3.0 r=sylvestre,webdriver-reviewers,taskgraph-reviewers,whimboo,jmaher,ahal,perftest-reviewers,geckoview-reviewers,afinder,m_kato
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D186092
2023-09-06 16:14:30 +00:00
Doug Thayer 3b66ad25bb Bug 1851416 - Properly guard that the proxy hasn't been revoked r=iain
Maybe a little bit alarming how simple this testcase is.

Differential Revision: https://phabricator.services.mozilla.com/D187511
2023-09-06 16:06:25 +00:00
Jan de Mooij 635571ffcb Bug 1850305 part 3 - Add an assertion. r=iain
This would catch similar issues in the future and is a nice invariant to maintain.

Differential Revision: https://phabricator.services.mozilla.com/D187266
2023-09-06 12:53:11 +00:00
Jan de Mooij 7831d3edd1 Bug 1850305 part 2 - Add some infallible type conversions in the transpiler. r=iain
This fixes issues caught by the assertion added in the next patch. These operations
are actually infallible so didn't have the same performance cliff.

Differential Revision: https://phabricator.services.mozilla.com/D187265
2023-09-06 12:53:11 +00:00
Steve Fink ed8430cb5e Bug 1850839 - Weaken isIndexed() assert r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D187315
2023-09-06 00:49:20 +00:00
Ben Visness 6497acf65d Bug 1784497: Create separate representation for InstanceElemSegment. r=rhunt
GC values have identity, and now that GC values can be stored in element
segments, we need to ensure that identity is preserved when initializing tables.
For example, if you use the same passive element segment to initialize two
different tables of structs, the structs in the two tables should be the same.

This means that we need to evaluate element segment expressions at instantiation
time, and store the results somewhere on the instance. This patch renames
ElemSegment to ModuleElemSegment and adds a new InstanceElemSegment type on
instances (which is just a vector of AnyRef).

Differential Revision: https://phabricator.services.mozilla.com/D183599
2023-09-05 23:35:17 +00:00
Ben Visness 99397495d4 Bug 1784497: Generalize element segments to store expressions. r=rhunt
As of the reference types proposal, tables can store more than just function
indices, and element segments can contain constant expressions. Our element
segment code did not really account for this - it basically just had a hack
where it would process ref.func, ref.null, and end instructions as if they were
a strange encoding of function indices.

As we move into the GC proposal, this is no longer sufficient. Storing structs
and arrays in tables requires us to handle more kinds of constant expressions
and to allow tables to store AnyRef. This patch does both, in the process
achieving better spec compliance with externref. (It is possible in the spec
today to import a global and store it in a table via an element segment. Only
Chrome actually supported this behavior, but now we do too.)

Differential Revision: https://phabricator.services.mozilla.com/D182121
2023-09-05 23:35:17 +00:00
Norisz Fay e4a95dc345 Backed out 2 changesets (bug 1850305) for causing assertion failures on TypePolicy.cpp CLOSED TREE
Backed out changeset 2689f838632f (bug 1850305)
Backed out changeset 5fda6c22e8e3 (bug 1850305)
2023-09-04 21:11:12 +03:00
Jan de Mooij 33f1d1053d Bug 1850305 part 3 - Add an assertion. r=iain
This would catch similar issues in the future and is a nice invariant to maintain.

Differential Revision: https://phabricator.services.mozilla.com/D187266
2023-09-04 14:07:34 +00:00
Jan de Mooij 5444be883f Bug 1850305 part 2 - Add some infallible type conversions in the transpiler. r=iain
This fixes issues caught by the assertion added in the next patch. These operations
are actually infallible so didn't have the same performance cliff.

Differential Revision: https://phabricator.services.mozilla.com/D187265
2023-09-04 14:07:33 +00:00
Jan de Mooij bd583315a0 Bug 1850305 part 1 - Fix a bailout performance cliff with GuardBooleanToInt32. r=iain
We were relying on `MBooleanToInt32`'s type policy to insert a fallible unbox
for the to-boolean conversion. This caused a performance cliff because for
frequent `TypePolicy` bailouts we disable compilation instead of invalidating
the script.

The fix is to add the unbox instruction in the transpiler.

Differential Revision: https://phabricator.services.mozilla.com/D187264
2023-09-03 15:25:17 +00:00
Tooru Fujisawa ce72fea4a7 Bug 1846194 - Remove off-thread compilation and decode API. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D185125
2023-09-01 03:43:21 +00:00
Tooru Fujisawa 9ddd62c7c1 Bug 1846392 - Part 2: Stop using JS::CanCompileOffThread and JS::CanDecodeOffThread in JS shell. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D185121
2023-09-01 03:43:20 +00:00
Tooru Fujisawa 31e1224902 Bug 1846392 - Part 1: Rewrite JS shell off-thread compilation/decode functions with JS::FrontendContext and its own thread. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D185063
2023-09-01 03:43:20 +00:00
Tooru Fujisawa 60183f2948 Bug 1846380 - Use JS::FrontendContext in ChromeUtils.compileScript. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D185062
2023-09-01 03:43:20 +00:00
Yury Delendik 9ba5de9883 Bug 1846762 - Import return_call_ref spec test. r=bvisness
Differential Revision: https://phabricator.services.mozilla.com/D185722
2023-08-31 19:32:45 +00:00
Yury Delendik 45d9cac5e5 Bug 1846762 - Implement return_call_ref. r=jseward
Differential Revision: https://phabricator.services.mozilla.com/D185706
2023-08-31 19:32:44 +00:00
Jan de Mooij bd5c860173 Bug 1850814 - Add post barrier fast path for last-buffered-cell also to Baseline and IC code. r=jonco
This lets us skip the call in BaselineCodeGen in ~70% of cases on Speedometer 3.
For IC code this is ~22%.

Differential Revision: https://phabricator.services.mozilla.com/D187136
2023-08-31 14:06:30 +00:00
Ryan Hunt 5c5632a208 Bug 1847239 - wasm: Reset non-nullable local state when using delegate to end try. r=jseward
A try block can end with 'delegate' instead of 'end'. We need to unset the nnl state
the same way in both.

Differential Revision: https://phabricator.services.mozilla.com/D185439
2023-08-29 17:50:41 +00:00
Tom Schuster 3d1f26d276 Bug 1849238 - Improve and rename JS::ObjectToCompletePropertyDescriptor. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D186504
2023-08-29 13:26:01 +00:00
Tooru Fujisawa 70c40a1658 Bug 1845638 - Part 1: Use JS::FrontendContext APIs and TaskController in compilation and decode in ScriptLoader. r=smaug,bthrall
Differential Revision: https://phabricator.services.mozilla.com/D184896
2023-08-29 12:07:18 +00:00
Mirko Brodesser 2966a909e7 Bug 1839316: part 4) Add `RequestPriority` to `ScriptFetchOptions` and `ScriptLoadRequest`. r=smaug
The request priority isn't propagated from `ScriptFetchOptions`, so
setting it has no effect for end-users. That will be implemented in a
following part.

Differential Revision: https://phabricator.services.mozilla.com/D183483
2023-08-28 11:56:34 +00:00
Daniel Minor 90b7f23473 Bug 1849727 - Fix missing checks when parsing decorators; r=arai
Differential Revision: https://phabricator.services.mozilla.com/D186662
2023-08-23 14:43:04 +00:00
Gregory Pappas 52bcd67482 Bug 1842462 - Remove dom.script_loader.external_scripts.utf8_parsing.enabled and dom.worker.script_loader.utf8_parsing.enabled prefs r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D186640
2023-08-22 21:29:11 +00:00
André Bargull 9a309c9c2a Bug 1843824: Handle dead wrappers. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D183714
2023-08-21 08:32:10 +00:00
Yury Delendik 40713b0f38 Bug 1847630 - Enable some experimental feature to be fuzzed. r=rhunt
Enables tail-calls and relaxed-simd specs in the WasmSmith fuzzer.

Depends on D186254

Differential Revision: https://phabricator.services.mozilla.com/D186259
2023-08-18 22:34:47 +00:00
Yury Delendik 92683487c9 Bug 1847630 - Enable threads and relaxed_simd in the WasmSmith. r=rhunt
Differential Revision: https://phabricator.services.mozilla.com/D186254
2023-08-18 22:34:47 +00:00
Iain Ireland f221202df3 Bug 1849099: Report oversized allocation in lshByAbsolute r=mgaudet
I missed this case in my patch for bug 1745907.

Differential Revision: https://phabricator.services.mozilla.com/D186497
2023-08-17 21:47:56 +00:00
Matthew Gaudet 7c4acfb6c6 Bug 1825861 - Simplify EnsureNativeFunction helper r=anba
Differential Revision: https://phabricator.services.mozilla.com/D186466
2023-08-17 19:55:33 +00:00
Matthew Gaudet 190829911d Bug 1825861 - Remove makeDebuggeeNativeFunction r=anba
Differential Revision: https://phabricator.services.mozilla.com/D186464
2023-08-17 19:55:33 +00:00
Jan de Mooij 92d6eebebc Bug 1838587 - Add test and release assertion. r=iain
Depends on D181389

Differential Revision: https://phabricator.services.mozilla.com/D181390
2023-08-17 15:21:34 +00:00
Jon Coppeard 5777657ab8 Bug 1848090 - When parsing JSON, Stop allocating in the nursery after two nursery collections r=sfink
The patch adds a nursery collection callback for the duration of parsing and
counts the collections. After the second collection we switch to allocating
everything in the tenured heap.

This change made parsing the JSON data in the bug significantly faster.

Differential Revision: https://phabricator.services.mozilla.com/D186362
2023-08-17 09:51:17 +00:00
Mike Hommey 62eb042a11 Bug 1849070 - Avoid using char_traits<unsigned char>. r=spidermonkey-reviewers,anba
It is not guaranteed to exist by the standard, and is actively being
removed from libc++ in LLVM 18.

Differential Revision: https://phabricator.services.mozilla.com/D186421
2023-08-17 05:37:11 +00:00
Otto Länd ac09383536 Bug 1847469: apply code formatting via Lando
# ignore-this-changeset
2023-08-16 18:22:28 +00:00
Tooru Fujisawa 70cc38532e Bug 1847469 - Part 26: Use column number types in JS::CompileOptions. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185764
2023-08-16 17:31:42 +00:00
Tooru Fujisawa 35123cf7cb Bug 1847469 - Part 25: Use uint32_t for line and column in JS::CompileOptions as a preparation to use column number types. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185763
2023-08-16 17:31:42 +00:00
Tooru Fujisawa 357b9c51d8 Bug 1847469 - Part 24: Use column number types in JS::DescribeScriptedCaller. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185762
2023-08-16 17:31:42 +00:00
Tooru Fujisawa 264b992ca0 Bug 1847469 - Part 23: Use uint32_t for line and column in DescribeScriptedCaller* functions as a preparation to use column number types. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185761
2023-08-16 17:31:41 +00:00
Tooru Fujisawa 53ee8e4eee Bug 1847469 - Part 22: Use column number types in SrcNote::ColSpan. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185760
2023-08-16 17:31:41 +00:00
Tooru Fujisawa 3905aba97e Bug 1847469 - Part 21: Use column number types in ErrorObject. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185759
2023-08-16 17:31:41 +00:00
Tooru Fujisawa b23c224e33 Bug 1847469 - Part 20: Use column number types in JSErrorBase. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185758
2023-08-16 17:31:40 +00:00
Tooru Fujisawa 6eeb584f68 Bug 1847469 - Part 19: Remove unused conversion functions. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185757
2023-08-16 17:31:40 +00:00
Tooru Fujisawa 376421c1fb Bug 1847469 - Part 18: Remove unused line and column from MIR. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185756
2023-08-16 17:31:40 +00:00
Tooru Fujisawa 0c8fbd6b62 Bug 1847469 - Part 17: Use uint32_t for line and column in JSErrorBase as a preparation to use column number types. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185755
2023-08-16 17:31:40 +00:00
Tooru Fujisawa a2d07d6d6a Bug 1847469 - Part 16: Use column number types in debugger. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185754
2023-08-16 17:31:39 +00:00
Tooru Fujisawa fd167ac58f Bug 1847469 - Part 15: Use uint32_t for line and column in debugger as a preparation to use column number types. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185753
2023-08-16 17:31:39 +00:00
Tooru Fujisawa b18208d021 Bug 1847469 - Part 14: Use column number types in ScriptSource. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185752
2023-08-16 17:31:39 +00:00
Tooru Fujisawa feda566217 Bug 1847469 - Part 13: Use column number types in PCToLineNumber. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185751
2023-08-16 17:31:39 +00:00
Tooru Fujisawa 81b7cf1fc7 Bug 1847469 - Part 12: Use column number types in JitCodeSourceInfo. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185750
2023-08-16 17:31:38 +00:00
Tooru Fujisawa d8f4eed5f9 Bug 1847469 - Part 11: Use column number types in JSScript. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185749
2023-08-16 17:31:38 +00:00
Tooru Fujisawa 4dd112d474 Bug 1847469 - Part 10: Use column number types in SourceExtent. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185748
2023-08-16 17:31:38 +00:00
Tooru Fujisawa 0ceff7d136 Bug 1847469 - Part 9: Use column number types in SavedFrame API. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185747
2023-08-16 17:31:38 +00:00
Tooru Fujisawa f2974ab488 Bug 1847469 - Part 8: Use column number types in ubi. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185746
2023-08-16 17:31:37 +00:00
Tooru Fujisawa 7bb2ff05ee Bug 1847469 - Part 7: Use column number types in FrameIter and SavedFrame internal. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185745
2023-08-16 17:31:37 +00:00
Tooru Fujisawa 41cb19fe2a Bug 1847469 - Part 6: Use column number types in Module API. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185744
2023-08-16 17:31:37 +00:00
Tooru Fujisawa 1c26f53df3 Bug 1847469 - Part 5: Use column number types in ErrorMetadata. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185743
2023-08-16 17:31:37 +00:00
Tooru Fujisawa 9377598d84 Bug 1847469 - Part 4: Use column number types in irregexp. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185742
2023-08-16 17:31:36 +00:00
Tooru Fujisawa 85fbe28a64 Bug 1847469 - Part 3: Use column number types in module internal. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185741
2023-08-16 17:31:36 +00:00
Tooru Fujisawa 203c0844d2 Bug 1847469 - Part 2: Use column number types in parser and bytecode compiler. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185740
2023-08-16 17:31:36 +00:00
Tooru Fujisawa ecb285cbe7 Bug 1847469 - Part 1: Add JS::ColumnNumberZeroOrigin, JS::ColumnNumberOneOrigin, JS::WasmFunctionIndex, JS::ColumnNumberOffset and compound types. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185739
2023-08-16 17:31:36 +00:00
Tooru Fujisawa 206b4527fa Bug 1848325 - Part 17: Remove unused CommonPropertyNames entries. r=jandem
Depends on D186303

Differential Revision: https://phabricator.services.mozilla.com/D186304
2023-08-16 13:04:13 +00:00
Tooru Fujisawa 9325873845 Bug 1848325 - Part 16: Rename more CommonPropertyNames with __-prefix. r=jandem
__defineGetter__ etc are currently unused, but will be used again in bug 1847677.

Depends on D186302

Differential Revision: https://phabricator.services.mozilla.com/D186303
2023-08-16 13:04:13 +00:00
Tooru Fujisawa ed3f5a47d5 Bug 1848325 - Part 15: Rename defineDataPropertyIntrinsic to DefineDataProperty. r=jandem
Depends on D186301

Differential Revision: https://phabricator.services.mozilla.com/D186302
2023-08-16 13:04:13 +00:00
Tooru Fujisawa b845a21b12 Bug 1848325 - Part 14: Rename remaining special CommonPropertyNames. r=jandem
Depends on D186300

Differential Revision: https://phabricator.services.mozilla.com/D186301
2023-08-16 13:04:13 +00:00
Tooru Fujisawa d7b7e8ca7f Bug 1848325 - Part 13: Rename CommonPropertyNames with spaces. r=jandem
Depends on D186299

Differential Revision: https://phabricator.services.mozilla.com/D186300
2023-08-16 13:04:12 +00:00
Tooru Fujisawa 400b2cc100 Bug 1848325 - Part 12: Rename CommonPropertyNames for self-hosted. r=jandem
Depends on D186298

Differential Revision: https://phabricator.services.mozilla.com/D186299
2023-08-16 13:04:12 +00:00
Tooru Fujisawa e1798ed130 Bug 1848325 - Part 11: Rename CommonPropertyNames with #-prefix. r=jandem
Depends on D186297

Differential Revision: https://phabricator.services.mozilla.com/D186298
2023-08-16 13:04:12 +00:00
Tooru Fujisawa 66a5008b44 Bug 1848325 - Part 10: Rename CommonPropertyNames for use-prefix. r=jandem
Depends on D186296

Differential Revision: https://phabricator.services.mozilla.com/D186297
2023-08-16 13:04:12 +00:00
Tooru Fujisawa 3727e4a9e5 Bug 1848325 - Part 9: Rename CommonPropertyNames for futex. r=jandem
Depends on D186295

Differential Revision: https://phabricator.services.mozilla.com/D186296
2023-08-16 13:04:11 +00:00
Tooru Fujisawa ef174a4774 Bug 1848325 - Part 8: Rename CommonPropertyNames comma to comma_. r=jandem
Depends on D186294

Differential Revision: https://phabricator.services.mozilla.com/D186295
2023-08-16 13:04:11 +00:00
Tooru Fujisawa a88d77a9d8 Bug 1848325 - Part 7: Rename CommonPropertyNames with __-prefix. r=jandem
Depends on D186293

Differential Revision: https://phabricator.services.mozilla.com/D186294
2023-08-16 13:04:11 +00:00
Tooru Fujisawa 08bb5c6fd4 Bug 1848325 - Part 6: Rename CommonPropertyNames with " Iterator" suffix. r=jandem
Depends on D186292

Differential Revision: https://phabricator.services.mozilla.com/D186293
2023-08-16 13:04:10 +00:00
Tooru Fujisawa e3426d8cd5 Bug 1848325 - Part 5: Rename CommonPropertyNames with *-prefix. r=jandem
Depends on D186291

Differential Revision: https://phabricator.services.mozilla.com/D186292
2023-08-16 13:04:10 +00:00
Tooru Fujisawa dafac534b4 Bug 1848325 - Part 4: Rename CommonPropertyNames with [object *] content. r=jandem
Depends on D186290

Differential Revision: https://phabricator.services.mozilla.com/D186291
2023-08-16 13:04:10 +00:00
Tooru Fujisawa 254fcb9553 Bug 1848325 - Part 3: Rename CommonPropertyNames with dot-prefix. r=jandem
Depends on D186289

Differential Revision: https://phabricator.services.mozilla.com/D186290
2023-08-16 13:04:10 +00:00
Tooru Fujisawa 8f46f86fb5 Bug 1848325 - Part 2: Rename CommonPropertyNames with $-prefix. r=jandem
Depends on D186288

Differential Revision: https://phabricator.services.mozilla.com/D186289
2023-08-16 13:04:09 +00:00
Tooru Fujisawa 6298245c02 Bug 1848325 - Part 1: Rename CommonPropertyNames empty to empty_. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D186288
2023-08-16 13:04:09 +00:00
Jan de Mooij faccfab4bc Bug 1806499 - Move signal handler initialization out of HasPlatformSupport. r=rhunt
After some of the Stencil changes, we now end up calling `HasPlatformSupport` from the
`CompileOptions` constructor when parsing any JS code (to check for asm.js availability).

This means we were installing the Wasm signal handlers for every process that executes
JS code. On Mac we need to create a separate thread for these signal handlers, so there is
some overhead that we want to avoid when we're not executing asm.js or Wasm code.

This patch moves the `EnsureFullSignalHandlers` call out of `HasPlatformSupport`.
We now call this when instantiating the asm.js module.

This also simplifies the WASI build a little.

Differential Revision: https://phabricator.services.mozilla.com/D186103
2023-08-16 11:08:43 +00:00
Cristian Tuns 4fe9ed8f30 Backed out 27 changesets (bug 1847469) for causing spidermonkey bustages in Script.cpp CLOSED TREE
Backed out changeset 9d6e2651a013 (bug 1847469)
Backed out changeset 9b72d668efd2 (bug 1847469)
Backed out changeset 86abf5cf0a22 (bug 1847469)
Backed out changeset 46833087f8ac (bug 1847469)
Backed out changeset f3e2207fdeec (bug 1847469)
Backed out changeset aed75776cfff (bug 1847469)
Backed out changeset 8292a38bd99f (bug 1847469)
Backed out changeset 1320f83fb8c7 (bug 1847469)
Backed out changeset df9f925f9837 (bug 1847469)
Backed out changeset 69f32cf1862a (bug 1847469)
Backed out changeset b2ddddec8818 (bug 1847469)
Backed out changeset 056eed7abc97 (bug 1847469)
Backed out changeset 5df4f43ac0bf (bug 1847469)
Backed out changeset cb57923f6532 (bug 1847469)
Backed out changeset a0993f2a2195 (bug 1847469)
Backed out changeset 782499fbedf2 (bug 1847469)
Backed out changeset cf84fb98c5e1 (bug 1847469)
Backed out changeset 1fa5ab59814b (bug 1847469)
Backed out changeset f5f78944df81 (bug 1847469)
Backed out changeset aa14337bf5c6 (bug 1847469)
Backed out changeset 6757db4575d7 (bug 1847469)
Backed out changeset 236ff135701e (bug 1847469)
Backed out changeset 9b4d5b435020 (bug 1847469)
Backed out changeset a0f789621bc8 (bug 1847469)
Backed out changeset c19b81f48055 (bug 1847469)
Backed out changeset b4521e546d7e (bug 1847469)
Backed out changeset f26a10289316 (bug 1847469)
2023-08-16 07:08:01 -04:00
Otto Länd cf0941b070 Bug 1847469: apply code formatting via Lando
# ignore-this-changeset
2023-08-16 10:38:31 +00:00
Tooru Fujisawa 185839bd83 Bug 1847469 - Part 26: Use column number types in JS::CompileOptions. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185764
2023-08-16 10:26:34 +00:00
Tooru Fujisawa 99530a4362 Bug 1847469 - Part 25: Use uint32_t for line and column in JS::CompileOptions as a preparation to use column number types. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185763
2023-08-16 10:26:34 +00:00
Tooru Fujisawa 5c4dc17c44 Bug 1847469 - Part 24: Use column number types in JS::DescribeScriptedCaller. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185762
2023-08-16 10:26:33 +00:00
Tooru Fujisawa f61ba91ee2 Bug 1847469 - Part 23: Use uint32_t for line and column in DescribeScriptedCaller* functions as a preparation to use column number types. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185761
2023-08-16 10:26:33 +00:00
Tooru Fujisawa 42fee3cf02 Bug 1847469 - Part 22: Use column number types in SrcNote::ColSpan. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185760
2023-08-16 10:26:32 +00:00
Tooru Fujisawa 52394e4a4f Bug 1847469 - Part 21: Use column number types in ErrorObject. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185759
2023-08-16 10:26:32 +00:00
Tooru Fujisawa ee81f946a2 Bug 1847469 - Part 20: Use column number types in JSErrorBase. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185758
2023-08-16 10:26:32 +00:00
Tooru Fujisawa 3f55ec7262 Bug 1847469 - Part 19: Remove unused conversion functions. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185757
2023-08-16 10:26:32 +00:00
Tooru Fujisawa 2a42af3d0e Bug 1847469 - Part 18: Remove unused line and column from MIR. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185756
2023-08-16 10:26:31 +00:00
Tooru Fujisawa c37bbdb5f3 Bug 1847469 - Part 17: Use uint32_t for line and column in JSErrorBase as a preparation to use column number types. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185755
2023-08-16 10:26:31 +00:00
Tooru Fujisawa 3ff56fc280 Bug 1847469 - Part 16: Use column number types in debugger. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185754
2023-08-16 10:26:31 +00:00
Tooru Fujisawa ca1431eebc Bug 1847469 - Part 15: Use uint32_t for line and column in debugger as a preparation to use column number types. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185753
2023-08-16 10:26:31 +00:00
Tooru Fujisawa a6d795e43b Bug 1847469 - Part 14: Use column number types in ScriptSource. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185752
2023-08-16 10:26:30 +00:00
Tooru Fujisawa 2415cca7ce Bug 1847469 - Part 13: Use column number types in PCToLineNumber. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185751
2023-08-16 10:26:30 +00:00
Tooru Fujisawa e49ed329a5 Bug 1847469 - Part 12: Use column number types in JitCodeSourceInfo. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185750
2023-08-16 10:26:30 +00:00
Tooru Fujisawa 6ed9b0b30a Bug 1847469 - Part 11: Use column number types in JSScript. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185749
2023-08-16 10:26:30 +00:00
Tooru Fujisawa c38b6641b8 Bug 1847469 - Part 10: Use column number types in SourceExtent. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185748
2023-08-16 10:26:29 +00:00
Tooru Fujisawa bfb39b4a60 Bug 1847469 - Part 9: Use column number types in SavedFrame API. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185747
2023-08-16 10:26:29 +00:00
Tooru Fujisawa ca7ba27825 Bug 1847469 - Part 8: Use column number types in ubi. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185746
2023-08-16 10:26:29 +00:00
Tooru Fujisawa 025944aede Bug 1847469 - Part 7: Use column number types in FrameIter and SavedFrame internal. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185745
2023-08-16 10:26:29 +00:00
Tooru Fujisawa 475220dbaa Bug 1847469 - Part 6: Use column number types in Module API. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185744
2023-08-16 10:26:28 +00:00
Tooru Fujisawa c83a308dcf Bug 1847469 - Part 5: Use column number types in ErrorMetadata. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185743
2023-08-16 10:26:28 +00:00
Tooru Fujisawa 02a1aa5fe5 Bug 1847469 - Part 4: Use column number types in irregexp. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185742
2023-08-16 10:26:28 +00:00
Tooru Fujisawa 71c5590d5b Bug 1847469 - Part 3: Use column number types in module internal. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185741
2023-08-16 10:26:28 +00:00
Tooru Fujisawa 72486ee3d6 Bug 1847469 - Part 2: Use column number types in parser and bytecode compiler. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185740
2023-08-16 10:26:27 +00:00
Tooru Fujisawa 2d379b4dc9 Bug 1847469 - Part 1: Add JS::ColumnNumberZeroOrigin, JS::ColumnNumberOneOrigin, JS::WasmFunctionIndex, JS::ColumnNumberOffset and compound types. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185739
2023-08-16 10:26:27 +00:00
Jon Coppeard 526c00fd08 Bug 1847397 - Check no post barrier needed when eliding it in UpdateRegExpStatics r=jandem
The original issue was fixed bug 1847017. This patch adds some checks to ensure
things are working correctly.

Differential Revision: https://phabricator.services.mozilla.com/D186213
2023-08-16 08:46:26 +00:00
Doug Thayer ac1cf29992 Bug 1824051 - Fix loading class and cOps and ensure we check for null r=iain
Fairly straightforward patch. I didn't add a test for this specifically,
because it turns out the previous tests would have been failing if I had just
correctly loaded the JSClass out of the BaseShape in the first place because
PlainObject has null class ops. We were just actually loading the proto
pointer before off the BaseShape, and then loading an offset from that which
just happened to usually be non-null, causing us to take the more conservative
path.

Depends on D185350

Differential Revision: https://phabricator.services.mozilla.com/D186170
2023-08-15 21:51:10 +00:00
Doug Thayer 33f20e49a0 Bug 1824051 - Fix alias sets for CheckIsObj and CheckScriptedProxyGetResult r=jandem
So, this patch is very tentative. The reason for this is that if we just change
the alias sets for these ops, we end up failing this assertion: https://searchfox.org/mozilla-central/rev/85269d4444c2553e7f4c669fe4de72d64f4fe438/js/src/jit/CodeGenerator.cpp#332.
Our solution to this is to give the ops resume points, and... blow right past
the warnings telling us not to have multiple effectful operations for a single
transpiled IC. Iain suggested that I rope you in here, Jan, to get your take on
whether this is safe or not. Nothing seems to blow up in tests.

Differential Revision: https://phabricator.services.mozilla.com/D185350
2023-08-15 21:51:10 +00:00
Doug Thayer 64484bff10 Bug 1824051 - Tidy up slot loading code r=iain
Differential Revision: https://phabricator.services.mozilla.com/D184721
2023-08-15 21:51:10 +00:00
Doug Thayer 716fa9646b Bug 1824051 - Add tests for Scripted Proxy Get IC r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D182506
2023-08-15 21:51:10 +00:00
Doug Thayer 4a0b1e43c4 Bug 1824051 - Handle IC for scripted proxy get in Ion r=iain,jandem
Differential Revision: https://phabricator.services.mozilla.com/D182133
2023-08-15 21:51:09 +00:00
Doug Thayer e77934e39a Bug 1824051 - Add scripted proxy IC to baseline r=iain,jandem
Differential Revision: https://phabricator.services.mozilla.com/D182382
2023-08-15 21:51:09 +00:00
Doug Thayer 0e1503cd84 Bug 1824051 - Expose proxy get result validation r=iain,jandem
Differential Revision: https://phabricator.services.mozilla.com/D182381
2023-08-15 21:51:09 +00:00
Doug Thayer 2c9f58d3b6 Bug 1824051 - Track in ObjectFlags whether we need proxy get/set validation r=iain,jandem
Differential Revision: https://phabricator.services.mozilla.com/D182380
2023-08-15 21:51:08 +00:00
Yury Delendik a22056a5b6 Bug 1847330 - Enable tail calls in wasm-smith. r=rhunt
Depends on D185489

Differential Revision: https://phabricator.services.mozilla.com/D185490
2023-08-15 13:30:56 +00:00
Yury Delendik a322a6247a Bug 1847330 - Fix testWasm.cpp WasmFeatures. r=rhunt
Perhaps regression from bug 1832378

Differential Revision: https://phabricator.services.mozilla.com/D185489
2023-08-15 13:30:56 +00:00
Tooru Fujisawa 8f38393e3c Bug 1848473 - Part 2: Remove IDPART from CommonPropertyNames. r=anba
Depends on D186220

Differential Revision: https://phabricator.services.mozilla.com/D186222
2023-08-15 12:34:25 +00:00
Tooru Fujisawa 0ae3fb0db5 Bug 1848473 - Part 1: Directly use string constants instead of js_*_str and let compiler deduplicate them. r=anba
Differential Revision: https://phabricator.services.mozilla.com/D186220
2023-08-15 12:34:24 +00:00
Jon Coppeard 677a0a9107 Bug 1834711 - Add testcase r=jandem
Depends on D179576

Differential Revision: https://phabricator.services.mozilla.com/D179577
2023-08-15 12:08:38 +00:00
Simon Thoby e1f55c565b Bug 1847763 - Fix an invalid error case in the JS opcode tests r=yury
Depends on D186075

Differential Revision: https://phabricator.services.mozilla.com/D186076
2023-08-14 15:35:24 +00:00
Simon Thoby 2b94b26a26 Bug 1847763 - Replace instances of old local/global setters and getters in the wasm JIT tests r=yury
Differential Revision: https://phabricator.services.mozilla.com/D186075
2023-08-14 15:35:23 +00:00
Cristina Horotan aa373bc69f Backed out 7 changesets (bug 1824051) for causing frequent JavaScript crashes (bug 1848391) a=backout
Backed out changeset ca712509847a (bug 1824051)
Backed out changeset 028f628b7ddc (bug 1824051)
Backed out changeset 630e159488e2 (bug 1824051)
Backed out changeset 0e618ce1438d (bug 1824051)
Backed out changeset 75eed2f4f607 (bug 1824051)
Backed out changeset 05cd60595797 (bug 1824051)
Backed out changeset 5066066a54b1 (bug 1824051)
2023-08-12 14:12:32 +03:00
Tooru Fujisawa 0d04f4494b Bug 1848369 - Add checksum to Stencil XDR content. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D186025
2023-08-12 00:04:20 +00:00
Steve Fink c2089aeeb8 Bug 1847369 - only allow indexed properties in elements for both Arrays and non-Arrays r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D185614
2023-08-11 23:54:02 +00:00
Nicolas B. Pierron f3868f6392 Bug 1845257 - Prevent adding extra side-effect annotations r=iain
When an object is handled by Scalar Replacement, it might be annotated
as having side-effect, such side-effect are usually encoded as part of
the resume point to restore what the actual value was.

Unfortunately, this flag is stored on the object which has side-effect
and if the side-effect are localized to a small scope, not all Resume
Points might have a need side-effects to properly recover the content
of the object.

If one object were to be annotated, but the resume point happen to not
have any side-effect registered, then this would cause a problem where
the value would be replcade by an optimized-out magic-value instead of
being decoded.

This change makes it such that if an allocation has a flag which
explicitly request for a side-effect, but the ResumePoint does not
have any registered, then the allocation flag is ignored.

Differential Revision: https://phabricator.services.mozilla.com/D185579
2023-08-11 11:03:23 +00:00
Jan de Mooij bc0810b1a9 Bug 1847017 part 5 - Fix check for metadata hook for code shared across realms. r=jonco
In `MacroAssembler::checkAllocatorState` we were checking if the realm has a
metadata hook, but that doesn't work if code is shared across realms.

This patch adds a counter to the zone so that we can check if any realm has a
metadata hook. We now also only check this for object allocations so that string
and bigint allocations can still use the fast path.

Differential Revision: https://phabricator.services.mozilla.com/D185914
2023-08-11 10:41:59 +00:00
Jan de Mooij be550281e5 Bug 1847017 part 4 - Remove JitRealm. r=iain
We've migrated all shared stubs to `JitZone` or `JitRuntime`.

Differential Revision: https://phabricator.services.mozilla.com/D185913
2023-08-11 10:41:59 +00:00
Jan de Mooij 23061f9ef2 Bug 1847017 part 3 - Change HasOffThreadIonCompile argument from realm to zone. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D185912
2023-08-11 10:41:58 +00:00
Jan de Mooij 4fadbac438 Bug 1847017 part 2 - Move string/regexp stubs from JitRealm to JitZone. r=iain,jonco
The regexp stubs can be pretty large and this avoids re-generating them for each realm.

It also lets us remove `JitRealm` in a later patch because it's now empty.

Differential Revision: https://phabricator.services.mozilla.com/D185911
2023-08-11 10:41:58 +00:00
Jan de Mooij 4138695bc8 Bug 1847017 part 1 - Change stubs to load RegExpStatics and match result shape at runtime. r=iain
This will let us share the code across realms.

Differential Revision: https://phabricator.services.mozilla.com/D185910
2023-08-11 10:41:58 +00:00
Tooru Fujisawa 42011c65e9 Bug 1746374 - Use the number of UTF-16 code units as column number. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185372
2023-08-11 08:11:48 +00:00
Tooru Fujisawa 148500b129 Bug 1846913 - Part 2: Clarify origin of column number fields and methods. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185371
2023-08-11 08:11:48 +00:00
Tooru Fujisawa 441e14104a Bug 1846913 - Part 1: Use 1-origin column number for compile errors, compile wanring, and error notes. r=iain,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D185370
2023-08-11 08:11:48 +00:00
Tooru Fujisawa acd75c8d74 Bug 1848203 - Use pointer instead of reference to avoid dereference on dummy pointer. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185967
2023-08-11 06:04:10 +00:00
Butkovits Atila 146550736b Backed out changeset de8c85a84de9 (bug 1847369) for causing SM bustages. CLOSED TREE 2023-08-11 00:44:48 +03:00
Eemeli Aro a5dabe8f0d Bug 1834305 - Remove intl/locale/PluralForm.sys.mjs as unused. r=nordzilla,devtools-reviewers
This library is now completely unused in m-c.

Differential Revision: https://phabricator.services.mozilla.com/D185699
2023-08-10 20:39:20 +00:00
Steve Fink 195f719e93 Bug 1847369 - only allow indexed properties in elements for both Arrays and non-Arrays r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D185614
2023-08-10 19:59:12 +00:00
Karl Tomlinson ff49201f0f Bug 1358149 use fdlibm for inexact math functions in ffvpx/libavcodec r=padenot,firefox-build-system-reviewers,glandium
This includes the rdft FFT implementation.

Differential Revision: https://phabricator.services.mozilla.com/D185781
2023-08-10 19:46:05 +00:00
Doug Thayer cf2c2fb13a Bug 1824051 - Fix alias sets for CheckIsObj and CheckScriptedProxyGetResult r=jandem
So, this patch is very tentative. The reason for this is that if we just change
the alias sets for these ops, we end up failing this assertion: https://searchfox.org/mozilla-central/rev/85269d4444c2553e7f4c669fe4de72d64f4fe438/js/src/jit/CodeGenerator.cpp#332.
Our solution to this is to give the ops resume points, and... blow right past
the warnings telling us not to have multiple effectful operations for a single
transpiled IC. Iain suggested that I rope you in here, Jan, to get your take on
whether this is safe or not. Nothing seems to blow up in tests.

Differential Revision: https://phabricator.services.mozilla.com/D185350
2023-08-10 17:58:09 +00:00
Doug Thayer bd3fcaa6a5 Bug 1824051 - Tidy up slot loading code r=iain
Differential Revision: https://phabricator.services.mozilla.com/D184721
2023-08-10 17:58:09 +00:00
Doug Thayer 7cae84b787 Bug 1824051 - Add tests for Scripted Proxy Get IC r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D182506
2023-08-10 17:58:08 +00:00
Doug Thayer 09feddcb42 Bug 1824051 - Handle IC for scripted proxy get in Ion r=iain,jandem
Differential Revision: https://phabricator.services.mozilla.com/D182133
2023-08-10 17:58:08 +00:00
Doug Thayer 6ba8e8e99b Bug 1824051 - Add scripted proxy IC to baseline r=iain,jandem
Differential Revision: https://phabricator.services.mozilla.com/D182382
2023-08-10 17:58:08 +00:00
Doug Thayer bb906e1d22 Bug 1824051 - Expose proxy get result validation r=iain,jandem
Differential Revision: https://phabricator.services.mozilla.com/D182381
2023-08-10 17:58:07 +00:00
Doug Thayer dc65c51bc6 Bug 1824051 - Track in ObjectFlags whether we need proxy get/set validation r=iain,jandem
Differential Revision: https://phabricator.services.mozilla.com/D182380
2023-08-10 17:58:07 +00:00
Tooru Fujisawa 160367cace Bug 1845640 - Part 2: Add JS::ReadOnlyCompileOptions parameter to error/warning related JS::FrontendContext APIs. r=bthrall
Differential Revision: https://phabricator.services.mozilla.com/D184737
2023-08-10 10:03:13 +00:00
Tooru Fujisawa 5e91ea4c32 Bug 1845640 - Part 1: Add API to convert JS::FrontendContext error to runtime error. r=bthrall
Differential Revision: https://phabricator.services.mozilla.com/D184664
2023-08-10 10:03:12 +00:00
Tooru Fujisawa 6619482322 Bug 1845702 - Make OwningCompileOptions movable. r=bthrall
Differential Revision: https://phabricator.services.mozilla.com/D184736
2023-08-10 10:03:12 +00:00
Tooru Fujisawa 18f30d5e2f Bug 1845584 - Remove JS::CompilationStorage parameter from JS::PrepareForInstantiate. r=bthrall
Differential Revision: https://phabricator.services.mozilla.com/D184663
2023-08-10 10:03:11 +00:00
Tooru Fujisawa ec821c6d19 Bug 1845416 - Add JS::ReadOnlyDecodeOptions and JS::OwningDecodeOptions. r=bthrall
Differential Revision: https://phabricator.services.mozilla.com/D184543
2023-08-10 10:03:11 +00:00
Jan de Mooij 6ee566874a Bug 1847891 part 4 - Move RegExpStatics pointer to RegExpRealm. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D185789
2023-08-10 09:23:26 +00:00
Jan de Mooij 0b29b90747 Bug 1847891 part 3 - Bake in the global in Ion codegen to get rid of some dependent loads. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185788
2023-08-10 09:23:26 +00:00
Jan de Mooij 13ac774efc Bug 1847891 part 2 - Move RegExpRealm from Realm to GlobalObjectData. r=jonco,iain
It now also uses strong references instead of weak pointers. This will simplify
bug 1847017 because we can then assume the match result shape for a realm doesn't
go away when a GC happens.

Differential Revision: https://phabricator.services.mozilla.com/D185787
2023-08-10 09:23:26 +00:00
Jan de Mooij 5e62426ab5 Bug 1847891 part 1 - Add MacroAssembler::loadGlobalObjectData. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185786
2023-08-10 09:23:25 +00:00
Karl Tomlinson f3a72d6d5a Bug 1358149 use prefix instead of namespace for fdlibm function names r=arai
This will facilitate making the functions available to C code.

Differential Revision: https://phabricator.services.mozilla.com/D185777
2023-08-10 06:55:30 +00:00
Masayuki Nakano 17f4ff6134 Bug 1845215 - part 2: Make `ContentEventHandler::NodePosition` inherits `RawRangeBoundary` instead of `RangeBoundary` r=smaug
It's used for tying a set of node and offset in it in short time and
`ContentEventHandler` does not flush pending things in most paths.
Therefore, it can avoid using `RangeBoundary` for solving its performance
issue.

Differential Revision: https://phabricator.services.mozilla.com/D184442
2023-08-10 00:59:28 +00:00
Jon Coppeard 970aa448a4 Bug 1847813 - Process loaded modules asynchronously in DOM module loader r=smaug
Based on the explanation on the bug, the solution would seem to be to call the
ModuleLoaderBase::OnModuleLoadComplete hook from a microtask. This causes a ton
of test failures.

Instead this patch changes the DOM script loader to implement this hook with a
runnable. This fixes the problem (verified manually) and all tests pass.

(Replacing the runnable with a microtask just in the DOM script loader also
does not work and results in many test failures. I'm still trying to understand
why.)

The changes to ContinueDynamicImport are removed because they are also on this
path and we don't need a microtask as well.

This takes us closer to the state before bug 1842798 landed when all the module
loader used MozPromise internally and completions like this happened via
runnables.

I was not able to immediately come up with a test for this.

Differential Revision: https://phabricator.services.mozilla.com/D185830
2023-08-09 22:49:46 +00:00
Cosmin Sabou 3643afcb0b Backed out changeset 62c1fc4ecc8d (bug 1847369) for causing Stringify marionette_harness test failures. 2023-08-09 22:57:47 +03:00
Matthew Gaudet 693499c1ea Bug 1847360 - Don't crash on other magic values when checking for uninitialized lexical values r=arai
Differential Revision: https://phabricator.services.mozilla.com/D185715
2023-08-09 19:26:01 +00:00
Stanca Serban ac988894d2 Backed out 7 changesets (bug 1824051) for causing jsreftests failures. CLOSED TREE
Backed out changeset 37ae95e83ecc (bug 1824051)
Backed out changeset 1f20f928a5ba (bug 1824051)
Backed out changeset 3588b8562945 (bug 1824051)
Backed out changeset 768e06b8a316 (bug 1824051)
Backed out changeset 219bb6711bf4 (bug 1824051)
Backed out changeset ebef3458bf23 (bug 1824051)
Backed out changeset e43ce2da2717 (bug 1824051)
2023-08-09 22:13:33 +03:00
Steve Fink 12c202219d Bug 1847369 - only allow indexed properties in elements for both Arrays and non-Arrays r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D185614
2023-08-09 18:43:58 +00:00
Doug Thayer 0457115ef2 Bug 1824051 - Fix alias sets for CheckIsObj and CheckScriptedProxyGetResult r=jandem
So, this patch is very tentative. The reason for this is that if we just change
the alias sets for these ops, we end up failing this assertion: https://searchfox.org/mozilla-central/rev/85269d4444c2553e7f4c669fe4de72d64f4fe438/js/src/jit/CodeGenerator.cpp#332.
Our solution to this is to give the ops resume points, and... blow right past
the warnings telling us not to have multiple effectful operations for a single
transpiled IC. Iain suggested that I rope you in here, Jan, to get your take on
whether this is safe or not. Nothing seems to blow up in tests.

Differential Revision: https://phabricator.services.mozilla.com/D185350
2023-08-09 18:27:02 +00:00
Doug Thayer 6a98d73a0d Bug 1824051 - Tidy up slot loading code r=iain
Differential Revision: https://phabricator.services.mozilla.com/D184721
2023-08-09 18:27:02 +00:00
Doug Thayer e685919eb5 Bug 1824051 - Add tests for Scripted Proxy Get IC r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D182506
2023-08-09 18:27:01 +00:00
Doug Thayer 3689912b38 Bug 1824051 - Handle IC for scripted proxy get in Ion r=iain,jandem
Differential Revision: https://phabricator.services.mozilla.com/D182133
2023-08-09 18:27:01 +00:00
Doug Thayer a1c5ecdb11 Bug 1824051 - Add scripted proxy IC to baseline r=iain,jandem
Differential Revision: https://phabricator.services.mozilla.com/D182382
2023-08-09 18:27:01 +00:00
Doug Thayer 4e6ed581d3 Bug 1824051 - Expose proxy get result validation r=iain,jandem
Differential Revision: https://phabricator.services.mozilla.com/D182381
2023-08-09 18:27:01 +00:00
Doug Thayer a9db3f6206 Bug 1824051 - Track in ObjectFlags whether we need proxy get/set validation r=iain,jandem
Differential Revision: https://phabricator.services.mozilla.com/D182380
2023-08-09 18:27:00 +00:00
Cosmin Sabou c406bcf318 Backed out 5 changesets (bug 1839316) for causing bustages on ScriptLoader.cpp. CLOSED TREE
Backed out changeset 85f107e082ee (bug 1839316)
Backed out changeset 8c1e22518c3a (bug 1839316)
Backed out changeset a4c3dec0f34c (bug 1839316)
Backed out changeset 313ff15742dd (bug 1839316)
Backed out changeset fa200e26bbb1 (bug 1839316)
2023-08-09 20:16:06 +03:00
Matthew Gaudet f052551a08 Bug 1847831 - Add ReportLargeOutOfMemory r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D185711
2023-08-09 15:30:13 +00:00
Zhao Jiazhong 20f0e28b45 Bug 1847871 - [loong64][mips64] Port tagging for JSString* in AnyRef. r=yury
Differential Revision: https://phabricator.services.mozilla.com/D185772
2023-08-09 14:50:58 +00:00
Mirko Brodesser 5cade38f47 Bug 1839316: part 4) Add `RequestPriority` to `ScriptFetchOptions` and `ScriptLoadRequest`. r=smaug
The request priority isn't propagated from `ScriptFetchOptions`, so
setting it has no effect for end-users. That will be implemented in a
following part.

Differential Revision: https://phabricator.services.mozilla.com/D183483
2023-08-09 13:50:28 +00:00
Jamie Nicol d977d44c20 Bug 1843534 - Use low resolution timestamp for GC timeouts. r=jonco,smaug
On certain devices we have seen that taking frequent high-resolution
timestamps can be expensive, therefore it makes sense to use
low-resolution timestamps instead where possible.

js::Nursery::isUnderused() and CCGCScheduler::MaybePokeCC() check for
timeouts of > 1 second, therefore the low resolution timer is more
than adequate.

Differential Revision: https://phabricator.services.mozilla.com/D185006
2023-08-09 10:28:36 +00:00
Jamie Nicol 7a78be9a55 Bug 1843534 - Avoid measuring protect time when write-protection is disabled. r=jandem
On certain devices we have seen that taking frequent timestamps can be
expensive. Currently we measure the time taken to write protect JIT
code, and as this is a hot path we see these timestamps show up in
profiles. However, since bug 1835876 we no longer write protect code
in content processes. This patch therefore avoids measuring the time
when write protection is disabled.

Differential Revision: https://phabricator.services.mozilla.com/D185005
2023-08-09 10:28:36 +00:00
Jan de Mooij b65b23c08f Bug 1847714 part 4 - Store shape instead of template object for match result objects. r=iain
We now only need to know the shape so we no longer have to store a template object.

This will make it easier to share the match-stub across realms later on, because
the stub can then just load this shape at runtime.

Differential Revision: https://phabricator.services.mozilla.com/D185653
2023-08-09 07:22:24 +00:00
Jan de Mooij a7a359647d Bug 1847714 part 3 - Tidy up match result code more. r=iain
* Use `initSlot` instead of `setSlot` because it's a little faster.
* Use default `undefined` value for template object slots.
* Remove some unnecessary stores in match stub code.
* Use named constants instead of 0 and 1 in `BuildFlatMatchArray`.
* The template array object can be an empty array now.

Differential Revision: https://phabricator.services.mozilla.com/D185652
2023-08-09 07:22:23 +00:00
Jan de Mooij 641cf896e2 Bug 1847714 part 2 - Use createArrayWithFixedElements for regexp match result object. r=iain
This lets us get rid of the template object in later patches.

This patch also adds an optimization for the common case of less than 14 elements by
supporting array capacities of 2/6/14 elements instead of always using 14.

Differential Revision: https://phabricator.services.mozilla.com/D185651
2023-08-09 07:22:23 +00:00
Jan de Mooij 7e76ca7a02 Bug 1847714 part 1 - Support allocating dynamic slots in createArrayWithFixedElements. r=iain
The regular expression match result is an array object with dynamic slots.

Differential Revision: https://phabricator.services.mozilla.com/D185650
2023-08-09 07:22:23 +00:00
Ryan Hunt f9ff2f3a7f Bug 1845673 - wasm: Fix case in branch casts with stack results. r=yury
If there are stack results and the branch target has a different stack height
from the current code, baseline will invert the branch and use a stub to
adjust the stack before jumping to the target. It looks like we had a typo
and the branch code for casts would fail to invert the branch.

Differential Revision: https://phabricator.services.mozilla.com/D185437
2023-08-08 20:22:08 +00:00
Ryan Hunt 561fb781ba Bug 1845436 - wasm: Always use the first occuring type index when there is a canonical type. r=yury
Module serialization needs a map from type def pointer to type index. When we have
structurally identical type definitions, we have multiple options of what to use
in the map. Right now we used the last occuring type index in the module. This
caused us to encode type indices while serializing that point to types we haven't
decoded yet, running into errors. This commit changes us to keep the first type
index that we had for the canonical type, to avoid this.

Differential Revision: https://phabricator.services.mozilla.com/D185202
2023-08-08 20:20:35 +00:00
Ryan Hunt 0e950091a9 Bug 1843295 - wasm: Properly serialize GC subtype declarations. r=yury
We need to serialize/deserialize the (sub) declaration for GC types.

Differential Revision: https://phabricator.services.mozilla.com/D185197
2023-08-08 20:18:59 +00:00
Ryan Hunt fd36e4db4c Bug 1823379 - wasm: Test case. r=jseward
Depends on D174766

Differential Revision: https://phabricator.services.mozilla.com/D174767
2023-08-08 15:23:23 +00:00
Jamie Nicol 1e51c83eff Bug 1843538 - Query AARCH64 CPU features once and cache result r=jseward
On android devices repeatedly querying the CPU's features can be
expensive and frequently shows up in speedometer profiles. This patch
makes us query the features the first time they are required, then on
subsequent occaisions we reuse the cached result instead of querying
again each time.

Differential Revision: https://phabricator.services.mozilla.com/D185001
2023-08-08 13:30:44 +00:00
Jon Coppeard 385f79fdcf Bug 1846270 - Fix parallel marking utilization telemetry broken by previous patch in this bug r=sfink
My previous patch changed the way |parallelRunTime| is calculated by adding
waiting time where it was previously subtracted. The utilization telemetry is
meant to show the fraction of time the helper threads spent running so waiting
time should not be included.

Differential Revision: https://phabricator.services.mozilla.com/D185578
2023-08-08 08:36:03 +00:00
Iain Ireland 6d116a9a6c Bug 1843344: Improve diagnostic for icEntryFromPCOffset crashes r=jandem
This assertion has been failing in nightly/beta recently for unclear reasons. Unfortunately, minidumps just show us the MOZ_DIAGNOSTIC_ASSERT machinery instead of any useful information.

Printing out these two values before crashing will help us figure out if the pcOffset is out of bounds, or if it is pointing to an offset without an IC.

Differential Revision: https://phabricator.services.mozilla.com/D184861
2023-08-07 21:28:28 +00:00
Simon Thoby 112ea9b198 Bug 1832576 - Remove unused (and invalid) wasm SIMD opcodes in JIT tests r=yury
The wasm SIMD opcodes were changed when the SIMD proposal was merged: 2c28fa8cf6 (diff-e9b9432641b95561a3a6e1559d172e1e10000e3ec6b4421668db6202722d3200R197).
Some of the SIMD opcodes described in the JIT tests were not updated to reflect that change, but it had no consequences as they were "orphaned" (tests no longer used them).

Differential Revision: https://phabricator.services.mozilla.com/D185511
2023-08-07 18:43:41 +00:00
Cosmin Sabou 0058dbdd1c Backed out 5 changesets (bug 1839316) for causing leaks. CLOSED TREE
Backed out changeset 75edff380fee (bug 1839316)
Backed out changeset 6a622fd5cd91 (bug 1839316)
Backed out changeset 60908cc7c586 (bug 1839316)
Backed out changeset 7b9dd8875a9e (bug 1839316)
Backed out changeset b586915187c2 (bug 1839316)
2023-08-07 16:43:03 +03:00
Tooru Fujisawa dd02d84fff Bug 1842701 - Part 4: Add tests. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D184199
2023-08-07 12:12:24 +00:00
Tooru Fujisawa 8277772940 Bug 1842701 - Part 3: Fallback to CompileGlobalScript without bindings from CompileGlobalScriptWithExtraBindings if no binding is used by the script. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D184198
2023-08-07 12:12:24 +00:00
Tooru Fujisawa 31a3563e77 Bug 1842701 - Part 2: Use CompileGlobalScriptWithExtraBindings in Debugger.Object.prototype.executeInGlobalWithBindings unless useInnerBindings option is specified. r=nbp,devtools-reviewers,nchevobbe
In order to keep the compatibility with DevTools internal methods, the existing
behavior where all bindings are shadowed is kept as `useInnerBindings` option.

Differential Revision: https://phabricator.services.mozilla.com/D184197
2023-08-07 12:12:23 +00:00
Tooru Fujisawa 661e4dd352 Bug 1842701 - Part 1: Add CompileGlobalScriptWithExtraBindings. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D184196
2023-08-07 12:12:22 +00:00
Mirko Brodesser 5d091f10d0 Bug 1839316: part 4) Add `RequestPriority` to `ScriptFetchOptions` and `ScriptLoadRequest`. r=smaug
The request priority isn't propagated from `ScriptFetchOptions`, so
setting it has no effect for end-users. That will be implemented in a
following part.

Differential Revision: https://phabricator.services.mozilla.com/D183483
2023-08-07 11:46:19 +00:00
Jon Coppeard 7516a36349 Bug 1846835 - Part 2: Also assert that other callbacks are found when removal requested r=sfink
Depends on D185306

Differential Revision: https://phabricator.services.mozilla.com/D185307
2023-08-07 08:46:59 +00:00
Jon Coppeard 6dcaa59099 Bug 1846835 - Part 1: Allow the same nursery collection callback to be registered more than once r=sfink
This adds the data parameter to the remove API and only removes when both
callback and data argument match, allowing the same callback to be registered
more than once with different data pointers. This also asserts that the
callback is found when removal is requestd.

Differential Revision: https://phabricator.services.mozilla.com/D185306
2023-08-07 08:46:59 +00:00
Makoto Kato 80aa728f71 Bug 1719535 - Part 4. Add ICU4X Data Provider. r=platform-i18n-reviewers,dminor,sylvestre
ICU4X will be used by ECMA-402 implementation at future. So we should link it
to SpiderMonkey instead of libxul only.

Depends on D178157

Differential Revision: https://phabricator.services.mozilla.com/D167673
2023-08-07 06:23:48 +00:00
Makoto Kato d34f218bae Bug 1719535 - Part 3. Remove config/external/icu4x. r=platform-i18n-reviewers,dminor
No longer use postdata since we can use backed data provider.

Depends on D178156

Differential Revision: https://phabricator.services.mozilla.com/D178157
2023-08-07 06:23:47 +00:00
Zhao Jiazhong 38bc24b98f Bug 1846936 - [loong64][mips64] Port wasm return calls implementation. r=yury
Differential Revision: https://phabricator.services.mozilla.com/D185392
2023-08-04 17:17:17 +00:00
Otto Länd 579de717f9 Bug 1692065: apply code formatting via Lando
# ignore-this-changeset
2023-08-04 14:28:24 +00:00
Ryan Hunt 3326b67fc4 Bug 1692065 - wasm: Add tagging for 31-bit integers and i31ref. r=yury
This commit adds a tag 0x1 for 31-bit integers in AnyRef. Any JS value
that is losslessly representable (without coercion) in this range is
stored without boxing. This is chosen to line up exactly with how the
i31ref type is required to interoperate with JS.

There is now sequencing required when checking tags, first you must
check for 0x1 to look for i31 values. If that is set, the 0x2 bit is
actually part of the i31 value and should be ignored.

This commit then also adds support for the i31ref type and instructions
in validation and across our compilers. The codegeneration for it is
pretty simple. There are some MIR optimizations we could do here in
the future, but they're not important right now.

Differential Revision: https://phabricator.services.mozilla.com/D177814
2023-08-04 14:06:50 +00:00
Ryan Hunt b0b3bb75a6 Bug 1692065 - wasm: Add tagging for JSString* in AnyRef. r=yury
Before this commit we would need to box a JSString* in WasmValueBox
when we received one from JS and converted to an AnyRef.

This commit adds a tag 0x2 to AnyRef to distinguish JSString* from
JSObject*. We do not use tag 0x1 as that will be used for i31ref
values. This relies on alignment of all GC cell allocations.

This commit refactors the code generation routines around AnyRef
so that they all exist in MacroAssembler. This makes it possible
to update one place when adding support for a new tag.

Our existing tests about passing values to/from externref should
be sufficient to cover this new addition. There is no user visible
change to this.

Differential Revision: https://phabricator.services.mozilla.com/D177813
2023-08-04 14:06:50 +00:00
Ryan Hunt 1b7268cfe7 Bug 1692065 - wasm: Update safepoints to track AnyRef. r=jandem
Now that we have a proper wasm::AnyRef type with a tagging scheme (no
longer just a JSObject*), we will need to track it independently in
SafepointReader/Writer. This will make sure that wasm anyrefs are
traced correctly when in JS ion functions when directly calling a
wasm function.

Wasm stackmaps are also updated in this commit, but are fairly simple
because they assume everything is an anyref.

Differential Revision: https://phabricator.services.mozilla.com/D177812
2023-08-04 14:06:50 +00:00
Ryan Hunt 17e9151457 Bug 1692065 - wasm: Rename MIRType::RefOrNull to 'WasmAnyRef'. r=yury
This is a mechanical change. The previous name 'RefOrNull' was too
generic, and it wasn't clear that the type was actually a wasm::AnyRef
type.

Differential Revision: https://phabricator.services.mozilla.com/D177811
2023-08-04 14:06:49 +00:00
Ryan Hunt 3f3f8774fd Bug 1692065 - wasm: Create a unique wasm::AnyRef type. r=yury,jonco
Right now wasm references area represented as a JSObject*. This is assumed in
many places in SpiderMonkey, most prominently in our GC integration
around tracing, the store buffer, and write barriers. This will cause issues
when we add tagging for JSString* values and 31-bit unboxed integers.

This commit makes wasm::AnyRef into a generally useful class and then
adds GC integration so that it behaves similar to other tagged values, such
as JS::Value.

The wasm component is then updated to use this new type wherever it
previously was assuming it.

Differential Revision: https://phabricator.services.mozilla.com/D177810
2023-08-04 14:06:49 +00:00
André Bargull d7b5956390 Bug 1809662 - Part 5: Add tests for new Set methods. r=dminor
The tests are partially based on the old tests.

Test262 tests are still in progress.

Differential Revision: https://phabricator.services.mozilla.com/D166561
2023-08-04 09:43:05 +00:00
André Bargull 89da60a76f Bug 1809662 - Part 4: Implement new Set methods. r=dminor
New implementation of the proposed Set methods.

Differential Revision: https://phabricator.services.mozilla.com/D166560
2023-08-04 09:43:05 +00:00
André Bargull 1f774de006 Bug 1809662 - Part 3: Expose Set.prototype.delete and Set.prototype.size to self-hosted code. r=dminor
Both functions are needed in the next part.

Differential Revision: https://phabricator.services.mozilla.com/D166558
2023-08-04 09:43:05 +00:00
André Bargull 3487bd3c2b Bug 1809662 - Part 2: Remove old implementation of new Set methods. r=dminor
The spec has changed so much that restarting from scratch is necessary.

Differential Revision: https://phabricator.services.mozilla.com/D166559
2023-08-04 09:43:04 +00:00
André Bargull 1c322c9bf3 Bug 1809662 - Part 1: Enable new Set methods by default on Nightly. r=dminor
The proposal is now on stage 3, so it can be enabled by default on Nightly.

Differential Revision: https://phabricator.services.mozilla.com/D182673
2023-08-04 09:43:04 +00:00
Jon Coppeard 80cac6bbb5 Bug 1843838 - Rename ScriptLoadRequest::IsReadyToRun to IsFinished since this returns true for cancelled requests r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D183740
2023-08-04 09:40:40 +00:00
Jon Coppeard 57c9ab6897 Bug 1847019 - Skip unnecessary atom marking work r=sfink
This patch skips marking atoms unsed by uncollected zones if there are no
uncollected zones.  Also it skips allocating a bitmap for the union of atoms to
mark if there's only one zone.

Differential Revision: https://phabricator.services.mozilla.com/D185314
2023-08-04 08:41:18 +00:00
Matthew Gaudet c890584e50 Bug 1847069 - Clarify TryFoldStub OOM handling r=iain
OOM Handling delenda est

Differential Revision: https://phabricator.services.mozilla.com/D185328
2023-08-03 21:14:10 +00:00