Commit Graph

77335 Commits

Author SHA1 Message Date
André Bargull
4bea13babe Bug 1413504: Support all possible non-algorithmic numbering systems. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D78028
2020-06-12 16:04:16 +00:00
Paul Adenot
bdfef650d8 Bug 1626918 - Add categories for real-time media tracing. r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D78509
2020-06-12 13:13:53 +00:00
André Bargull
3a33d76bdf Bug 1642934: Automatically determine current CLDR version when updating langtags. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D78021
2020-06-12 11:19:50 +00:00
André Bargull
d5559a3bc2 Bug 1636984 - Part 3: Update test case. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D74683
2020-06-12 13:12:29 +00:00
Tooru Fujisawa
48d16d133b Bug 1642268 - Check deprecated octal literal when entering strict mode after ASI. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D77672
2020-06-12 07:41:37 +00:00
Lars T Hansen
a351f9ad56 Bug 1644554 - Block V128 in the Jit ABI r=bbouvier
See bug for further description.

Differential Revision: https://phabricator.services.mozilla.com/D79415
2020-06-12 08:58:57 +00:00
Jon Coppeard
acbcfd9cde Bug 1645113 - Don't sweep arenas that were allocated during marking asa they cannot contain any dead cells r=sfink
The patch adds areanas allocated during marking into a separate set of arenas lists, which are not swept but are merged back into the main arena lists at the end of sweeping.

We do need to do some sweeping for newly allocated arenas on account of type inference data. I haven't looked too hard into why this is.

Differential Revision: https://phabricator.services.mozilla.com/D79334
2020-06-12 08:03:39 +00:00
Jan de Mooij
08937da9d2 Bug 1644472 part 4 - Optimize RegExpPrototypeOptimizable and RegExpInstanceOptimizable intrinsics. r=iain
These just do a Shape guard against a Shape stored in the Realm. If the guard
fails we do a callWithABI to a function that updates the shape.

Differential Revision: https://phabricator.services.mozilla.com/D79265
2020-06-12 06:10:39 +00:00
Jan de Mooij
9057ebf0b9 Bug 1644472 part 3 - Optimize SubstringKernel intrinsic in CacheIR and Warp. r=evilpie
Differential Revision: https://phabricator.services.mozilla.com/D79263
2020-06-12 06:10:16 +00:00
Noemi Erli
279f3b6a42 Backed out changeset 550164313c4f (bug 1601179) for causing failures in test_async CLOSED TREE 2020-06-12 08:16:14 +03:00
Logan Smyth
7f4a5aeed0 Bug 1601179 - Enable async stacks but limit captured async stacks to debuggees. r=jorendorff,smaug
The 'asyncStack' flag on JS execution contexts is used as a general switch
to enable async stack capture across all locations in SpiderMonkey, but
this causes problems because it can at times be too much of a performance
burden to general and track all of these stacks.

Since the introduction of this option, we have only enabled it on Nightly
and DevEdition for non-mobile builds, which has left a lot of users unable
to take advantage of this data while debugging.

This patch enables async stack traces across all of Firefox, but introduces
a new pref to toggle the scope of the actual expensive part of async stacks,
which is _capturing_ them and keeping them alive in memory. The new pref
limits the capturing of async stack traces to only debuggees, unless an
explicit pref is flipped to capture async traces for all cases.

This means that while async stacks are technically enabled, and code could
manually capture a stack and pass it back to SpiderMonkey and see that stack
reflected in later captured stacks, SpiderMonkey itself and related async
DOM APIs, among others, will not capture stacks or pass them to SpiderMonkey,
so there should be no general change in performance by enabling the broader
feature itself, unless the user is actively debugging the page.

One affect of this patch is that if you have the debugger open and then close
it, objects that have async stacks associated with them will retain those
stacks and they will continue to show up in stack traces, no _new_ stacks
will be captured. jorendorff and I have decided that this is okay because
the expectation that the debugger fully revert every possible effect that it
could have on a page is a nice goal but not a strict requirement.

Differential Revision: https://phabricator.services.mozilla.com/D68503
2020-06-11 21:24:16 +00:00
Thinker Li
002d9a1c56 Bug 1568923 - String deduplication during tenuring.
This patch bases on the work of krystalyang2 with minor bug fixes.
The patch includes several major parts,

 1. mark nursery strings pointed by tenured strings as
    non-deduplicatable,

 2. deduplicate strings when they are moved to tenured from nursery, and

 3. adjust dependent strings to correct their pointers to the base
    string and external buffer after tenuring.

 4. reorder store buffer processing to trace the string whole cell buffer
    first, since strings traced through the whole cell buffer need to be marked
    non-deduplicatable.

(Part 4 was originally phabricator D77715 but is now merged in here.)

