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

87774 Коммитов

Автор SHA1 Сообщение Дата
Butkovits Atila 9f2f65d166 Backed out 5 changesets (bug 1786834, bug 1797024) for causing failures at ParserAtom.cpp. CLOSED TREE
Backed out changeset a3ef21e74788 (bug 1797024)
Backed out changeset ad0ab9e860d0 (bug 1797024)
Backed out changeset 18f609b05b50 (bug 1797024)
Backed out changeset d56b9abc6a5c (bug 1786834)
Backed out changeset 20f28bf6c511 (bug 1786834)
2022-11-11 08:58:28 +02:00
Tooru Fujisawa 5fe6bbb2c6 Bug 1797024 - Part 3: Remove unnecessary JSContext parameters. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D160208
2022-11-11 06:30:43 +00:00
Tooru Fujisawa 5b65891101 Bug 1797024 - Part 2: Move WellKnownParserAtoms out of JSRuntime. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D160207
2022-11-11 06:30:42 +00:00
Tooru Fujisawa 0d41b8d702 Bug 1797024 - Part 1: Move OOM handling out of frontend::WellKnownParserAtoms. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D160206
2022-11-11 06:30:42 +00:00
Tooru Fujisawa ccabe4cf6a Bug 1786834 - Part 2: Remove unnecessary JSContext parameters. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D160205
2022-11-11 06:30:41 +00:00
Tooru Fujisawa 88944ac635 Bug 1786834 - Part 1: Move SharedImmutableStringsCache out of JSRuntime and make it singleton. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D160204
2022-11-11 06:30:41 +00:00
Stanca Serban baf169c748 Backed out 5 changesets (bug 1797024, bug 1786834) for causing build bustages on ParserAtom.cpp. CLOSED TREE
Backed out changeset ea88488b0626 (bug 1797024)
Backed out changeset c4fcaed9709c (bug 1797024)
Backed out changeset 149d939edcea (bug 1797024)
Backed out changeset 3280c912570a (bug 1786834)
Backed out changeset ba594d0b12b0 (bug 1786834)
2022-11-11 08:09:23 +02:00
Tooru Fujisawa 80da629315 Bug 1797024 - Part 3: Remove unnecessary JSContext parameters. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D160208
2022-11-11 04:55:53 +00:00
Tooru Fujisawa 01d7696dd8 Bug 1797024 - Part 2: Move WellKnownParserAtoms out of JSRuntime. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D160207
2022-11-11 04:55:53 +00:00
Tooru Fujisawa 78cebc6ddd Bug 1797024 - Part 1: Move OOM handling out of frontend::WellKnownParserAtoms. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D160206
2022-11-11 04:55:52 +00:00
Tooru Fujisawa f0b8711681 Bug 1786834 - Part 2: Remove unnecessary JSContext parameters. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D160205
2022-11-11 04:55:52 +00:00
Tooru Fujisawa 7cfc66b5a8 Bug 1786834 - Part 1: Move SharedImmutableStringsCache out of JSRuntime and make it singleton. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D160204
2022-11-11 04:55:51 +00:00
Tooru Fujisawa 23d0744bd3 Bug 1799415 - Try fallback from jsm to sys.mjs when access is denied by sandbox. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D161766
2022-11-10 11:35:24 +00:00
Jan de Mooij 94e5a815ff Bug 1798284 part 3 - Use a non-atomic load for HeaderWord::get. r=jonco
This improves GCC/Clang compiler optimizations. For example, when checking if
an object has `JSClass` `A` or `B` with `obj->is<A>() || obj->is<B>()`, the
compiler is now able to fold the redundant `obj->shape->base->clasp` loads.

This has an exception for `MaybeForwardedObjectClass` because that's called from
`ArrayBufferViewObject::trace` during compacting GC.

forwardedshape

