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

77378 Коммитов

Автор SHA1 Сообщение Дата
Dmitry Bezhetskov 222f54b724 Bug 1639153 - Refactor wasm::Frame to reduce number of gnarly casts. r=lth,wingo
Differential Revision: https://phabricator.services.mozilla.com/D79072
2020-06-16 09:26:20 +00:00
Andy Wingo ef7070f255 Bug 1645820 - Mark MWasmStackResult as being a call result capture r=lth
Flag was missing, as MWasmStackResult doesn't inherit from
MWasmResultBase.

Depends on D79698

Differential Revision: https://phabricator.services.mozilla.com/D79699
2020-06-16 03:11:04 +00:00
Andy Wingo f39c6a22f7 Bug 1645819 - Fix Ion spew for WebAssembly functions r=lth
CompileInfo::script_ is null for wasm, so avoid calling info.filename()
/ info.line() in that case.

Example backtrace:

  js::BaseScript::sourceObject (this=0x0)
  js::BaseScript::scriptSource (this=0x0)
  js::BaseScript::filename (this=0x0)
  js::jit::CompileInfo::filename (this=0x7ffec6422618)
  js::jit::DumpMIRExpressions

Differential Revision: https://phabricator.services.mozilla.com/D79698
2020-06-16 03:08:54 +00:00
Lars T Hansen b06363cce6 Bug 1643653 - document the logic of wasm compiler and feature availability. r=bbouvier
High-level documentation for how compiler and feature selection are
used to compute compiler and feature availability.

Differential Revision: https://phabricator.services.mozilla.com/D78485
2020-06-16 03:33:36 +00:00
Andrew McCreight 208d20a42e Bug 1645908 - Eliminate gratuitous use of dom::danger::GetJSContext() in ForceShrinkingGC(). r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D79756
2020-06-15 22:37:10 +00:00
Jason Orendorff 0c81b8bfee Bug 1599769 - Part 2: Update test262 tests. r=jwalden
The previous changeset made a change to test262-update.py. This changeset is
the result of running the script, like this:

    cd js/src/tests
    python test262-update.py --revision 4a8e49b3ca7f9f74a4cafe6621ff9ba548ccc353

The revision is taken from the first line of js/src/tests/test262/GIT-INFO; the
purpose of specifying that revision is to run the script again using the same
input, so that the output reflects only changes to the script itself, not new
tests.

Differential Revision: https://phabricator.services.mozilla.com/D76394
2020-06-15 16:56:58 +00:00
Jason Orendorff 033a5e6ba7 Bug 1599769 - Part 1: Ship Promise.any. r=jwalden.
Differential Revision: https://phabricator.services.mozilla.com/D76393
2020-06-15 21:57:04 +00:00
Jason Orendorff be9fb07ce4 Bug 1634847 - Handle creating a new generator Debugger.Frame from onPop. r=jwalden.
Differential Revision: https://phabricator.services.mozilla.com/D76392
2020-06-15 16:56:56 +00:00
Ted Campbell 4206392a0b Bug 1644536 - Avoid setting lazy function TI type during XDR. r=mgaudet
Similar to previous patch, this info is not set on functions with lazy
enclosing functions. Also, inline FunctionBox::setTypeForExposedFunctions
into its only caller.

Differential Revision: https://phabricator.services.mozilla.com/D79283
2020-06-11 23:03:47 +00:00
Ted Campbell ef55ed47f6 Bug 1644536 - Cleanup FieldInitializers initialization. r=mgaudet
FieldInitializers is only defined for functions that have a compiled
enclosing script. We should avoid setting the value when it is not defined.
Update initFromLazyFunction so that fieldInitializers are only read for the
function being delazified. Fix XDR to not track fieldInitializers for lazy
functions with lazy parent functions by checking for exisitance of an
enclosingScope.

Also ensure fieldInitializers are set correctly when cloning scripts. In
practice, we delazify entire script tree before cloning but this is a footgun
none the less.

