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

3251 Коммитов

Автор SHA1 Сообщение Дата
Csoregi Natalia 67eb265e55 Backed out changeset db6f7a903c64 (bug 1651725) for spidermonkey bustage on /basic.js. CLOSED TREE 2020-09-10 19:43:00 +03:00
Tooru Fujisawa 0a00eddff0 Bug 1664182 - Add JS::SetUseOffThreadParseGlobal and js::UseOffThreadParseGlobal, replacing JS::ContextOptions::setUseOffThreadParseGlobal. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D89784
2020-09-10 16:05:39 +00:00
Tooru Fujisawa f7175553bb Bug 1663962 - Part 2: Add JS::CompileAndStartIncrementalEncoding. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D89690
2020-09-10 16:05:25 +00:00
Tooru Fujisawa 035fcb1074 Bug 1663962 - Part 1: Add JS::FinishOffThreadScriptAndStartIncrementalEncoding. r=tcampbell
Depends on D89688

Differential Revision: https://phabricator.services.mozilla.com/D89689
2020-09-10 15:17:03 +00:00
Tooru Fujisawa 68d7cb31bf Bug 1663889 - Remove JS::CompileForNonSyntacticScope and set CompileOptions in caller. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D89688
2020-09-10 15:00:36 +00:00
Jessica Tallon fa54b8f87f Bug 1651725 - Add 'minimum' argument to WASM's Memory & Table r=lth
This adds a 'minimum' argument to the JS-API for the WebAssembly.Memory
and WebAssembly.Table objects. This parameter represents the minimum
size of the object which was specified by the 'initial' parameter. This
supports using either initial or minimum to specify the parameter.

This commit is part of the work to add type reflections to the
WebAssembly JS-API as specified in the js-types proposal.

Differential Revision: https://phabricator.services.mozilla.com/D85887
2020-09-10 14:24:35 +00:00
Jeff Walden 933368cb18 Bug 1663365 - Move DOM proxy-related details (including expand support) to separate headers out of jsfriendapi.h. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D89336
2020-09-08 22:57:14 +00:00
Jeff Walden 45d8047ca9 Bug 1663365 - Move JSM environment-related functionality to its own header. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D89335
2020-09-08 22:57:01 +00:00
Jeff Walden 5c5e824b56 Bug 1663365 - Move allocation-logging functions and |JS_COUNT_{CTOR,DTOR}| into a separate header. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D89334
2020-09-08 22:56:56 +00:00
Jeff Walden 6d5beafab1 Bug 1663365 - Move various Object-related functions to a new js/public/Object.h header. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D89333
2020-09-08 22:55:38 +00:00
Jeff Walden 49d77af36e Bug 1663365 - Move |JSJitInfo| out of jsfriendapi.h to its own experimental header. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D89332
2020-09-08 22:52:34 +00:00
Jeff Walden 5608660da2 Bug 1663365 - Move |XrayJitInfo| functionality to its own friend header. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D89331
2020-09-08 22:51:10 +00:00
Jeff Walden b5ec4c7eba Bug 1663365 - Create a new js/public/String.h header seeded with the inline string functions previously found in jsfriendapi.h. (More functions ought be added/moved here, but these make a good start.) r=jandem,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D89330
2020-09-08 22:50:52 +00:00
Jan de Mooij 287b183550 Bug 1662366 part 6 - Trace cloned CacheIR stub data. r=iain
Initially the plan was to reuse TraceCacheIRStub but this patch adds the tracing
code for Warp separately because:

* CacheIR stub data in Warp contains nursery indexes. It's nice to keep that out of the IC-tracing code.
* We can use WarpGCPtr similar to other snapshotted GC pointers. It asserts GC things are not moved.

Differential Revision: https://phabricator.services.mozilla.com/D88965
2020-09-02 07:35:15 +00:00
Tooru Fujisawa d06cc89e5d Bug 1658631 - Part 3: Support instantiating stencil in main thread for off-thread script/module compilation. r=tcampbell
If useOffThreadParseGlobal option is set to false, ParseTask generates
CompilationInfo, that contains both input and stencil output,
and the main thread grabs it and instantiate it on the main thread, when
finishing the compilation.