Differential Revision: https://phabricator.services.mozilla.com/D160793
2022-11-10 11:26:18 +00:00
Yury Delendik e794f85d42 Bug 1798551 - Fix non-nullable local state for if-else. r=rhunt
Differential Revision: https://phabricator.services.mozilla.com/D161041
2022-11-09 23:14:33 +00:00
Yury Delendik a0cbb700ac Bug 1798970 - Add support for FMA3 instructions in Relaxed SIMD. r=rhunt
Adds detection of FMA in Intel CPUs.

Use vfmadd231ps/d and vfnmadd231ps/d instructions by default if FMA is available. Pref'd on/off with --wasm-relaxed-simd and --avx settings. The latter can be used to test different hardware.

Differential Revision: https://phabricator.services.mozilla.com/D161502
2022-11-09 23:13:29 +00:00
Matthew Gaudet 616d720c98 Bug 1798723 - Document punboxing and nunboxing r=nbp DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D161053
2022-11-09 20:49:41 +00:00
Yury Delendik cc1e25a8e3 Bug 1799014 - Fix f64x2./f32x4.max for AVX cpus. r=rhunt
Addresses wrong refactoring/optimization of the
minMaxFloat32x4AVX and minMaxFloat64x2AVX functions.

Testing of this case is covered by spec tests.
(Also to be addressed in bug 1797194)

Differential Revision: https://phabricator.services.mozilla.com/D161335
2022-11-09 20:01:42 +00:00
André Bargull 6e60b8922b Bug 1701711: Enable test case for undefined loads. r=iain
We no longer load the prototype after bug 1792228, so we don't have to support
`MObjectStaticProto` during scalar replacement. This also means scalar
replacement when loading undefined properties is now trivially supported.

Differential Revision: https://phabricator.services.mozilla.com/D161702
2022-11-09 18:45:10 +00:00
André Bargull 7d0125b8c7 Bug 1799859: Add support for "microsecond" and "nanosecond" units. r=dminor
Steps performed:
- Add "microsecond" and "nanosecond" to "intl/icu/data_filter.json".
- Run "icu_sources_data.py" to update the ICU data file.
- Run "update-tzdata.sh" to reapply the tzdata 2022f changes.
- Add "microsecond" and "nanosecond" to "SanctionedSimpleUnitIdentifiers.yaml".
- Run "make_intl_data.py units" to regenerate additional SpiderMonkey files.

Spec PR: https://github.com/tc39/ecma402/pull/708

Differential Revision: https://phabricator.services.mozilla.com/D161676
2022-11-09 16:45:43 +00:00
Mike Maksymowych 592f21d08e Bug 1492570 - Resolve shadow variable warnings. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D155799
2022-11-09 15:49:12 +00:00
Dan Minor 793353a464 Bug 1798883 - Reserve capacity in Buffer::reserve; r=anba
This fixes a problem where we were hitting simulated OOMs due to a mismatch
between what had been reserved and the actually capacity of the underlying
Vector. It's safe to use up to the capacity of the Vector, but simulated OOMs
are triggered if an attempt is used more space than what has been reserved.
With this change in place, we can use infallible resize operations in the
written method, avoiding problems with simulated OOMs there as well.

Differential Revision: https://phabricator.services.mozilla.com/D161330
2022-11-09 15:26:59 +00:00
Jan de Mooij 9e723ef687 Bug 1795886 - Remove special cases for ScriptSourceObject from CCW code. r=jonco
We're no longer creating wrappers for `ScriptSourceObject`.

Differential Revision: https://phabricator.services.mozilla.com/D159594
2022-11-09 13:06:09 +00:00
Jon Coppeard c6bcbe66e0 Bug 1799678 - Fix assertion that assumed it could be only happen on the main thread r=sfink
JS::RuntimeHeapIsMinorCollecting() gets the JSContext from TLS, but
IsMarkedInternal() can be called from a helper thread where this is null.

Differential Revision: https://phabricator.services.mozilla.com/D161611
2022-11-09 09:37:00 +00:00
Yulia Startsev 90c9e66373 Bug 1799619 - Disable array grouping by default on nightly; r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D161567
2022-11-09 09:24:14 +00:00
André Bargull c5b6637488 Bug 1799633: Handle too large requests in OrderedHashTable::rehash(). r=iain
Prefer INT32_MAX over UINT32_MAX so we don't have to worry about too large
values when inlining `{Map,Set}.prototype.size` in the JITs.

