Commit Graph

2828 Commits

Author SHA1 Message Date
Ted Campbell
5aa2fa2264 Bug 1575055 - Privatize js::CompileOptions::strictMode. r=jandem
We already have an accessor to make sure this is can only be set but not
cleared so hide the underlying storage.

Differential Revision: https://phabricator.services.mozilla.com/D42559

--HG--
extra : moz-landing-system : lando
2019-09-18 15:05:35 +00:00
Ted Campbell
f6f8dc5112 Bug 1575055 - Remove unused CompileOptions::setIntroductionScript. r=jandem
We should always use setIntroductionInfo instead.

Differential Revision: https://phabricator.services.mozilla.com/D46294

--HG--
extra : moz-landing-system : lando
2019-09-18 15:05:28 +00:00
Henri Sivonen
83795d9c41 Bug 1561567 - Introduce rope-walking conversion from JS strings to UTF-8 in a byte span. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D41941

--HG--
extra : moz-landing-system : lando
2019-09-18 08:28:24 +00:00
Jon Coppeard
185aa0ee73 Bug 1579202 - Type cell pointer store buffers to simplify implementation r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D44894

--HG--
extra : moz-landing-system : lando
2019-09-06 10:12:59 +00:00
Chris Fallin
52eacd2891 Bug 1575350: Move JSScript side-tables from Realm to Zone. r=tcampbell,jonco
Also closes bug 1576216: update ZoneStats and RealmStats memory
accounting for this change.

Differential Revision: https://phabricator.services.mozilla.com/D42977

--HG--
extra : moz-landing-system : lando
2019-08-29 22:28:20 +00:00
Will Hawkins
9e72ec1f8d Bug 1551313: Insert profiler markers when preferences are accessed. r=squib,gregtatum
Reviewers: squib, mstange, gregtatum

Reviewed By: squib, gregtatum

Subscribers: julienw, Fallen, reviewbot, mixedpuppy, mstange

Bug #: 1551313

Differential Revision: https://phabricator.services.mozilla.com/D39796

--HG--
extra : rebase_source : e7e0b41b2a4c6f7228f3d6c19ede1fe2e4e42343
extra : histedit_source : 55daf5b19e4f262f522339b5b00ee31130abbf1b
2019-08-23 13:12:51 +03:00
Brian Hackett
6f70f1e367 Bug 1572596 Part 1 - Add source URLs slot to global objects which is cleared on shrinking GC, r=jonco.
Differential Revision: https://phabricator.services.mozilla.com/D41682