Differential Revision: https://phabricator.services.mozilla.com/D88594
2020-09-01 23:50:17 +00:00
Tooru Fujisawa 8d0f9a9d84 Bug 1658631 - Part 2: Add frontend::ParseModuleToStencil. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D88593
2020-09-01 23:50:07 +00:00
Paul Bone a7ab41b822 Bug 1661888 - pt 2. Move a field to avoid padding r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D88709
2020-09-01 04:50:52 +00:00
Jan de Mooij 46f865b1a5 Bug 1661930 - Add GetScriptTranscodingBuildId and use it for both XDR and bytecode cache MIME type. r=nbp,tcampbell
This lets us include some extra flags in the MIME type that's used by the bytecode
cache. It also simplifies the XDR code a bit.

The approach is similar to Wasm's GetOptimizedEncodingBuildId.

Differential Revision: https://phabricator.services.mozilla.com/D88726
2020-08-31 19:38:31 +00:00
Tooru Fujisawa 6eecdba324 Bug 1662140 - Add javascript.options.off_thread_parse_global pref and --no-off-thread-parse-global shell option. r=tcampbell
This adds the preference, JS shell option, and {ContextOptions,CompileOptions} fields,
but the value isn't read and the code always acts as it's set to true.

Differential Revision: https://phabricator.services.mozilla.com/D88922
2020-08-31 23:32:14 +00:00
Sylvestre Ledru 9c192aa9ca Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D88713
2020-08-31 09:23:02 +00:00
Mihai Alexandru Michis 261d01524b Backed out changeset d0f173a90792 (bug 1519636) for causing bustages.
CLOSED TREE
2020-08-31 10:14:58 +03:00
Sylvestre Ledru 939dd426e6 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D88713
2020-08-31 06:51:21 +00:00
yohaan a7ebf0a72f Bug 1655110 added isPrivateName method to replace JSID manipulations r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D88404
2020-08-27 19:51:32 +00:00
Jon Coppeard c50d2510bc Bug 1635185 - Part 4: Removed the unused slotSpan field from BaseShape r=jandem
This also shrinks BaseShape down to 16 bytes on 32 bit platforms.

Differential Revision: https://phabricator.services.mozilla.com/D87889
2020-08-27 15:20:57 +00:00
Matthew Gaudet 658e54cd2e No Bug - Fix spelling error in Promise.h r=caroline DONTBUILD DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D88188
2020-08-25 20:44:46 +00:00
Jon Coppeard aff64e4ea9 Bug 1660965 - Report bad JS::Value contents in crash messages r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D88117
2020-08-25 12:05:05 +00:00
Jeff Walden 2fe4e38ce2 Bug 1659885 - Define |JS::shadow::Realm| in public shadow API in its own minimal header. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D87536
2020-08-20 19:23:08 +00:00
Jeff Walden 47fa4336f7 Bug 1659885 - Define |JS::shadow::Zone| in public shadow API in its own minimal header. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D87535
2020-08-20 19:22:53 +00:00
Jeff Walden d9ba945d19 Bug 1659885 - Define |JS::shadow::Symbol| in public shadow API in its own minimal header. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D87534
2020-08-20 19:22:23 +00:00
Jeff Walden f327473b12 Bug 1659885 - Define |JS::shadow::Function| in public shadow API in its own minimal header. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D87533
2020-08-20 19:22:08 +00:00
Jeff Walden babd5bb7fb Bug 1659885 - Define |JS::shadow::Object| in public shadow API in its own minimal header. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D87532
2020-08-20 19:21:53 +00:00
Jeff Walden 4602933cb4 Bug 1659885 - Define |JS::shadow::Shape| and |JS::shadow::BaseShape| in public shadow API in their own minimal header. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D87531
2020-08-20 19:21:21 +00:00
Jeff Walden d65f864b4e Bug 1659885 - Define |JS::shadow::ObjectGroup| in public shadow API in its own minimal header. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D87530
2020-08-20 19:21:09 +00:00
Jeff Walden 63004db93f Bug 1659885 - Define |JS::shadow::String| in public shadow API in its own minimal header. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D87529
2020-08-20 19:20:44 +00:00
Jeff Walden 0136cc322d Bug 1502355 - Recognize already-aborted signals passed to |ReadableStreamPipeTo| and don't pipe in this case. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D87380
2020-08-18 20:50:24 +00:00
Jeff Walden a5cfe7db08 Bug 1502355 - Correctly detect AbortSignal instances using a |const JSClass*| supplied by the embedding. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D87379
2020-08-18 20:50:21 +00:00
Jeff Walden 81f4ca4ee6 Bug 1502355 - Declare |JSClass| in consistent fashion everywhere. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D87376
2020-08-18 20:50:07 +00:00
Ryan Hunt 84f9e0c38e Bug 1561521 - Add non-nullable references. r=lth
This commit adds decoding, validation, and JS-API type-checking for
non-nullable references.