Differential Revision: https://phabricator.services.mozilla.com/D161576
2022-11-09 08:01:44 +00:00
André Bargull 2b3a4af928 Bug 1799638 - Part 2: Add casts to avoid floating point math. r=dminor
Add explicit casts to ensure the operations are performed using integer instead
of floating point math. Existing assertions ensure there won't be integer overflows.

Depends on D161591

Differential Revision: https://phabricator.services.mozilla.com/D161592
2022-11-09 06:57:58 +00:00
André Bargull 5ee3ad46f8 Bug 1799638 - Part 1: Round seconds towards the start-of-time in DateTimeInfo::toClampedSeconds(). r=dminor
Differential Revision: https://phabricator.services.mozilla.com/D161591
2022-11-09 06:57:57 +00:00
André Bargull fbcd4f9076 Bug 1799490 - Part 2: Transpile Map.prototype.size and Set.prototype.size in Warp. r=iain
Transpile both CacheIR operations in Warp.

Differential Revision: https://phabricator.services.mozilla.com/D161489
2022-11-08 14:21:09 +00:00
André Bargull 81264e1d84 Bug 1799490 - Part 1: Inline Map.prototype.size and Set.prototype.size in CacheIR. r=iain
Inline both getters in CacheIR.

Differential Revision: https://phabricator.services.mozilla.com/D161488
2022-11-08 14:21:09 +00:00
André Bargull d6c3dcb463 Bug 1799467 - Part 4: Share code for emitFunCallGuard and emitFunApplyGuard. r=jandem
`emitFunCallGuard()` and `emitFunApplyGuard()` are basically identical, ignoring
assertions and comments. Add a shared helper method to further reduce code duplication.

Differential Revision: https://phabricator.services.mozilla.com/D161469
2022-11-08 14:20:58 +00:00
André Bargull 252ee73759 Bug 1799467 - Part 3: Replace emitNativeCalleeGuardAndLoadArgsArray. r=jandem
Now that `emitNativeCalleeGuard()` also needs to handle `js::fun_apply`, it makes
sense to merge `emitNativeCalleeGuard()` and `emitNativeCalleeGuardAndLoadArgsArray()`
to reduce code duplication.

Also reorder the checks, so that the most common case `CallFlags::Standard` is
handled first.

Differential Revision: https://phabricator.services.mozilla.com/D161468
2022-11-08 14:20:57 +00:00
André Bargull 4db6fefb96 Bug 1799467 - Part 2: Inline natives when FunApply is called with one argument. r=jandem
Also support inlinable natives for FunApply when called with less than two
arguments. Similar to FunCall, don't yet support the case when called with
zero arguments.

Differential Revision: https://phabricator.services.mozilla.com/D161467
2022-11-08 14:20:57 +00:00
André Bargull 3db2ab25c5 Bug 1799467 - Part 1: Inline FunApply with less than two arguments. r=jandem
Inline `FunApply` when called with less than two arguments by handling it as
a `FunCall` call.

Differential Revision: https://phabricator.services.mozilla.com/D161466
2022-11-08 14:20:57 +00:00
Jan de Mooij 7d52885c10 Bug 1799628 - Cache most recent lookups in StringToAtomCache. r=jonco
`js::AtomizeString` is pretty hot and caching the most recent lookups helps avoid
slower hash table lookups in 30-65% of cases (> 60% on Speedometer 2).