Differential Revision: https://phabricator.services.mozilla.com/D74366
2020-06-11 23:16:53 +00:00
Chris Fallin
ab48c556f6 Bug 1641504: Wasm multi-value support using Cranelift backend. r=jseward
This is an adaptation of @bbouvier's patch D77228, updated to avoid
passing wasmparser types across the API boundary between SpiderMonkey
and Cranelift.

Co-authored-by: Benjamin Bouvier <benj@benj.me>

Differential Revision: https://phabricator.services.mozilla.com/D78589
2020-06-11 23:34:55 +00:00
Chris Fallin
c05b576548 Bug 1641504: Adapt to Cranelift API changes. r=bbouvier
This is an updated version of Ben Bouvier's patch D77227.

Co-authored-by: Benjamin Bouvier <benj@benj.me>

Differential Revision: https://phabricator.services.mozilla.com/D78588
2020-06-11 23:34:48 +00:00
Chris Fallin
771d76eb57 Bug 1641504: Bump Cranelift to 4d5fdfcbba1a8f38002a4223d7a329fc795d0e9f. r=bbouvier
Differential Revision: https://phabricator.services.mozilla.com/D78587
2020-06-11 23:34:39 +00:00
Logan Smyth
1c7d166f5d Bug 1640034 - Ensure that we don't bail when we need the parent frame created. r=jorendorff
The inline comment explains most of this, but essentially because we bail out
of the FrameIter loop early when we find an asyncStack, we can end up with
cases where the a Debugger eval's parent frame either hasn't been populated in
the LiveSavedFrameCache at all, or else _has_ been, but is not instantiated
in the correct realm.

This patch avoids that by no longer bailing when asyncStacks are found, and
instead traversing the whole stack still to make sure that the invariants
for the LiveSavedFrameCache are preserved properly.

Differential Revision: https://phabricator.services.mozilla.com/D76426
2020-06-11 21:43:03 +00:00
Logan Smyth
cd05afc9c1 Bug 1505387 - Consistently use a FrameIter to produce consistent cache pointers. r=jorendorff
This bug is caused because creating a LiveSavedFrameCache::FramePtr from a
FrameIter special-cases RematerializedFrames that are also PhysicalJitFrames.
This creates a FramePtr for a CommonFrameLayout, which is reasonable, but it
conflicts with the fact that ExecuteKernel is only passed an AbstractFramePtr
which means that when we go to compare the two FramePtr values, one is a
RematerializedFrame and one is a CommonFrameLayout even though they both
refer to the same frame.

This patch uses the FrameIter construction method for all FramePtr instances
so we avoid this two-constructor approach and can be more easily sure that
all code paths can properly construct the same FramePtr.

Differential Revision: https://phabricator.services.mozilla.com/D76425
2020-06-11 21:22:50 +00:00
Tom Schuster
15d42f3ac8 Bug 1645163 - Warp: Transpile LoadUndefinedResult. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D79348
2020-06-11 20:46:07 +00:00
Razvan Maries
d641e64a5e Backed out 3 changesets (bug 1641504) for valgrind bustages. CLOSED TREE
Backed out changeset 95646dbd26a1 (bug 1641504)
Backed out changeset bf1919e75e65 (bug 1641504)
Backed out changeset dedeac296eaa (bug 1641504)
2020-06-11 23:56:02 +03:00
Jon Coppeard
16131c14f7 Bug 1641517 - Fix logic in ShouldIgnorePropertyDefinition to really ignore cleanupSome if it's not enabled r=sfink
Disabling toSource also disabled checking for whether to ignore cleanupSome.

Differential Revision: https://phabricator.services.mozilla.com/D79298
2020-06-11 18:02:39 +00:00
Chris Fallin
2be22edf82 Bug 1641504: Wasm multi-value support using Cranelift backend. r=jseward
This is an adaptation of @bbouvier's patch D77228, updated to avoid
passing wasmparser types across the API boundary between SpiderMonkey
and Cranelift.

Co-authored-by: Benjamin Bouvier <benj@benj.me>

Differential Revision: https://phabricator.services.mozilla.com/D78589
2020-06-11 17:52:41 +00:00
Chris Fallin
70f7e999b3 Bug 1641504: Adapt to Cranelift API changes. r=bbouvier
This is an updated version of Ben Bouvier's patch D77227.

Co-authored-by: Benjamin Bouvier <benj@benj.me>