Differential Revision: https://phabricator.services.mozilla.com/D85068
2020-08-18 16:58:59 +00:00
Jon Coppeard 911a5d3265 Bug 1657850 - Add prefs to control how many background threads are used for GC r=sfink
This adds a thread count for GC parallel tasks calculated from GC parameters
for a helper thread ratio and max helper thread count. It also adds one to
report the number of helper threads used for GC.

This is slightly complicated by the fact that the helper thread system is
per-process and there are potentially many JS runtimes in a process. I
disallowed setting these parameters from workers (i.e. child JS runtimes), but
there may be more than one non-worker JS runtime so this isn't perfect.

I had to swap the mutex order for the GC and helper thread locks.  Whatever
reason they were the other way round seems to have gone and this order makes
more sense to me (I see the GC lock as being 'coarser' than the helper thread
lock).

Differential Revision: https://phabricator.services.mozilla.com/D86725
2020-08-18 15:38:24 +00:00
Dorel Luca 7cf9cb9d07 Backed out 16 changesets (bug 1561521) for WASM build bustages
Backed out changeset a850ff24c2ae (bug 1561521)
Backed out changeset 3d1a8283d2f8 (bug 1561521)
Backed out changeset 02ce4be46831 (bug 1561521)
Backed out changeset 00d2290648a7 (bug 1561521)
Backed out changeset cd847eba7f9c (bug 1561521)
Backed out changeset a7ad7e2b02c1 (bug 1561521)
Backed out changeset 538920d2d777 (bug 1561521)
Backed out changeset 3d3e3d124767 (bug 1561521)
Backed out changeset c827ecead12d (bug 1561521)
Backed out changeset 1cb2561bf28f (bug 1561521)
Backed out changeset a18f7f6320c4 (bug 1561521)
Backed out changeset bc80a4372ba0 (bug 1561521)
Backed out changeset a3abc2d14f78 (bug 1561521)
Backed out changeset b8c0cb8771b6 (bug 1561521)
Backed out changeset fe600b71015f (bug 1561521)
Backed out changeset 41e46f9041bd (bug 1561521)
2020-08-18 05:35:55 +03:00
Ryan Hunt 7ce7945cc8 Bug 1561521 - Add non-nullable references. r=lth
This commit adds decoding, validation, and JS-API type-checking for
non-nullable references.