Differential Revision: https://phabricator.services.mozilla.com/D79282
2020-06-15 19:48:28 +00:00
Tooru Fujisawa 7bd58fade8 Bug 1644698 - Part 3: Add COption enum for binding. r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D79444
2020-06-15 15:47:36 +00:00
Tooru Fujisawa 7b9c3ab659 Bug 1644698 - Part 2: Directly use enum in SmooshMonkey binding. r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D79443
2020-06-15 15:47:29 +00:00
Tooru Fujisawa 5fb5aaefae Bug 1644698 - Part 1: Update ScriptStencil structs. r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D79442
2020-06-15 15:47:21 +00:00
Narcis Beleuzu fbae0b49f9 Backed out 3 changesets (bug 1634847, bug 1599769) for mochitest failures on test_xrayToJS.xhtml . CLOSED TREE
Backed out changeset 249e60b52fb4 (bug 1599769)
Backed out changeset c3c837a5bf38 (bug 1599769)
Backed out changeset c958e2551f1c (bug 1634847)
2020-06-15 19:50:59 +03:00
Ted Campbell 39f9f2904b Bug 1643750 - Optimize Object.prototype.toString for primitives. r=jandem
While this is a bit silly, the code does come up in the wild. We avoid
allocating objects for primitives we can can show that the global prototypes
were not tampered with.

Differential Revision: https://phabricator.services.mozilla.com/D78561
2020-06-09 08:48:04 +00:00
Tooru Fujisawa 96ce1d37a1 Bug 1645792 - Mark non262/String/normalize-generateddata-part* slow in SM(smoosh) debug job. r=yulia
Differential Revision: https://phabricator.services.mozilla.com/D79696
2020-06-15 15:17:04 +00:00
Iain Ireland ecc38d5db8 Bug 1643693: Fix unified build issue on win32 r=mgaudet
After landing a patch to reorganize the directory structure of our irregexp import, one particular testcase (`regexp/huge-02.js`) started failing on Windows 32-bit. It turns out to be a unified build problem: moving around files caused the unified chunks to be allocated slightly differently. After some experimentation, I determined that pulling `regexp-compiler.cc` out of the unified build made the problem go away. It looks like it does not play nicely with `regexp-compiler-tonode.cc`. I don't have easy access to a win32 machine to dig deeper, so I'm landing the easy patch. If there's a real underlying issue, we can fix it when it shows up on a platform that's easier to debug.

Differential Revision: https://phabricator.services.mozilla.com/D79692
2020-06-15 15:13:46 +00:00
Jason Orendorff 8d0a7ddf90 Bug 1599769 - Part 2: Update test262 tests. r=jwalden
The previous changeset made a change to test262-update.py. This changeset is
the result of running the script, like this:

    cd js/src/tests
    python test262-update.py --revision 4a8e49b3ca7f9f74a4cafe6621ff9ba548ccc353

The revision is taken from the first line of js/src/tests/test262/GIT-INFO; the
purpose of specifying that revision is to run the script again using the same
input, so that the output reflects only changes to the script itself, not new
tests.

Differential Revision: https://phabricator.services.mozilla.com/D76394
2020-06-15 15:12:51 +00:00
Jason Orendorff 8296b1ab7a Bug 1599769 - Part 1: Ship Promise.any. r=jwalden.
Differential Revision: https://phabricator.services.mozilla.com/D76393
2020-06-15 15:12:18 +00:00
Jason Orendorff 0c00e39b6c Bug 1634847 - Handle creating a new generator Debugger.Frame from onPop. r=jwalden.
Differential Revision: https://phabricator.services.mozilla.com/D76392
2020-06-15 14:49:04 +00:00
Ted Campbell 5f98fae13b Bug 1645469 - Add profiler subcategories for SpiderMonkey JITs. r=jandem,gerald
In the JIT frame sampler, we apply the appropriate category in addition to
the "implementation" field. For JS frames (IS_JS_FRAME), we identify as
either BaselineInterpreter or Interpreter. Note that JS_Other still applies
to various places we enter SpiderMonkey outside of RunScript.