--HG--
extra : moz-landing-system : lando
2019-08-22 00:07:41 +00:00
Jon Coppeard
266f4c6efb Bug 1575175 - Rename memory counter classes now they're used for both GC and malloc heaps r=sfink
This renames:
  HeapSize::gcBytes -> bytes (it's not just for GC heaps any more)
  ZoneThreshold -> HeapThreshold (to go with HeapSize)
  HeapThreshold::triggerBytes -> bytes (what else could it be?)

I renamed the ZoneAllocator members to make them more uniform/consitent so we now have gcHeapSize/gcHeapThreshold, mallocHeapSize/mallocHeapThreshold etc.

I also renamed the heap threshold classes.

Differential Revision: https://phabricator.services.mozilla.com/D42868

--HG--
extra : moz-landing-system : lando
2019-08-21 15:14:31 +00:00
Jon Coppeard
057ec26442 Bug 1575251 - Remove some unnecessary uses of shadow::Zone r=allstarschh
Differential Revision: https://phabricator.services.mozilla.com/D42667

--HG--
extra : moz-landing-system : lando
2019-08-20 18:52:58 +00:00
Jon Coppeard
45a3b432c0 Bug 1574098 - Remove unused defines from Class.h r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D42086

--HG--
extra : moz-landing-system : lando
2019-08-15 13:04:43 +00:00
Jon Coppeard
d4f47d27ad Bug 1573844 - Remove references to js::Class and remove the alias r=tcampbell
The final huge patch. This is a search-and-replace removal of js::Class followed by clang-format and removal of the alias from TypeDecls.h.

Depends on D41986

Differential Revision: https://phabricator.services.mozilla.com/D41987

--HG--
extra : moz-landing-system : lando
2019-08-14 19:13:12 +00:00
Jon Coppeard
41d076b49e Bug 1573844 - Remove js::Jsvalify and js::Valueify r=tcampbell
Depends on D41984

Differential Revision: https://phabricator.services.mozilla.com/D41985

--HG--
extra : moz-landing-system : lando
2019-08-14 17:18:54 +00:00
Jon Coppeard
66fc30ba53 Bug 1573844 - Remove js::Class definition and alias JSClass to it r=tcampbell,mccr8
JSClass contained void* members corresponding to the internal pointer members of js::Class. This stores the internal members in JSClass and removes js::Class.

This leaves js::Class aliased to JSClass while we remove references to it. I also aliased Jsvalify and Valueify into global scope temporarily to make this compile. These get removed in the following patches.

I had to remove a few functions which now don't compile with js::Class being the same type as JSClass.

Differential Revision: https://phabricator.services.mozilla.com/D41983

--HG--
extra : moz-landing-system : lando
2019-08-15 08:32:22 +00:00
Jon Coppeard
e22ceecec6 Bug 1573508 - Replace internal references to js::ClassOps with JSClassOps and remove the alias r=tcampbell
Another big patch. This a search-and-replace followed by mach clang-format, and removal of the js::ClassOps alias from Class.h.

Differential Revision: https://phabricator.services.mozilla.com/D41761

--HG--
extra : moz-landing-system : lando
2019-08-14 10:00:05 +00:00
Jon Coppeard
74f39034b7 Bug 1573508 - Remove js::ClassOps in favour of JSClassOps now these are the same r=tcampbell
This removes the original js::ClassOps but leaves it aliased to JSClassOps so everything compiles for now.

Differential Revision: https://phabricator.services.mozilla.com/D41759

--HG--
extra : moz-landing-system : lando
2019-08-13 23:36:55 +00:00
Andrew McCreight
be5f1ce737 Bug 1559489, part 2 - Split out the back half of RemapWrapper into a new method. r=tcampbell
I need it for the final patch.

Differential Revision: https://phabricator.services.mozilla.com/D38341

--HG--
extra : moz-landing-system : lando
2019-08-13 19:09:46 +00:00
Jon Coppeard
992d6b6ce5 Bug 1570905 - Rework the GC triggers to make the incremental trigger the default and the non-incremental trigger some factor of this r=sfink?
Differential Revision: https://phabricator.services.mozilla.com/D41606

--HG--
extra : moz-landing-system : lando
2019-08-13 08:40:36 +00:00
Jon Coppeard
8b73371be0 Bug 1407593 - Report embedding leaks of JS GC things r=sfink,sfink?
Patch to report JS GC things that are live at shutdown as leaks by calling MOZ_LOG_CTOR for them. The JS engine now clears any remaining roots to prevent dangling pointers to freed memory after shutdown. I made XPCJSRuntime::Shutdown keep the weak pointer update callbacks as sometimes these tables have entries remaining at shutdown (if there are leaks) and we need the callbacks to update them.

This is looking more green on try now.

Differential Revision: https://phabricator.services.mozilla.com/D40449

--HG--
extra : moz-landing-system : lando
2019-08-13 08:31:49 +00:00
André Bargull
268981bb20 Bug 1539780: Remove "--with-intl-api=build" build config option. r=jwalden
There are about the same number of occurrences of "ENABLE_INTL_API" and "EXPOSE_INTL_API"
in the tree, so preferring one over the other doesn't lead to fewer changes. Therefore
I went with "ENABLE_INTL_API", because "ENABLE_" (resp. "MOZ_ENABLE") is already used as
the prefix for other preprocessor ifdef's.

Differential Revision: https://phabricator.services.mozilla.com/D41188

--HG--
extra : moz-landing-system : lando
2019-08-09 19:43:19 +00:00
Jon Coppeard
d21beb7f9e Bug 1572782 - Remove unused js::FreeOp alias and remaining references r=tcampbell?
Differential Revision: https://phabricator.services.mozilla.com/D41413

--HG--
extra : moz-landing-system : lando
2019-08-12 12:35:11 +00:00
Jon Coppeard
6c416aec4d Bug 1572782 - Replace internal use of js::FreeOp with JSFreeOp r=tcampbell?
Sorry for the huge patch.  This is pretty much a search and replace of all uses of js::FreeOp.

Differential Revision: https://phabricator.services.mozilla.com/D41412

--HG--
extra : moz-landing-system : lando
2019-08-12 10:43:51 +00:00
Jon Coppeard
a00726d223 Bug 1572782 - Remove js::FreeOp and make JSFreeOp opaque in public API r=tcampbell?
Merge js::FreeOp and JSFreeOp, but alias the former to the latter while we fix uses.

Differential Revision: https://phabricator.services.mozilla.com/D41410

--HG--
extra : moz-landing-system : lando
2019-08-12 10:43:32 +00:00
Oana Pop Rus
44aafcc0d0 Backed out 4 changesets (bug 1572782) for build bustages at build/src/obj-firefox/dist/include/nsIXPCScriptable.h on a CLOSED TREE
Backed out changeset ec9d15c69bc8 (bug 1572782)
Backed out changeset 8239e4baa0f4 (bug 1572782)
Backed out changeset 9fd7bea2b512 (bug 1572782)
Backed out changeset 11d750555fe1 (bug 1572782)
2019-08-12 13:37:03 +03:00
Jon Coppeard
fa84e34044 Bug 1572782 - Remove unused js::FreeOp alias r=tcampbell?
Differential Revision: https://phabricator.services.mozilla.com/D41413

--HG--
extra : moz-landing-system : lando
2019-08-12 10:16:04 +00:00
Jon Coppeard
8186c345e2 Bug 1572782 - Replace internal use of js::FreeOp with JSFreeOp r=tcampbell?
Sorry for the huge patch.  This is pretty much a search and replace of all uses of js::FreeOp.

Differential Revision: https://phabricator.services.mozilla.com/D41412

--HG--
extra : moz-landing-system : lando
2019-08-12 10:16:02 +00:00
Jon Coppeard
9d51a35e93 Bug 1572782 - Remove js::FreeOp and make JSFreeOp opaque in public API r=tcampbell?
Merge js::FreeOp and JSFreeOp, but alias the former to the latter while we fix uses.

Differential Revision: https://phabricator.services.mozilla.com/D41410

--HG--
extra : moz-landing-system : lando
2019-08-12 10:15:57 +00:00
Steve Fink
e79384d24c Bug 1572207 - Update AutoStableStringChars comment, r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D41421

--HG--
extra : moz-landing-system : lando
2019-08-09 20:41:12 +00:00
Jon Coppeard
3fb04aa631 Bug 1571021 - Key wrapper maps by wrapped type directly and remove CrossCompartmentKey class r=jandem?
Differential Revision: https://phabricator.services.mozilla.com/D41184

--HG--
extra : moz-landing-system : lando
2019-08-09 10:05:45 +00:00
Yoshi Cheng-Hao Huang
a29edd5706 Bug 1570590 : trace weak references in tracing. r=jonco
Introduces SweepingTracer and TraceWeakEdge to trace weak references in
AtomsTable::sweep and AtomsTable::sweepIncrementally while sweeping.
Also rename those two functions to traceWeak and traceWeakIncrementally.

Differential Revision: https://phabricator.services.mozilla.com/D40939

--HG--
extra : moz-landing-system : lando
2019-08-08 12:27:50 +00:00
Andy Wingo
673d9945f5 Bug 1570886 - Remove enableBigInt run-time flag r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D40389

--HG--
extra : moz-landing-system : lando
2019-08-07 14:41:36 +00:00
Razvan Maries
2d23034c48 Backed out changeset 145b187e750f (bug 1570886) for perma xpcshell fails on test_objectgrips-08.js. CLOSED TREE 2019-08-06 20:12:16 +03:00
Andy Wingo
0f20ca98c4 Bug 1570886 - Remove enableBigInt run-time flag r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D40389

--HG--
extra : moz-landing-system : lando
2019-08-06 10:36:09 +00:00
Coroiu Cristina
37c688712e Backed out changeset 596ae187c20b (bug 1570886) for xpcshell failures at devtools/server/tests/unit/test_objectgrips-08.js on a CLOSED TREE 2019-08-06 12:47:50 +03:00
Andy Wingo
3f1bd1cb5a Bug 1570886 - Remove enableBigInt run-time flag r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D40389

--HG--
extra : moz-landing-system : lando
2019-08-05 13:00:28 +00:00
Andrew McCreight
6633271226 Bug 1570484 - Nuke Xray waivers for remote outer window proxies. r=bzbarsky,tcampbell,jonco
Remote outer window proxies can't be the target of a CCW, because if
you attempt to wrap them we just create a new outer window proxy.
Therefore, they can't be the target of an Xray wrapper, so they can't
have Xray waivers that do anything useful. However, if we do a
navigation from a local iframe to a remote iframe, we'll transplant a
remote outer window proxy onto a local outer window proxy, which might
have an Xray. This can cause some issues, particularly if we later
navigate back to a different local window.

To work around this, this patch nukes Xray waivers on navigation to a
remote outer window proxy. This makes Xray waiver behavior
inconsistent with the non-Fission behavior, but it is safer to leave
the non-Fission behavior alone for now, for fear of breaking addons.

Differential Revision: https://phabricator.services.mozilla.com/D40116

--HG--
extra : moz-landing-system : lando
2019-08-05 16:32:31 +00:00
Brindusan Cristian
2d3a2752f0 Backed out changeset 344a525cddbc (bug 1570484) for spidermonkey bustage at BaseProxyHandler.cpp:389:25. CLOSED TREE 2019-08-05 18:25:24 +03:00
Andrew McCreight
9dc3bbe1f0 Bug 1570484 - Nuke Xray waivers for remote outer window proxies. r=bzbarsky,tcampbell,jonco
Remote outer window proxies can't be the target of a CCW, because if
you attempt to wrap them we just create a new outer window proxy.
Therefore, they can't be the target of an Xray wrapper, so they can't
have Xray waivers that do anything useful. However, if we do a
navigation from a local iframe to a remote iframe, we'll transplant a
remote outer window proxy onto a local outer window proxy, which might
have an Xray. This can cause some issues, particularly if we later
navigate back to a different local window.

To work around this, this patch nukes Xray waivers on navigation to a
remote outer window proxy. This makes Xray waiver behavior
inconsistent with the non-Fission behavior, but it is safer to leave
the non-Fission behavior alone for now, for fear of breaking addons.

Differential Revision: https://phabricator.services.mozilla.com/D40116

--HG--
extra : moz-landing-system : lando
2019-08-05 14:55:43 +00:00
Paul Bone
f04afcd7ec Bug 1388701 - Remove the special nursery size of 0 r=jonco
Rather than make re-enabling the nursery work correctly (because there's
various ways to disable it and we'd need to make sure we're enabling it for
the right reason).  It's simplier just to not disable it for a
gcMaxNurseryBytes of 0, and instead return an error.

Differential Revision: https://phabricator.services.mozilla.com/D39988

--HG--
extra : moz-landing-system : lando
2019-08-05 06:37:55 +00:00
Tom Ritter
0b9efb84de Bug 1567623 - Add Event Telemetry for cases where eval is triggered as System Principal r=chutten,bzbarsky,tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D39559

--HG--
extra : moz-landing-system : lando
2019-08-01 20:45:31 +00:00
Jon Coppeard
2d89bbf3df Bug 1569564 - Remove the original malloc counter infrastructure r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D39735

--HG--
extra : moz-landing-system : lando
2019-07-31 09:13:36 +00:00
Jon Coppeard
9730094120 Bug 1569564 - Replace the JIT code counter using the new precise tracking infrastructure r=sfink
This replaces the original JIT code memory counter with one that tracks the allocated JIT code precisely.  This now uses a fixed threshold which was the original intention.

This also removes the INCREMENTAL_MALLOC_TRIGGER GC reason and all GCs triggered by malloc allocations use TOO_MUCH_MALLOC, so whether a GC is incremental is separated from the trigger reason.

Differential Revision: https://phabricator.services.mozilla.com/D39734

--HG--
extra : moz-landing-system : lando
2019-07-31 09:13:19 +00:00
Jon Coppeard
7826afea3a Bug 1569560 - Add tuning parameters for new malloc counter r=sfink
This adds two new parameters.  The growth fator is set to 1.5 and the base to 42MB.  Trail and error showed that this latter value ended up triggering GCs roughtly in line with the old malloc counter.  These values make the initial malloc threshold ~64MB.

Differential Revision: https://phabricator.services.mozilla.com/D39730

--HG--
extra : moz-landing-system : lando
2019-07-31 09:12:37 +00:00
Paul Bone
d1b58951a1 Bug 1569840 - Add a nurseryBytes runtime parameter r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D39836

--HG--
extra : moz-landing-system : lando
2019-07-31 00:34:15 +00:00
André Bargull
2684e5023e Bug 1433303 - Part 1: Implement Intl.Locale proposal. r=jwalden
Intl.Locale.m{ax,in}imize() are implemented in part 2.

Differential Revision: https://phabricator.services.mozilla.com/D38874

--HG--
extra : moz-landing-system : lando
2019-07-29 09:35:53 +00:00
Jan de Mooij
a76503da23 Bug 1567388 part 3 - Stop Baseline-compiling scripts for the definite properties analysis. r=tcampbell
Now that IonBuilder only depends on JitScript we no longer need to have a BaselineScript.

Differential Revision: https://phabricator.services.mozilla.com/D39168

--HG--
extra : moz-landing-system : lando
2019-07-26 10:11:27 +00:00
Yoshi Cheng-Hao Huang
e17d60cbf4 Bug 1551810 - Part 1: return bool in CallbackTracer methods. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D38980

--HG--
extra : moz-landing-system : lando
2019-07-26 08:59:38 +00:00
Ciure Andrei
3e816e5942 Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2019-07-25 19:24:23 +03:00
Ciure Andrei
282afccb14 Merge inbound to mozilla-central. a=merge 2019-07-25 19:20:00 +03:00
Iain Ireland
79d0a81073 Bug 1568564: Nightly: Strengthen assertion in set/toPrivate r=luke
Differential Revision: https://phabricator.services.mozilla.com/D39251

--HG--
extra : moz-landing-system : lando
2019-07-24 23:19:57 +00:00
Jon Coppeard
1eed8d362f Bug 1568539 - Remove unnecessary single use of ExposeScriptToActiveJS r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D39201
2019-07-24 15:54:32 +01:00
Jeff Walden
f03426c144 Bug 1566784 - Increase the size of the buffer that JS::NumberToString fills with the result of ToString applied to the provided double to fix overflows. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D38442

--HG--
extra : rebase_source : 517c08a1ccde7f3856e939528db116d8847b98dc
extra : amend_source : 7ef6f91c596f52713fd998d410eef7a32d385912
2019-07-17 18:07:35 -07:00
Ted Campbell
21ddd20f03 Bug 1565720 - Use UniqueChars in MemoryMetrics.{cpp,h}. r=jwalden,froydnj
Avoid manual allocations and use default constructors when possible to
simplify code.

Differential Revision: https://phabricator.services.mozilla.com/D37946

--HG--
extra : moz-landing-system : lando
2019-07-22 14:15:58 +00:00
Brian Hackett
e00511f3ae Bug 1554524 Part 5 - Emit instrumentation opcodes when they have been set in a realm, r=tcampbell.
--HG--
extra : rebase_source : c5a88ed48ffc0a9b14daf8e9be5bd5c573f871be
2019-07-08 10:23:34 -10:00
Brian Hackett
07567615d5 Bug 1554524 Part 4 - Add Debugger interface for instrumenting scripts, r=jimb,tcampbell.
--HG--
extra : rebase_source : a0adc06f428c224c23755531b8dee1063cd591fb
2019-07-08 09:41:21 -10:00
André Bargull
ace8a3d15b Bug 1543677 - Part 1: Support BigInt in NumberFormat and toLocaleString. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D27123

--HG--
extra : moz-landing-system : lando
2019-07-19 11:41:19 +00:00
Ted Campbell
4dfa618f5d Bug 1565720 - More field initializers fixes in MemoryMetrics.h. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D38485

--HG--
extra : moz-landing-system : lando
2019-07-18 22:23:05 +00:00
Ted Campbell
78d3ac41a6 Bug 1545278 - Add js::ObjectMayBeSwapped and restrict transplanting. r=iain
JS_TransplantObject is a very powerful API that results in the JITs
having to worry about the type of objects changing in surprising ways.
In practice though, there are very limited uses of this API so we can
add an API to determine which objects have to worry about transplanting.
This can then by asserted in JITs to document places that optimize
performance by expecting not to deal with transplants.

Differential Revision: https://phabricator.services.mozilla.com/D27975

--HG--
extra : moz-landing-system : lando
2019-07-18 20:41:01 +00:00
Ted Campbell
262540dd9d Bug 1565720 - Use field initializers in MemoryMetrics.h. r=jwalden
Also use default constructors when possible to remove duplications.

Depends on D37944

Differential Revision: https://phabricator.services.mozilla.com/D37945

--HG--
extra : moz-landing-system : lando
2019-07-15 22:48:49 +00:00
Ted Campbell
97bd94a015 Bug 1565720 - Use Maybe instead of manual allocations in MemoryMetrics.h. r=jwalden
Replace HashMap<T>* with Maybe<HashMap<T>> in memory reporting to have
simpler code and better ergonimics.

Differential Revision: https://phabricator.services.mozilla.com/D37944

--HG--
extra : moz-landing-system : lando
2019-07-18 13:17:10 +00:00
Ted Campbell
60b8fd6025 Bug 1565720 - Fix formatting in MemoryMetrics.h. r=jwalden
Add extra semi-colons to avoid confusing clang-format.

Differential Revision: https://phabricator.services.mozilla.com/D37943

--HG--
extra : moz-landing-system : lando
2019-07-15 22:43:50 +00:00
Iain Ireland
28a1aa14d3 Bug 1505902: Clean up private Value representation r=djvj
Our previous representation of private values assumed that the private pointer was aligned, and did some bit twiddling to try to disguise it as a double. Since bug 1293313, it has been unnecessary to set the top bit for a double, so that bit twiddling is unnecessary. There are actual use cases where private values are unaligned, so we should fix this.

While cleaning this up, I also removed unboxPrivateValue, because its only use could be better written using loadPrivateValue directly.

Differential Revision: https://phabricator.services.mozilla.com/D38127

--HG--
extra : moz-landing-system : lando
2019-07-16 19:10:30 +00:00
Ted Campbell
8df08d5f7d Bug 1564927 - Move off-thread API for BinAST to the right header. r=jwalden
Also reorder functions in OffThreadScriptCompilation to group by
data source type.

Differential Revision: https://phabricator.services.mozilla.com/D37575

--HG--
extra : moz-landing-system : lando
2019-07-15 22:43:28 +00:00
Jan de Mooij
5ea23033d2 Bug 1565175 - Fix HeapSnapshotHandler to not add nodes to |visited| until they're written to the core dump. r=fitzgen
Because ShouldIncludeEdge considers the |origin| node as well, it was possible for
the old code to 'miss' nodes and never write them to the core dump even though we
also wrote some edges with the node as referent.

Differential Revision: https://phabricator.services.mozilla.com/D37701

--HG--
extra : moz-landing-system : lando
2019-07-11 18:41:43 +00:00
Jeff Walden
3b5e9c949f Bug 1564589 - Implement an infallible JS::NumberToString that stores null-terminated ToString(Number value) into a static-length buffer. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D37487

--HG--
extra : moz-landing-system : lando
2019-07-10 23:55:09 +00:00
Jan de Mooij
93d6f816f0 Bug 1564349 part 1 - Convert Baseline/Ion/NativeRegExp prefs from ContextOptions to JitOptions. r=nbp,smaug
Using process-wide prefs is consistent with the other JIT options and is simpler
to work with (one place to initialize for all runtimes).

Differential Revision: https://phabricator.services.mozilla.com/D37385

--HG--
extra : moz-landing-system : lando
2019-07-10 09:43:39 +00:00
Boris Zbarsky
0809eb5853 Bug 1561887 part 1. Add an overload of JS::ObjectIsMarkedGray that works on TenuredHeap. r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D36868

--HG--
extra : moz-landing-system : lando
2019-07-08 22:52:51 +00:00
Greg Tatum
bb7857b872 Bug 1559486 - Remove scriptFilename from RecordAllocationInfo; r=jimb
Differential Revision: https://phabricator.services.mozilla.com/D36651

--HG--
extra : moz-landing-system : lando
2019-07-04 05:19:58 +00:00
Sylvestre Ledru
131d0c6a02 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D35622

--HG--
extra : moz-landing-system : lando
2019-07-06 08:18:28 +00:00
Greg Tatum
e84b12e2ee Bug 1545582 - Add a JS runtime level of allocation logging; r=jimb
Differential Revision: https://phabricator.services.mozilla.com/D28142

--HG--
extra : moz-landing-system : lando
2019-07-01 21:52:58 +00:00
Andrea Marchesini
fc60290383 Bug 1557781 - Better life-time management for BodyStream/FetchStream - part 3 - JS::ReadableStreamReleaseCCObject, r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D36466

--HG--
extra : moz-landing-system : lando
2019-07-01 20:01:17 +00:00
Andrea Marchesini
69ac3c7729 Bug 1557781 - Better life-time management for BodyStream/FetchStream - part 1 - JSCLASS_PRIVATE_IS_NSISUPPORTS, r=jonco,jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D35528

--HG--
extra : moz-landing-system : lando
2019-07-01 19:59:33 +00:00
Karan Sapolia
638fd4ee57 Bug 1557112 - Remove THREAD_TYPE_GCHELPER from the js::ThreadType enum. r=KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D34975

--HG--
extra : moz-landing-system : lando
2019-06-14 20:42:12 +00:00
Csoregi Natalia
29f8e6aebd Merge inbound to mozilla-central. a=merge 2019-06-29 12:59:53 +03:00
Kagami Sascha Rosylight
8e0f5ebfdd Bug 1560658: Add SameValueZero to mfbt/FloatingPoint.h r=jwalden
Add ES-defined SameValueZero and replace existing code.

Differential Revision: https://phabricator.services.mozilla.com/D35596

--HG--
extra : moz-landing-system : lando
2019-06-28 23:57:13 +00:00
shindli
67c134b492 Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-06-29 02:23:28 +03:00
Christian Holler
fa2fa5573f Bug 1435532 - Prevent/crash on large allocations in fuzzing JS shell. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D28973

--HG--
extra : moz-landing-system : lando
2019-06-28 18:59:55 +00:00
Karan Sapolia
ed6ee44baf Bug 1549263 - Rename sliceTimeBudget() and related symbols to include units. r=pbone
Differential Revision: https://phabricator.services.mozilla.com/D35588

--HG--
extra : moz-landing-system : lando
2019-06-28 12:56:08 +00:00
Mike Hommey
f704e82913 Bug 1562063 - Stop including Char16.h everywhere in js/. r=jwalden
Same as bug 1426898, but for js.

Differential Revision: https://phabricator.services.mozilla.com/D36259

--HG--
extra : moz-landing-system : lando
2019-06-27 22:33:09 +00:00
Jason Orendorff
5b135c7bdb Bug 1555464 - Part 2: Enable fields by default in the JS shell. r=khyperia
Differential Revision: https://phabricator.services.mozilla.com/D34639

--HG--
extra : moz-landing-system : lando
2019-06-27 14:57:44 +00:00
Gurzau Raul
24d0e8e2ba Merge inbound to mozilla-central. a=merge 2019-06-27 00:54:09 +03:00
Narcis Beleuzu
255b52c321 Backed out 2 changesets (bug 1558971, bug 1555464) for SM bustages on ecma262-issue-1461.js . CLOSED TREE
Backed out changeset 8227f5fbbe20 (bug 1555464)
Backed out changeset 36683eb4d0db (bug 1558971)
2019-06-26 19:55:40 +03:00
Jason Orendorff
1c562e6022 Bug 1555464 - Part 2: Enable fields by default in the JS shell. r=khyperia
Differential Revision: https://phabricator.services.mozilla.com/D34639

--HG--
extra : moz-landing-system : lando
2019-06-26 04:43:05 +00:00
Iain Ireland
5cd03cc9d2 Bug 1559072: Revert to old boxing format r=djvj
Differential Revision: https://phabricator.services.mozilla.com/D35547

--HG--
extra : moz-landing-system : lando
2019-06-25 17:34:50 +00:00
Jon Coppeard
22952620f8 Bug 1560931 - Set JS engine low memory state based on memory pressure notifications r=smaug
Update the memory pressure observers for main thread and workers to call the new JS API to set/clear the low memory state.

Differential Revision: https://phabricator.services.mozilla.com/D35682
2019-06-24 18:24:47 +01:00
arthur.iakab
a549fe0532 Merge mozilla-central to mozilla-inbound
--HG--
extra : rebase_source : 144e998695db067f1dad805e5263b591ed98e50f
2019-06-28 13:10:08 +03:00
Jon Coppeard
afdba4e113 Bug 1561866 - Move alloc policies where possible r=jwalden
Patch to use std::move when passing AllocPolicy instances to constructors. This also fixes HashTable move constuction/assignment that previously PodAssigned the whole object including the AllocPolicy base.

Differential Revision: https://phabricator.services.mozilla.com/D36175
2019-06-27 11:56:26 +01:00
Jon Coppeard
fb607e89b8 Bug 1395509 - Track malloc memory used by wasm objects, part 1 r=luke
This adds tracking of malloc memory to WasmInstanceObject, WasmGlobalObject, WasmMemoryObject and ResolveResponseClosure (the straightforward cases).

Differential Revision: https://phabricator.services.mozilla.com/D35485
2019-06-20 15:19:18 -07:00
Jan de Mooij
a261b8dc01 Bug 1551499 - Support Baseline Interpreter code in the profiler. r=djvj
Because the return address cannot be used to uniquely identify script/pc, this
is unfortunately quite different from what we do for Baseline/Ion code.

The strategy is as follows:

* When the profiler is enabled, ensure each JitScript has a pointer to the
  profile string (released when the script is finalized).

* The BaselineInterpreter code is registered with the JitcodeMap.

* The profiler code treats interpreter frames like C++ Interpreter frames,
  instead of doing the return address based mapping.

Differential Revision: https://phabricator.services.mozilla.com/D31052

--HG--
extra : moz-landing-system : lando
2019-06-21 16:13:48 +00:00
Ciure Andrei
217ab9d060 Backed out 4 changesets (bug 1545582) for causing spidermonkey bustages CLOSED TREE
Backed out changeset c53f9e22d5f7 (bug 1545582)
Backed out changeset 6640b7f3d7e0 (bug 1545582)
Backed out changeset c65de5ec10da (bug 1545582)
Backed out changeset 3224107774b1 (bug 1545582)
2019-06-20 19:39:54 +03:00
Greg Tatum
c46b8c0571 Bug 1545582 - Add a JS runtime level of allocation logging; r=jimb
Differential Revision: https://phabricator.services.mozilla.com/D28142

--HG--
extra : moz-landing-system : lando
2019-06-19 21:07:52 +00:00
Jan de Mooij
7542b540e4 Bug 1535154 - Merge PrivateScriptData scopes/objects/bigints arrays into a single array of GC things. r=tcampbell,jonco
Once the other data is moved out of PrivateScriptData, this GC-thing array will be stored
at a fixed offset. At that point we can simplify PrivateScriptData and get fast indexing
into this array, important for the Baseline Interpreter.

Differential Revision: https://phabricator.services.mozilla.com/D34902

--HG--
extra : moz-landing-system : lando
2019-06-20 03:02:35 +00:00
Ted Campbell
1e2658e982 Bug 1559275 - Add TransistiveCompileOptions::forceFullParse. r=jandem
Check VM and Realm options that may disable syntax parsing up front in
the CompileOptions constructor. This is needed to make the frontend
closer to a pure-function.

Differential Revision: https://phabricator.services.mozilla.com/D35214

--HG--
extra : moz-landing-system : lando
2019-06-19 01:43:06 +00:00
Ted Campbell
1138b5e8fc Bug 1559275 - Add TransistiveCompileOptions::discardSource. r=jandem
Check realm flags at when creating CompileOptions rather than during
compilation. This is helpful for pre-compiling self-hosting code.

Differential Revision: https://phabricator.services.mozilla.com/D34976

--HG--
extra : moz-landing-system : lando
2019-06-19 00:27:40 +00:00
Ted Campbell
8a260ca538 Bug 1559275 - Remove unused CompileOptions::allowSyntaxParser. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D35070

--HG--
extra : moz-landing-system : lando
2019-06-19 00:27:41 +00:00
Ted Campbell
d2cb6059f3 Bug 1559275 - Remove unused CompileOptions::isProbablySystemCode. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D34977

--HG--
extra : moz-landing-system : lando
2019-06-19 00:27:40 +00:00
Ted Campbell
a68d5a818e Bug 1559275 - Only initialize JS::OwningCompileOptions by copying. r=jandem
All uses of OwningCompileOptions now are initialized from copy() so
remove the now-unused setters.

Differential Revision: https://phabricator.services.mozilla.com/D35080

--HG--
extra : moz-landing-system : lando
2019-06-19 00:27:41 +00:00
shindli
e1240cd017 Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-06-16 00:50:56 +03:00
Jeff Walden
563e73698d Bug 1554362 - Implement nsJSUtils::CompileModule for UTF-8 as well as UTF-16. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D34821

--HG--
extra : moz-landing-system : lando
2019-06-15 20:47:51 +00:00
Jon Coppeard
da44422dfb Bug 1395509 - Track malloc memory used by PerfMesaurement objects r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D34730
2019-06-12 16:22:13 +01:00
Mihai Alexandru Michis
cff1990963 Backed out 4 changesets (bug 1545582) for causing build bustages in SavedStacks.cpp CLOSED TREE
Backed out changeset a47c4a44bae0 (bug 1545582)
Backed out changeset c05a5d68d9a8 (bug 1545582)
Backed out changeset 699de45940b1 (bug 1545582)
Backed out changeset 285673afaa99 (bug 1545582)
2019-06-15 02:19:08 +03:00
Greg Tatum
808dfce0d8 Bug 1545582 - Add a JS runtime level of allocation logging; r=jimb
Differential Revision: https://phabricator.services.mozilla.com/D28142

--HG--
extra : moz-landing-system : lando
2019-06-14 20:18:22 +00:00
Dorel Luca
bb47ceb7e9 Backed out 2 changesets (bug 1559275) for Mochitest failures in js/xpconnect/tests/chrome/test_discardSystemSource.xul. CLOSED TREE
Backed out changeset 41762079fd4c (bug 1559275)
Backed out changeset 248e294630c1 (bug 1559275)

--HG--
extra : rebase_source : 88e75469d7ad3dda9c969fa2c9ceee47b6d0169a
2019-06-14 23:52:03 +03:00
Ted Campbell
e35a46b5c0 Bug 1559275 - Remove unused CompileOptions::isProbablySystemCode. r=jandem
Depends on D34976

Differential Revision: https://phabricator.services.mozilla.com/D34977

--HG--
extra : moz-landing-system : lando
2019-06-14 07:35:17 +00:00
Ted Campbell
d91ab6cc88 Bug 1559275 - Add CompileOptions::discardSource. r=jandem
Check realm flags at when creating CompileOptions rather than during
compilation. This is helpful for pre-compiling self-hosting code.

Differential Revision: https://phabricator.services.mozilla.com/D34976

--HG--
extra : moz-landing-system : lando
2019-06-14 18:34:32 +00:00
Paul Bone
97cbd21e24 Bug 1557928 - Rename the DoNotCare tracer kind r=jonco
Depends on D34675

Differential Revision: https://phabricator.services.mozilla.com/D34703

--HG--
extra : moz-landing-system : lando
2019-06-13 01:11:53 +00:00
Andreea Pavel
9d535a8d72 Backed out 4 changesets (bug 1557928) SM build bustages on a CLOSED TREE
Backed out changeset 5e5b8a770b18 (bug 1557928)
Backed out changeset 6096454af6f1 (bug 1557928)
Backed out changeset 618afaab2634 (bug 1557928)
Backed out changeset ef396dbaecf3 (bug 1557928)
2019-06-13 04:07:17 +03:00
Paul Bone
ee87fa7f84 Bug 1557928 - Rename the DoNotCare tracer kind r=jonco
Depends on D34675

Differential Revision: https://phabricator.services.mozilla.com/D34703

--HG--
extra : moz-landing-system : lando
2019-06-12 16:23:47 +00:00
Ciure Andrei
916d8a7f73 Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-06-13 00:44:53 +03:00
Iain Ireland
dd43b90d94 Bug 1558179: Canonicalize all NaNs on hardware that does not generate canonical NaNs natively r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D34403

--HG--
extra : moz-landing-system : lando
2019-06-11 15:16:40 +00:00
Iain Ireland
98788f0b1c Bug 1401624: Part 8: Convert C-style macros to JS::detail constexprs r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D33503

--HG--
extra : moz-landing-system : lando
2019-06-12 17:49:52 +00:00
Jon Coppeard
94009e206b Bug 1395509 - Track malloc memory associated with ctypes objects r=jandem
Use memory tracking APIs to track malloc memory associated with the different ctypes objects.

I ended up creating new public APIs because ctypes currently mostly uses our public APIs, but I actaully don't know why.  I don't think it can be built standalone.  Maybe this should use the internal APIs instead.

Differential Revision: https://phabricator.services.mozilla.com/D34375
2019-06-10 16:11:25 +01:00
Iain Ireland
e68b24eb5b Bug 1548908: Remove IsCanonical and simplify StructuredCloneReader r=tcampbell
IsCanonical was only used in StructuredCloneReader::CheckDouble. Two of CheckDouble's three uses already canonicalized the double before checking it, and the third *should* have already done so.

Differential Revision: https://phabricator.services.mozilla.com/D29870

--HG--
extra : moz-landing-system : lando
2019-06-03 15:59:29 +00:00
Iain Ireland
4bb0dc7bd0 Bug 1548908: Remove "well-known numbers" from JSRuntime r=tcampbell
Back when we first freed the lizard in 1998, it made sense to have copies of NaN/+Inf/-Inf living on the runtime, because Values didn't store doubles inline. That hasn't been true for a long time. This patch gets rid of those.

Differential Revision: https://phabricator.services.mozilla.com/D29868

--HG--
extra : moz-landing-system : lando
2019-06-03 15:59:25 +00:00
Iain Ireland
00ae116a04 Bug 1548908: Add InfinityBits to FloatingPoint.h r=jwalden
We can't generate a constexpr uint64_t containing the bits for positive/negative infinity, because of a (very sensible) static_assert in SpecificNaNBits. This patch adds support to FloatingPoint.h for infinity. The next patch will use it to make JS::InfinityValue constexpr (to match JS::NaNValue).

Differential Revision: https://phabricator.services.mozilla.com/D29869

--HG--
extra : moz-landing-system : lando
2019-06-03 15:59:21 +00:00
Iain Ireland
5a8c83aeaa Bug 1548908: Clean up JS::CanonicalizedDoubleValue r=tcampbell
1. CanonicalizedDoubleValue should reuse the logic in CanonicalizeNaN.
2. Places that call DoubleValue(CanonicalizeNaN(d)) should just use CanonicalizedDoubleValue(d).

Differential Revision: https://phabricator.services.mozilla.com/D29867

--HG--
extra : moz-landing-system : lando
2019-06-03 15:59:17 +00:00
Iain Ireland
b4d7776503 Bug 1401624: Part 5: Change Value representation r=tcampbell,jwalden
This patch is where the actual changes to our value representation happens. A few notes:

1. We did some weird macro tricks to work around a GCC bug with enums in bitfields. Those bitfields were only useful for poking at values in gdb, and the trick no longer worked with object-biased nanboxing, so I removed it. I also got rid of asDouble_, because it's no longer possible to read the double value right out of the enum without unboxing.

2. In the previous boxing scheme, there was a mechanical conversion between a JSValueType and a JSValueTag. That's no longer true, which is why the big conversion switches exist.

3. Waldo, you were included as a reviewer specifically to look at Value.h and make sure that our gross bit twiddling is just gross and not undefined.

Differential Revision: https://phabricator.services.mozilla.com/D29055

--HG--
extra : moz-landing-system : lando
2019-06-12 17:51:06 +00:00
Andreea Pavel
9eda2afac1 Backed out 7 changesets (bug 1401624) for build bustages at MacroAssembler-inl.h on a CLOSED TREE
Backed out changeset 46030572ffde (bug 1401624)
Backed out changeset bccc5a509ebe (bug 1401624)
Backed out changeset 1a488ead5ac5 (bug 1401624)
Backed out changeset caac1da9ae80 (bug 1401624)
Backed out changeset 8f02092ab0b4 (bug 1401624)
Backed out changeset 90a104231405 (bug 1401624)
Backed out changeset d5d97222de6f (bug 1401624)
2019-06-12 20:47:42 +03:00
Iain Ireland
ae7d6752b5 Bug 1401624: Part 5: Change Value representation r=tcampbell,jwalden
This patch is where the actual changes to our value representation happens. A few notes:

1. We did some weird macro tricks to work around a GCC bug with enums in bitfields. Those bitfields were only useful for poking at values in gdb, and the trick no longer worked with object-biased nanboxing, so I removed it. I also got rid of asDouble_, because it's no longer possible to read the double value right out of the enum without unboxing.

2. In the previous boxing scheme, there was a mechanical conversion between a JSValueType and a JSValueTag. That's no longer true, which is why the big conversion switches exist.

3. Waldo, you were included as a reviewer specifically to look at Value.h and make sure that our gross bit twiddling is just gross and not undefined.

Differential Revision: https://phabricator.services.mozilla.com/D29055

--HG--
extra : moz-landing-system : lando
2019-06-12 15:56:52 +00:00
Gurzau Raul
227f5329f7 Merge inbound to mozilla-central. a=merge 2019-06-12 00:34:32 +03:00
Jan de Mooij
7db26e7b68 Bug 1557664 - Add AutoHoldPrincipals RAII class and use it to fix a leak in the JS shell. r=jwalden
Unfortunately JS_DropPrincipals wants the cx so it's hard to use RefPtr<>.

Differential Revision: https://phabricator.services.mozilla.com/D34148

--HG--
extra : moz-landing-system : lando
2019-06-11 10:11:21 +00:00
Jon Coppeard
3291e3d4b5 Bug 1395509 - Add a separate byte count for malloc allocations r=sfink
Previously I rolled the malloc byte count into a total byte count for each zone but this may adversely affect GC scheduling (e.g. by triggering more non-incremental GCs because allocation volumes appear higher with this change). So that we can land this machinery without disturbing benchmarks too much, this patch splits out the new malloc memory accounting into a separate counter and uses the maxMallocBytes setting as the threshold (default value is 128MB vs 30MB for the GC heap threshold) and a growth factor of 2. This should make the behaviour closer to the original behaviour for now. We can go back and adjust the parameters later to obtain the desired behaviour.

Differential Revision: https://phabricator.services.mozilla.com/D34181
2019-06-07 17:03:08 +01:00
Karl Tomlinson
c606cdd6d0 Bug 1558131 permit PersistentRooted::init() with RootingContext r=sfink
https://hg.mozilla.org/mozilla-central/rev/79d18ff4fe2853abadab372bc3bc00872f52403e#l1.143
added support for PersistentRooted initialization from a RootingContext.
https://hg.mozilla.org/mozilla-central/rev/d2758f635f72f779f712bf9c6e838868ed53c9f7#l5.97
changed the init() methods to require JSContext but continued to support
RootingContext for constructors.

Differential Revision: https://phabricator.services.mozilla.com/D34318

--HG--
extra : moz-landing-system : lando
2019-06-11 00:41:32 +00:00
Cosmin Sabou
7658be0902 Backed out 6 changesets (bug 1556321, bug 1556430, bug 1167452) for causing multiple regressions.
Backed out changeset 667da63fb2b1 (bug 1556430)
Backed out changeset 5ec3133f6457 (bug 1556321)
Backed out changeset 585157ab153a (bug 1556321)
Backed out changeset 72fc109fe0f2 (bug 1167452)
Backed out changeset 11d3f2265b35 (bug 1167452)
Backed out changeset 37f9bd277c34 (bug 1167452)
2019-06-11 07:04:16 +03:00
Brindusan Cristian
d957131916 Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-06-11 12:44:12 +03:00
Yoshi Cheng-Hao Huang
f606c5e9fd Bug 1556762 - Part 1: move FullBufferReason to each instance, and add a new GCReason. r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D33652
2019-06-11 11:36:27 +02:00
Narcis Beleuzu
e360889d62 Merge inbound to mozilla-central. a=merge 2019-06-08 12:41:03 +03:00
Kristen Wright
cae8e5b60b Bug 1556861 - Adding ThreadType to js::RunnableTask r=jonco
Added thread type as ThreadType enum. Default is ThreadType::THREAD_TYPE_NONE. RunnableTasks must specify their own thread type.

Differential Revision: https://phabricator.services.mozilla.com/D33818

--HG--
extra : moz-landing-system : lando
2019-06-07 21:09:05 +00:00
Jeff Walden
8891db5940 Bug 1557193 - Move Unit-agnostic code out of the Evaluate helper function in testScriptSourceCompression.cpp. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D33887

--HG--
extra : rebase_source : 552b8c6da5a247dc9e7cc6356b4abca39d147a14
2019-06-05 17:50:39 -07:00
Steve Fink
6eee7b5e6f Bug 1167452 - Barrier weakmap operations and maintain weak keys table during incremental collections. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D31958

--HG--
extra : moz-landing-system : lando
2019-05-31 23:33:48 +00:00
Jon Coppeard
77f4a218f6 Bug 1554954 - Add size parameter to GCRuntime::maybeAllocTriggerZoneGC and use this when determining whether to trigger a GC slice during an incremental GC r=sfink
There are a couple of places where this method is just used to check the thresholds so I made the size parameter default to zero.  Perhaps we should make this a separate trigger.

This also adds a separate GC reason for incremental slices trigger from this method so we can distinguish incremental and non-incremental triggers.

Differential Revision: https://phabricator.services.mozilla.com/D33000
2019-05-29 13:36:30 +01:00
Steve Fink
995829d42a No bug. Reformat js/** to fix accumulated divergences.
# ignore-this-changeset

--HG--
extra : amend_source : 7b51d539061710bf4939e687b4ca4b74af757cf3
2019-05-24 11:57:18 -07:00
Jeff Walden
4169070923 Bug 1552979 - Add a JS::CompileModule overload for direct UTF-8 compilation. r=arai
--HG--
extra : rebase_source : d63374cb56fab0a5077202462a07f2083229a5ab
2019-05-21 15:39:05 -07:00
Jeff Walden
964550bb3e Bug 1552979 - Make JS::CompileModule return the module directly, rather than by outparam duplicative of a boolean return value. r=arai
--HG--
extra : rebase_source : e5db95557dd8c1c3712395a0141badd6e8edbc8e
2019-05-21 10:21:56 -07:00
Jeff Walden
3a69834cbc Bug 1552979 - Begin fleshing out off-thread script/module compilation support for UTF-8. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D31896

--HG--
extra : rebase_source : dda3b1ae77361a5ab0a0ad52c0beaf7498553c20
2019-05-18 16:46:38 -07:00
Ciure Andrei
1f4007dfc0 Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2019-05-24 01:38:06 +03:00
Jon Coppeard
6d785a4384 Bug 1395509 - Pack MemoryTracker hashtable keys into a single word on 64bit platforms r=sfink
This code is debug-only, but it seems a shame to waste have this key structure take up two words when it will fix into one. This also moves the MemoryUse enum definition to gc/GCEnum.h.

Differential Revision: https://phabricator.services.mozilla.com/D32170
2019-05-22 17:45:03 +01:00
Jan de Mooij
d9d5e4ef64 Bug 1551796 part 1 - Rename TypeScript to JitScript. r=tcampbell
Also JSScript::makeTypes => JSScript::createJitScript for consistency with code
elsewhere.

Differential Revision: https://phabricator.services.mozilla.com/D31755

--HG--
extra : moz-landing-system : lando
2019-05-23 07:28:00 +00:00
Denis Palmeiro
a559bca492 Bug 1553362 - Add empty spew inline functions for when tracelogger is disabled r=iain
The new trace logger spew routines do not have a corresponding empty inline version for when --disable-trace-logging is used.

Differential Revision: https://phabricator.services.mozilla.com/D32156

--HG--
extra : moz-landing-system : lando
2019-05-22 15:59:05 +00:00
Denis Palmeiro
49502b1ffa Bug 1545091 - Spew tracelogger statistics with IONFLAGS=tracelogger r=iain,mstange
Add Jitspewing control for tracelogger data.  This can be enabled from the profiler or from the JS shell.  Usage is as follows:

From browser (ION_SPEW_FILENAME is recommended here so stdout doesn't get clobbered by each process):
  1.  JS_TRACE_LOGGING=1 IONFLAGS=tracelogger ION_SPEW_FILENAME=tracelogger ./mach run
  2.  Enable JSTracer feature in profiler addon
  3.  Start profiling and ctrl+shift+2 to view profile, and the data will be automatically spewed during profile collection.

From shell:
  1.  JS_TRACE_LOGGING=1 IONFLAGS=tracelogger dist/bin/js test.js
  2.  Data is automatically spewed to stdout when the shell exits, or use ION_SPEW_FILENAME.

There is an optional environment variable JS_TRACELOGGER_SPEW that can be used to emit specific events, for example JS_TRACELOGGER_SPEW="Interpreter,Baseline,GC" will emit only those specific events along with the script and self time of each script.

The structured spewer is also supported with SPEW=tracelogger, and this will emit the tracelogger data for every recorded event.

Differential Revision: https://phabricator.services.mozilla.com/D30033

--HG--
extra : moz-landing-system : lando
2019-05-21 15:25:32 +00:00
Jon Coppeard
22445824ad Bug 1537909 - Optimise external read barriers r=sfink?
Add a special path for the external read barrier API where we inline most of the checks and then always perform the barrier if we call into the engine.  This also skips dispatching on trace kind since we know the barrier tracer is always a GCMarker.

This is kind of hacky and I'm not sure how much it gains us (it's difficult to tell in profiles where GC may occur at different times).  What do you think?

Differential Revision: https://phabricator.services.mozilla.com/D31803

--HG--
extra : moz-landing-system : lando
2019-05-20 17:58:16 +00:00
Jeff Walden
38ead4474b Bug 1552977 - Add JS::EvaluateUtf8PathDontInflate that doesn't inflate UTF-8 file contents to UTF-16 before evaluating them. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D31881

--HG--
extra : moz-landing-system : lando
2019-05-21 01:31:53 +00:00
Jeff Walden
bf9676ac23 Bug 1552977 - Add JS::CompileUtf8PathDontInflate with clear non-inflating nature and make existing JS::CompileUtf8Path callers inflate again. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D31880

--HG--
extra : moz-landing-system : lando
2019-05-21 01:31:33 +00:00
Jeff Walden
1e8a4f44fd Bug 1553001 - Move module APIs out of jsapi.{cpp,h} into js/public/Modules.h and js/src/vm/Modules.cpp for better isolation of module-related APIs. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D31917

--HG--
rename : js/src/jsapi.h => js/public/Modules.h
rename : js/src/jsapi.cpp => js/src/vm/Modules.cpp
extra : moz-landing-system : lando
2019-05-21 00:57:38 +00:00
Andrew McCreight
d1648e5525 Bug 1552597, part 2 - Handlify RemapAllWrappersForObject. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D31689

--HG--
extra : moz-landing-system : lando
2019-05-20 08:40:01 +00:00
Edgar Chen
e336502f67 Bug 1549351 - Promise rejection event should not be sent for cross-origin scripts; r=smaug,till
Differential Revision: https://phabricator.services.mozilla.com/D31565

--HG--
extra : moz-landing-system : lando
2019-05-19 01:18:04 +00:00
Tooru Fujisawa
66e25f6243 Bug 1549340 - Part 2: Use union instead of reinterpret_cast to initialize const char* with symbol for JSPropertySpec.name. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D30493

--HG--
extra : moz-landing-system : lando
2019-05-13 10:26:48 +00:00
Jon Coppeard
dd05bccccd Bug 1542184 - Use PersistentRooted for rooting vectors of GC things from rust code r=fitzgen?
This replaces the use of heap-alloced Rooted with PersistentRooted which is safe wrt destruction order.

I had to add PersistentRooted and StackGCVector to OPAQUE_TYPES to make this work... I'm not really sure what this does.

Differential Revision: https://phabricator.services.mozilla.com/D30668

--HG--
extra : moz-landing-system : lando
2019-05-10 17:36:34 +00:00
Jeff Walden
353b248b45 Bug 1548729 - Move SourceHook-related functionality into its own public header for reduced dependencies. r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D29781

--HG--
rename : js/src/jsfriendapi.h => js/public/experimental/SourceHook.h
rename : js/src/jsfriendapi.cpp => js/src/vm/SourceHook.cpp
extra : moz-landing-system : lando
2019-05-10 23:38:56 +00:00
Coroiu Cristina
d2d1ba5805 Backed out changeset 45ff6c2d30e5 (bug 1548729) for SpiderMonkey failure at build/src/js/src/vm/SourceHook.cpp 2019-05-11 02:15:15 +03:00
Jeff Walden
684ce81117 Bug 1548729 - Move SourceHook-related functionality into its own public header for reduced dependencies. r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D29781

--HG--
rename : js/src/jsfriendapi.h => js/public/experimental/SourceHook.h
rename : js/src/jsfriendapi.cpp => js/src/vm/SourceHook.cpp
extra : moz-landing-system : lando
2019-05-10 22:42:27 +00:00