Differential Revision: https://phabricator.services.mozilla.com/D85068
2020-08-18 00:40:20 +00:00
Adam Vandolder a560af420d Bug 1435826 - Implement private instance methods and accessors. r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D86239
2020-08-14 16:16:15 +00:00
Adam Vandolder c9aad0c1b1 Bug 1435826 - Add pref for private methods. r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D86556
2020-08-14 14:11:02 +00:00
Csoregi Natalia c9c139cfd7 Backed out changeset fb664f6d43ed (bug 1657850) for failures on helper-thread-params.js. CLOSED TREE 2020-08-13 21:41:13 +03:00
Jon Coppeard df6a3dabdf Bug 1657850 - Add prefs to control how many background threads are used for GC r=sfink
This adds a thread count for GC parallel tasks calculated from GC parameters
for a helper thread ratio and max helper thread count. It also adds one to
report the number of helper threads used for GC.

This is slightly complicated by the fact that the helper thread system is
per-process and there are potentially many JS runtimes in a process. I
disallowed setting these parameters from workers (i.e. child JS runtimes), but
there may be more than one non-worker JS runtime so this isn't perfect.

I had to swap the mutex order for the GC and helper thread locks.  Whatever
reason they were the other way round seems to have gone and this order makes
more sense to me (I see the GC lock as being 'coarser' than the helper thread
lock).

Differential Revision: https://phabricator.services.mozilla.com/D86725
2020-08-13 17:35:04 +00:00
Tooru Fujisawa 39f40e654c Bug 1658621 - Remove JS_WEB_PARSER_COMPILE_LAZY_AFTER_MS/JS_PRIVILEGED_PARSER_COMPILE_LAZY_AFTER_MS probes. r=Yoric
Differential Revision: https://phabricator.services.mozilla.com/D86751
2020-08-11 20:19:51 +00:00
Evan Welsh 2e8ba0e06f Bug 1654696 - Implement code coverage JSAPI. r=nbp,jwalden
Differential Revision: https://phabricator.services.mozilla.com/D85808
2020-08-08 03:23:31 +00:00
Jon Coppeard 5d67c0d412 Bug 1657585 - Use auto rather than repeating the type name in casts in the GC r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D86185
2020-08-06 14:50:01 +00:00
Chris Fallin d53b8b620f Bug 1656638: Add Wasm compile- and run-time telemetry to track Wasm compiler performance. r=lth
This patch adds telemetry to measure the time spent in Wasm compilers
and in the code that they generate (actually, all JS and Wasm code).

For simplicity, it measures wallclock time as a proxy for CPU time.
Furthermore, it measures runtime for all JS and Wasm code, and all
native functions invoked by the JS or Wasm code, by timing from
top-level entry to exit. This is for efficiency reasons: we do not want
to add a VM call in the transition stubs between native and JS or JS and
Wasm; that would be a Very Bad Thing for performance, even for a Nightly
build instrumented with telemetry. Because of that, it's difficult to
separate JITted JS and JITted Wasm runtime, but observing their sum
should still be useful when making comparisons across compiler changes
because absolute reductions will still be visible.

The plumbing is somewhat awkward, given that Wasm compilers can run on
background threads. It appears that the telemetry-callback API that
SpiderMonkey includes to avoid a direct dependency on the Gecko
embedding had artificially limited the callback to main-thread use only.
This patch removes that limitation, which is safe at least for Gecko;
the telemetry hooks in Gecko are thread-safe (they take a global mutex).
That way, the background threads performing compilation can directly add
telemetry incrementally, without having to pass this up through the main
thread somehow.

Finally, I have chosen to add the relevant metrics as Scalar telemetry
values rather than Histograms. This is because what we are really
interested in is the sum of all these values (all CPU time spent in
compilation + running Wasm code); if this value goes down as a result of
a Wasm compiler change, then that Wasm compiler change is good because
it reduces CPU time on the user's machine. It is difficult to add two
Histograms together because the bins may have different boundaries. If
we instead need to use a binned histogram for other reasons, then we
could simply report the sum (of all compiler time plus run time) as
another histogram.

Differential Revision: https://phabricator.services.mozilla.com/D85654
2020-08-06 01:28:45 +00:00
Butkovits Atila 26b13464c2 Backed out changeset c8123a3e4249 (bug 1656638) for build bustages at Runtime.h. CLOSED TREE 2020-08-06 02:49:14 +03:00