Differential Revision: https://phabricator.services.mozilla.com/D79524
2020-06-15 14:56:50 +00:00
Ted Campbell 6aa5132146 Bug 1645464 - Use a shared ProfilingCategoryList.h r=gerald,froydnj
Replace the duplicate lists in mozglue/baseprofiler/public and js/public with
a shared list. Add this list to both moz.build files so it is published twice
which simplifies supporting different standalone configurations.

Differential Revision: https://phabricator.services.mozilla.com/D79520
2020-06-15 13:59:55 +00:00
Logan Smyth c501acace7 Bug 1644699 - Allow Debugger.Frame to have GeneratorInfo that is closed. r=arai
The GeneratorInfo data associated with a Debugger.Frame is not guaranteed
to be cleared when a generator transitions from running/suspended to closed.
In the current codebase, we have broadly assumed that to be true, which was
incorrect of us to do.

This patch separates "hasGeneratorInfo" from "isSuspended" so that the two
usecases can be properly separated. This both fixes this bug, and helps make
the codebase clearer about its intent.

Differential Revision: https://phabricator.services.mozilla.com/D79603
2020-06-15 14:26:35 +00:00
Lars T Hansen 43ce9d6692 Bug 1644424 - Report triggering of SIMD constant folding. r=jseward
Inserts logging (active in DEBUG builds) and adds test cases that check that
the constant folding is triggered in at least trivial cases, cf other
test cases in the same test file.

Differential Revision: https://phabricator.services.mozilla.com/D78928
2020-06-15 13:53:18 +00:00
Lars T Hansen 07c9a86a6f Bug 1644424 - Constant fold wasm SIMD reductions. r=jseward
In general, we should do constant folding as other optimizations may result
in constants to fold.  In addition, emcc has been observed not to fold
SIMD constants in all desirable cases.

Differential Revision: https://phabricator.services.mozilla.com/D78899
2020-06-15 13:54:41 +00:00
Narcis Beleuzu 6ca356eaa1 Backed out 3 changesets (bug 1644698) for SM bustages on Frontend2.cpp . CLOSED TREE
Backed out changeset d8d0019c6b12 (bug 1644698)
Backed out changeset 850620917220 (bug 1644698)
Backed out changeset 598d8412531e (bug 1644698)
2020-06-15 17:11:45 +03:00
Tooru Fujisawa 65ff96d3dc Bug 1644698 - Part 3: Add COption enum for binding. r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D79444
2020-06-15 13:07:22 +00:00
Tooru Fujisawa 8b9a1bbe69 Bug 1644698 - Part 2: Directly use enum in SmooshMonkey binding. r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D79443
2020-06-15 13:07:14 +00:00
Tooru Fujisawa b37c8473aa Bug 1644698 - Part 1: Update ScriptStencil structs. r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D79442
2020-06-15 13:07:07 +00:00
Jason Orendorff 87b8f09585 Bug 1641355 - Change AggregateError.errors to a data property on instances. r=tcampbell,peterv.
The changes in xpconnect are necessary because this is not being specified in
the usual way, with a getter. Ordinary data properties require an explicit
loophole to make them visible through X-ray wrappers.

Differential Revision: https://phabricator.services.mozilla.com/D77181
2020-06-11 14:57:00 +00:00
Benjamin Bouvier fbbed3d9e4 Bug 1645336: Cranelift: don't paste function's body if there's none; r=cfallin
This solves a remaining failure in wasm/spec/spec/left-to-right.wast.js, where
the whole function's body is optimized away.

Differential Revision: https://phabricator.services.mozilla.com/D79439
2020-06-15 10:10:04 +00:00
Benjamin Bouvier 96a6d1d1bf Bug 1645336: Cranelift: use the resumable_trapnz instruction for interrupt checks; r=cfallin
Using the trapnz instruction was incorrect, because traps can't be resumed in
theory, so the previous x86 backend was only working because it would not
remove the jump after this trap instruction. Make it more correct by not lying
to Cranelift and use a conditional resumable trap instead.

Will need a Cranelift bump as well.