Differential Revision: https://phabricator.services.mozilla.com/D78588
2020-06-09 22:37:16 +00:00
Chris Fallin
6944be383a Bug 1641504: Bump Cranelift to e3d89c8a92a5fadedd75359b8485d23ac45ecf29. r=bbouvier
Differential Revision: https://phabricator.services.mozilla.com/D78587
2020-06-09 22:37:06 +00:00
Jan de Mooij
8d8c0b77eb Bug 1644472 part 2 - Optimize RegExpMatcher, RegExpSearcher, RegExpTester intrinsics in CacheIR and Warp. r=iain
The CacheIR code is just a VM call that's slightly faster than the CallNative path.
The main benefit is that this lets Warp use the optimized regexp stubs.

At some point it would be nice to call the same code stubs from CacheIR.

Differential Revision: https://phabricator.services.mozilla.com/D79041
2020-06-11 16:51:22 +00:00
Jan de Mooij
9f2f76ec99 Bug 1644472 part 1 - Optimize IsRegExpObject intrinsic in CacheIR and Warp. r=evilpie
I tried to keep this generic in case we add a similar function for another Class
in the future.

Differential Revision: https://phabricator.services.mozilla.com/D79040
2020-06-11 16:51:02 +00:00
Steve Fink
ab589a1668 Bug 1644243 - Add a newString testing function for creating various types of JSString r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D78817
2020-06-11 18:15:25 +00:00
Steve Fink
751343a79e Bug 1644243 - Allocate strings in the tenured heap if they will be atomized right after, and pass through InitialHeap to string allocation r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D78806
2020-06-11 18:15:02 +00:00
Tom Schuster
45b05999ea Bug 1645018 - Self-host String.prototype.concat. r=anba
Differential Revision: https://phabricator.services.mozilla.com/D79281
2020-06-11 13:31:58 +00:00
Jon Coppeard
e7f8b22db2 Bug 1644763 - Enable weak references by default in the JS shell r=sfink
This negates the existing option and removes references to the original option from the tests.

Differential Revision: https://phabricator.services.mozilla.com/D79146
2020-06-11 14:40:15 +00:00
André Bargull
7eccf8abfa Bug 1630706 - Part 4: Add tests and update existing ones. r=jorendorff
Update existing tests to run with `SharedArrayBuffer` and `ArrayBuffer`.

Also add new tests for cases which weren't previously possible (detached
buffers and TypedArrays using inline storage).

Differential Revision: https://phabricator.services.mozilla.com/D76322
2020-06-11 13:12:59 +00:00
André Bargull
c568211dbc Bug 1630706 - Part 3: Remove no longer used MGuardSharedTypedArray. r=jandem
After part 2 this MIR node is no longer used.

Differential Revision: https://phabricator.services.mozilla.com/D76321
2020-06-11 12:22:35 +00:00
André Bargull
2e3b927629 Bug 1630706 - Part 2: Remove addSharedTypedArrayGuard when inlining Atomics operations. r=jandem
We no longer need to guard against non-shared TypedArrays when inlining
`Atomics` functions.

The `MemoryBarrierRequirement` changes for `M(Load|Store)UnboxedScalar` were
made to keep at least some users for `TypedArraySharedness`. In practice this
code won't be used anyway, because `TemporaryTypeSet::getTypedArraySharedness`
always returns `UnknownSharedness`. Also see bug 1225025.

Differential Revision: https://phabricator.services.mozilla.com/D76320
2020-06-11 12:22:01 +00:00
André Bargull
2016a738e1 Bug 1630706 - Part 1: Allow non-shared ArrayBuffers for Atomics operations. r=jorendorff
The TypedArray data extraction had to be moved from `AtomicAccess` into the
actual operation to account for the case when a TypedArray using inline data
is moved by the GC due to side-effects triggered by type conversions within
the operation. Part 4 contains tests to cover this case.

Because the TypedArray data is no longer passed to the operation, we can't use
it anymore to determine the data type from the `SharedMem<T>` parameter. Instead
pass an `ArrayOps<T>` instance to the operation, so we can determine `T` within
the lambda function. (Templated lambda functions are only available starting
with C++20!) The compiler should be able to optimise away the stack allocation
for this instance, so this won't incur any performance costs.

Differential Revision: https://phabricator.services.mozilla.com/D76319
2020-06-11 12:21:36 +00:00
Ted Campbell
2ef5d835ba Bug 1599634 - Remove dummyFunction from asm.js. r=bbouvier,djvj
These days, FunctionBox can be created without a JSFunction which is also
suitable for the asm.js dummyFunction case. Remove the function and pass name
and flags directly to the FunctionBox.

We set flags to INTERPRETED_NORMAL since that is only type of function
allowed at this point in the asm.js context.

Differential Revision: https://phabricator.services.mozilla.com/D78802
2020-06-10 16:30:20 +00:00
Ted Campbell
75ed74c5c4 Bug 1599634 - Defer JSFunction allocation for asm.js modules r=djvj
Avoid allocating the JSFunction / WasmModuleObject for asm.js during parsing,
but continue to generate the JS::WasmModule (which does not use GC). Add a
map to the CompilationInfo to keep track of these modules until stencils are
being instantiated.