Differential Revision: https://phabricator.services.mozilla.com/D161571
2022-11-08 13:56:53 +00:00
Mike Hommey d0b072eaa2 Bug 1798865 - Use the right llvm-symbolizer on spidermonkey builds. r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D161206
2022-11-08 08:16:22 +00:00
Cosmin Sabou 4d88a72636 Backed out 2 changesets (bug 1798865) for causing spidermonkey exceptions.
Backed out changeset e14f128a212e (bug 1798865)
Backed out changeset 70a4325293f5 (bug 1798865)
2022-11-08 07:15:14 +02:00
Ryan Hunt 11b5fc3207 Bug 1799285 - wasm: Add missing ifdef. r=yury
Differential Revision: https://phabricator.services.mozilla.com/D161465
2022-11-08 01:29:04 +00:00
Paul Bone 876e44596b Bug 1760920 - pt 13. Count all the JS memory for web workers r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D150391
2022-11-07 22:36:40 +00:00
Paul Bone a5bbf4a831 Bug 1760920 - pt 9. Don't count shared memory more than once r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D146678
2022-11-07 22:36:38 +00:00
Paul Bone 4a20204e4e Bug 1760920 - pt 8. Query memory per zone r=jonco
Since the caller usually needs to know the zone anyway, this seems simpler
if we query based on the zone rather than the object.

Differential Revision: https://phabricator.services.mozilla.com/D146677
2022-11-07 22:36:38 +00:00
Paul Bone 5f5c01cd8b Bug 1760920 - pt 5. Include memory usage from JS's malloc and JIT usage r=jonco,nika
Differential Revision: https://phabricator.services.mozilla.com/D141075
2022-11-07 22:36:37 +00:00
Paul Bone 87f5de6094 Bug 1760920 - pt 2a. Provide GetGCHeapUsage r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D158626
2022-11-07 22:36:35 +00:00
Mike Hommey 349711b16d Bug 1798865 - Use the right llvm-symbolizer on spidermonkey builds. r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D161206
2022-11-07 22:19:43 +00:00
Christian Holler 4b83339fc2 Bug 1794784 - Add code for differential testing with Fuzzilli. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D159151
2022-11-07 17:10:26 +00:00
Jon Coppeard f15a4185f4 Bug 1799446 - Don't use atomic update operations when updating the mark bitmap r=jandem
The Atomic class supports operations such as |&=| that perform atomic updates
on shared memory that are correct when performed concurrently with other such
updates. This is unnecessary for the mark bitmap and results in sub-optimal
code generation.

Instead, updates can be done with separate read and write operations.

Differential Revision: https://phabricator.services.mozilla.com/D161473
2022-11-07 16:17:49 +00:00
Jan de Mooij 02bbdeee03 Bug 1799100 part 2 - Optimize string concat with null/undefined in CacheIR. r=iain
Speedometer 2 has both of these cases.

Depends on D161255

Differential Revision: https://phabricator.services.mozilla.com/D161256
2022-11-05 15:43:39 +00:00
Jan de Mooij 874e5aa389 Bug 1799100 part 1 - Move number/boolean handling into tryAttachStringConcat. r=iain
This is a bit simpler and makes it easier to support additional types in the next patch.

Differential Revision: https://phabricator.services.mozilla.com/D161255
2022-11-05 15:43:39 +00:00
Nicolas B. Pierron 873d4e5179 Bug 1797038 - Skip getOffsetsCoverage if disabled. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D160657
2022-11-04 17:21:23 +00:00
Yulia Startsev d2fa4ee51a Bug 1798667 - clear cache when finished with service worker scripts; r=asuth
I was over eager in introducing the strong pointers to WorkerLoadContext. It turns out that
previously when we were cycle collecting our ScriptLoadRequests, we were also cleaning up everything
related to WorkerLoadContext. Also, in an attempt to fix the cancellation for workers, We
accidentally stopped cleaning up the reference to the cache creator. This patch does the following:

1) cleans up the cache creator reference whenever we finish with a cache load handler. This is done
by calling Fail appropriately. This solves both bug 1798667 (we no longer reach NEW_URI if we fail)
and 1781295 (we no longer leak memory because things were not cleaned up properly).
2) Does no remove the back reference to WorkerLoadContext from the LoadRequest. It turns out that
this is sometimes necessary. There is a chance that we will accidently try to access the
WorkerLoadContext after cancellation. This actually causes problems later on in the module code.

Differential Revision: https://phabricator.services.mozilla.com/D161288
2022-11-04 15:04:27 +00:00