Differential Revision: https://phabricator.services.mozilla.com/D79438
2020-06-15 10:10:53 +00:00
Benjamin Bouvier 23b40c5736 Bug 1645336: Bump Cranelift to 238ae3bf2111847f60089656eb97fc9345295b1f; r=jseward
Differential Revision: https://phabricator.services.mozilla.com/D79659
2020-06-15 10:16:20 +00:00
Lars T Hansen 070a7af22c Bug 1644759 - Add ToJSValue_v128. r=rhunt
While JS can't observe v128 values, the debugger API can, so
implement a case in ToJSValue for this.  Other guards will
ensure that these values (which are somewhat wrong) are not
seen by JS.

Differential Revision: https://phabricator.services.mozilla.com/D79261
2020-06-15 07:10:36 +00:00
Noemi Erli e73a8dbb70 Backed out changeset df0d6b993ad6 (bug 1642121) for causing build bustages 2020-06-15 06:44:42 +03:00
Steve Fink 7fc47d901c Bug 1642121 - Remove directory dependence of GDB init files. r=nalexander
I wrote this patch to address two problems:

  1. if I do `mach run` from a directory other than $topsrcdir, $objdir, or
     $objdir/dist/bin, then .gdbinit will not be loaded.
  2. Debugging the firefox binary will never load the JS prettyprinters in any
     case.

I believe this patch fixes other problems as well, such as .gdbinit_python not being found, and the gdbpp pretty-printers not getting loaded in various situations.

The main changes of this patch are:

  1. Move .gdbinit into build/ (and $objdir/build/) to delay it from getting
     loaded until the search path is configured.
  2. Move libxul.so-gdb.py into the correct directory.
  3. Use either libxul.so-gdb.py or js-gdb.py to configure the correct
     search path then load .gdbinit, and have .gdbinit load all of the
     pretty-printers (Gecko and JS).
  4. Use a single preprocessed file to configure the source directory. Use
     relative paths within the objdir for everything else.

Differential Revision: https://phabricator.services.mozilla.com/D77589
2020-06-15 03:27:49 +00:00
Tom Schuster 9ae2e482aa Bug 1644878 - Don't define Map/Set identical iterator methods in self-hosted JS. r=arai
I think we were defining those methods in self-hosted JS, because that automatically gives
us the property that they all have the same identity. This causes bad error messages.
Instead redefine them in the finishInit ClassSpec hook. We still have the "wrong" methods
in the 'methods' array so that JSXray tests continue to pass.

Differential Revision: https://phabricator.services.mozilla.com/D79615
2020-06-14 18:59:08 +00:00
Jon Coppeard e05acc89b8 Bug 1644985 - Clean up WeakRef and FinalizationRegistry data when cross compartment wrappers are nuked r=sfink
This crash happens because we try and clean up the map from target to WeakRef in the WeakRef finalizer, and the target can be dead by this point if it's a nuked CCW (before it is nuked the CCW ensures this sweep order does not happen).

The fix is to fix up the map when CCWs to WeakRefs are nuked. Fortunately there's already a hook where the GC is told about this.

The same issue applies to FinalizationRecordObjects. This fix is slightly different because they don't have a target pointer so we can't find the map entry. Instead we clear the record and cleanup happens later when it gets swept.

Differential Revision: https://phabricator.services.mozilla.com/D79533
2020-06-13 23:05:15 +00:00
Logan Smyth 25d491b792 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 effect 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-14 02:41:45 +00:00
Steve Fink 7c46c9c1a3 Bug 1633625 - Implement a Find50Sequencer that searches for the garbagePerFrame resulting in 50% frame drop at 60fps r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D75444
2020-06-13 22:56:16 +00:00
caroline 8fc617e678 Bug 1640284 - CacheIR health report. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D77958
2020-06-12 20:43:33 +00:00
Tom Schuster 382dd5cc4c Bug 1645515 - Tiny getTemplateObjectForScripted cleanup. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D79557
2020-06-12 21:26:45 +00:00
M. Sirringhaus 97e194bc86 Bug 1644412 - Deactivate peephole optimization on big endian. r=iain
Peephole optimizations are not supported by upstream on big endian and deactivated there as well.
Fixes segfault on startup on s390x.

Differential Revision: https://phabricator.services.mozilla.com/D79039
2020-06-10 12:49:18 +00:00
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