Differential Revision: https://phabricator.services.mozilla.com/D78089
2020-06-11 13:31:10 +00:00
Sylvestre Ledru
15ad7d1dcd Bug 1617369 - Reformat recent rust changes with rustfmt r=arai
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D79149
2020-06-11 09:14:41 +00:00
Jon Coppeard
925ac1a2d0 Bug 1644393 - Fix test case to work in beta/release builds r=sfink
This changes the test to be much more specific.

It adds a way of making gcslice only trigger a slice during an incremental collection, without which the collection loop can loop forever.

Differential Revision: https://phabricator.services.mozilla.com/D79136
2020-06-11 09:31:07 +00:00
Jan de Mooij
7ea610a449 Bug 1644425 part 2 - Optimize ToLength intrinsic in Ion/CacheIR/Warp. r=anba
For now this only optimizes the int32-argument case.

Depends on D78917

Differential Revision: https://phabricator.services.mozilla.com/D78918
2020-06-10 09:30:36 +00:00
Jan de Mooij
96041ddffc Bug 1644425 part 1 - Replace ToLength function in self-hosted code with an intrinsic. r=anba
This fixes a regression from bug 1643680 because the code relied on Math.min/max
with int32 and double arguments returning an int32 when possible. Porting this
to C++ should make this less brittle.

Differential Revision: https://phabricator.services.mozilla.com/D78917
2020-06-10 09:24:20 +00:00
Dmitry Bezhetskov
6fe78d055f Bug 1599722 - Address incoming stack args from FP in wasm stubs r=lth,wingo
We address incoming stack args via FP in Baseline and Ion now, so it's time for wasm stubs.

Differential Revision: https://phabricator.services.mozilla.com/D78472
2020-06-11 05:52:40 +00:00
Dmitry Bezhetskov
e8e88da594 Bug 1639153 - Remove using Frame::tls in Jit import exit stub r=lth,wingo
To completely remove Frame::tls we shouldn't use it in wasm stub.
So, in this patch we manually preserve WasmTlsReg in jit import exit stub and so remove using masm.loadWasmTlsRegFromFrame.

There are no any uses of WasmTlsReg in wasm stubs.

Only in masm.callABI but we are going to handle this later.

Differential Revision: https://phabricator.services.mozilla.com/D78223
2020-06-11 05:37:09 +00:00
Steve Fink
0f65ce3de2 Bug 1633625 - Eliminate events in favor of pushing start/end control down into sequencers. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D75443
2020-06-10 22:50:45 +00:00
Steve Fink
fb86663017 Bug 1633625 - Use mutator objects instead of names (minor refactor). r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D75440
2020-06-10 22:50:41 +00:00
Steve Fink
2d7ac57a73 Bug 1633625 - Replace LoadCycle sequencer with a more general ChainSequencer. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D75439
2020-06-10 22:50:36 +00:00
Steve Fink
790a2d3483 Bug 1633625 - Split out a sequencer object. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D75438
2020-06-10 22:50:31 +00:00
Steve Fink
0991575330 Bug 1633625 - Adjust garbagePerFrame to around 50% 60fps frame drops on my laptop r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D75437
2020-06-10 22:50:27 +00:00
Steve Fink
cfbeba0d6c Bug 1633625 - Implement --duration/-d command line option. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D75436
2020-06-10 22:50:22 +00:00
Ricky Stewart
a44e98af68 Bug 1644887 - configure calls into $PYTHON3 rather than python3 directly r=glandium
Especially after bug 1622963 landed, the system `python3` executable as reported by `which` may not be compatible with the build system (because it might be Python 3.5, for one). You can configure a custom `python3` executable by setting the `PYTHON3` environment variable, but `configure` just calls directly into `python3` regardless of whatever you might have configured `$PYTHON3` to be, so we fix that here.

Also remove an explanatory comment that may have made sense 5 years ago but is no longer relevant.

Differential Revision: https://phabricator.services.mozilla.com/D79187
2020-06-10 21:29:27 +00:00
Iain Ireland
5c8dcb2c0a Bug 1644590: Add fast path for atom regexps r=jandem
We fill in the match pairs for atom regexps using an ABI call, then use the normal jit path for everything else (checking for errors, allocating results, etc...).

I also made a drive-by fix to remove the cx argument from RegExpShared::executeAtom, since we don't need it.

Differential Revision: https://phabricator.services.mozilla.com/D79001
2020-06-10 15:11:45 +00:00
Matthew Gaudet
675b9c7a30 Bug 1640294 - Clarify UsedNameTracker comment and add worked example r=jorendorff DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D76554
2020-06-10 21:04:54 +00:00