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

3307 Коммитов

Автор SHA1 Сообщение Дата
Nicolas B. Pierron b2484ec979 Bug 1582804 - Add JS Shell telemetry output. r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D46782
2020-10-21 14:33:08 +00:00
Ted Campbell e533579213 Bug 1672172 - Fail parse if JS line number exceeds 4B. r=jandem
Fail parsing if line number (including initial offset) overflows the uint32_t
line number. Source length is capped at 4B characters so this change only
affects cases of inline-scripts with billions of lines which is not a
realistic case, even for generated code.

Differential Revision: https://phabricator.services.mozilla.com/D94115
2020-10-21 15:12:38 +00:00
smolnar 33b2be0f5e Backed out 2 changesets (bug 1583516, bug 1582804) for causing sm bustages on js. CLOSED TREE
Backed out changeset ecd87c380c0e (bug 1583516)
Backed out changeset db121b778773 (bug 1582804)
2020-10-21 17:28:55 +03:00
Nicolas B. Pierron 859eb7a560 Bug 1583516 - Add 2-axis telemetry for the JS Shell. r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D46940
2020-10-20 14:28:40 +00:00
Nicolas B. Pierron 613b618170 Bug 1582804 - Add JS Shell telemetry output. r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D46782
2020-10-20 14:27:07 +00:00
Yoshi Cheng-Hao Huang 8c9a4c00bb Bug 1522187 - Decide string pretenuring base on pretenure rate. r=jonco
Choose the string pretenuring threshold as 0.55, as it's the most common
pretured rate when the number of strings pretenured exceeds 30,000 in JetStream2
benchmark.  (about 0.55~0.57 in my tests).

However this threshold shouldn't have any major impact on benchmarks like Octane,
JetStream2 and Kraken, as in these benchmarks when the pretenuring condition is
met, the tenured rate is 99%.

Differential Revision: https://phabricator.services.mozilla.com/D92762
2020-10-15 10:02:21 +00:00
Ryan Hunt 385de45350 Bug 1649247 - wasm: Implement eqref. r=lth
This commit adds support for the eqref value type. It shares the same
representation as externref, with the restriction that all values must
be TypedObject's. Dynamic type checks similar to funcref are added to
stubs.

As fallout from anyref removal, struct types were left as subtypes of
externref. This commit switches them to be subtypes of eqref.

As a small tweak, the ordering on cases when switching on refTypeKind()
were standardized to binary order (i.e. funcref, externref, eqref).

I think we can refactor some code to simplify the process of adding
new reftypes and would like to do that in the future.

Differential Revision: https://phabricator.services.mozilla.com/D93000
2020-10-14 21:17:44 +00:00
Jon Coppeard 16aaee1d65 Bug 1668825 - Change GenericTracer API so that it doesn't include details of heap storage r=sfink
The final patch in this series. This changes the GenericTracer APIs to take a
thing pointer and return a possibly updated versions, rather than taking a
double pointer to the thing. This means that we can change the details of how
pointers are stored in the heap without chaning this interface.

Differential Revision: https://phabricator.services.mozilla.com/D93336
2020-10-14 09:17:27 +00:00
Jon Coppeard f01aca434d Bug 1668825 - Move disptachToOnEdge methods out of class definition r=sfink
These don't need to be in the public header. We can do this with static functions.

Differential Revision: https://phabricator.services.mozilla.com/D93152
2020-10-12 19:05:43 +00:00
Ryan Hunt 67e0a28855 Bug 1669784 - Merge TypedObject namespace into WebAssembly namespace, gated on GC feature. r=lth
This commit merges the TypedObject namespace into the WebAssembly namespace, and
only exposes the TypedObject definitions when the GC feature is enabled.

A future commit will remove the TypedObject definitions from the namespace, but we
still need the infrastructure from this commit for storing the TypedObject definitions
in private slots in the namespace.

Differential Revision: https://phabricator.services.mozilla.com/D92857
2020-10-12 21:01:39 +00:00
Ryan Hunt eea0d329b5 Bug 1669784 - Don't allow constructing a StructType/ArrayType from JS. r=jandem
This will allow us to only worry about creating these types from WebAssembly.

Differential Revision: https://phabricator.services.mozilla.com/D92854
2020-10-12 20:11:13 +00:00
Razvan Maries afbeaa9f10 Backed out 11 changesets (bug 1669784) for mochitests perma failures. CLOSED TREE
Backed out changeset 59d7cd2a604c (bug 1669784)
Backed out changeset 01f901ce054b (bug 1669784)
Backed out changeset 481b2e98e24b (bug 1669784)
Backed out changeset aa2da8a6cc39 (bug 1669784)
Backed out changeset 506ef415351b (bug 1669784)
Backed out changeset 331a512fee82 (bug 1669784)
Backed out changeset 248d39d51318 (bug 1669784)
Backed out changeset 18cdaa6614cf (bug 1669784)
Backed out changeset 62ad099fe894 (bug 1669784)
Backed out changeset 792089710c63 (bug 1669784)
Backed out changeset 89e5f4b08331 (bug 1669784)
2020-10-09 20:10:43 +03:00
Ryan Hunt 72e3b9e029 Bug 1669784 - Merge TypedObject namespace into WebAssembly namespace, gated on GC feature. r=lth
This commit merges the TypedObject namespace into the WebAssembly namespace, and
only exposes the TypedObject definitions when the GC feature is enabled.

A future commit will remove the TypedObject definitions from the namespace, but we
still need the infrastructure from this commit for storing the TypedObject definitions
in private slots in the namespace.

Differential Revision: https://phabricator.services.mozilla.com/D92857
2020-10-09 15:45:29 +00:00
Ryan Hunt 89de11b7a7 Bug 1669784 - Don't allow constructing a StructType/ArrayType from JS. r=jandem
This will allow us to only worry about creating these types from WebAssembly.

Differential Revision: https://phabricator.services.mozilla.com/D92854
2020-10-09 15:43:13 +00:00
André Bargull 28ca25e42d Bug 1668576 - Part 14: Remove ObjectClassName and InitScriptSourceElement. r=tcampbell
Those two aren't even defined anymore.

Differential Revision: https://phabricator.services.mozilla.com/D92086
2020-10-09 14:24:48 +00:00
Jon Coppeard 8090e12074 Bug 1669468 - Remove separate GC reasons incremental/non-incremental trigger kinds and reasons. r=sfink
This simplifies the threshold checks and the decision to make a collection
non-incremental ultimately happens in GCRuntime::budgetIncrementalGC anyway. We
still have telemetry for incremental/non-incremental collections and
non-incremental reason.

Differential Revision: https://phabricator.services.mozilla.com/D92592
2020-10-07 18:50:08 +00:00
Jon Coppeard 7e8b185cb1 Bug 1668825 - Move trace options into a separate options class passed when the tracer is created r=sfink
I gave TraceOptions some implicit consturctors to make it easier to set a
single option by passing an enum value.

Differential Revision: https://phabricator.services.mozilla.com/D92596
2020-10-08 14:39:00 +00:00
Jon Coppeard 9167bb0718 Bug 1668825 - Remove JSTracer's checkEdges option which doesn't seem to be necessary any more r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D92595
2020-10-08 14:38:42 +00:00
Razvan Maries 7ed0fd1168 Backed out 2 changesets (bug 1668825) for build bustages on TracingAPI.h. CLOSED TREE
Backed out changeset 5bc8cb307c61 (bug 1668825)
Backed out changeset 0e6a88c27779 (bug 1668825)
2020-10-07 14:34:10 +03:00
Tooru Fujisawa 12a7a5ef4b Bug 1666683 - Part 12: Add JS::CheckCompileOptionsMatch and check options in ScriptPreloader. r=tcampbell,kmag
Differential Revision: https://phabricator.services.mozilla.com/D92414
2020-10-06 21:18:30 +00:00
Tooru Fujisawa 1bbf424a35 Bug 1666683 - Part 2: Add CompileOptions parameter to JS::DecodeScript, as a placeholder. r=tcampbell
This adds the parameter, without using it, also without passing the correct
value.
The later patch will change the consumer of those API to pass the correct value,
and then use the passed parameter.

Differential Revision: https://phabricator.services.mozilla.com/D92404
2020-10-06 21:16:22 +00:00
Tooru Fujisawa a9031ab2fe Bug 1666683 - Part 1: Reorder CompileOptions parameter. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D92403
2020-10-06 21:16:15 +00:00
Jon Coppeard 71a2c7b27d Bug 1668825 - Move trace options into a separate options class passed when the tracer is created r=sfink
I gave TraceOptions some implicit consturctors to make it easier to set a
single option by passing an enum value.

Depends on D92595

Differential Revision: https://phabricator.services.mozilla.com/D92596
2020-10-06 18:10:01 +00:00
Jon Coppeard d1b8d87d04 Bug 1668825 - Remove JSTracer's checkEdges option which doesn't seem to be necessary any more r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D92595
2020-10-06 18:06:02 +00:00
Jon Coppeard c74643e3b3 Bug 1668825 - Remove JS_GetTraceThingInfo from the public API since it's only used internally r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D92259
2020-10-05 07:56:46 +00:00
Jon Coppeard 6550bf91b1 Bug 1668825 - Remove unused onChild return value r=sfink
This isn't used anywhere so we can make onChild void.

Differential Revision: https://phabricator.services.mozilla.com/D92257
2020-10-05 07:55:13 +00:00
Jon Coppeard 1d5db9bf4c Bug 1668825 - Split out tracing context information into a separate class r=sfink
This gives JSTracer a nullable pointer to a JS::TracingContext. This will only be set for CallbackTracers.

Differential Revision: https://phabricator.services.mozilla.com/D92256
2020-10-05 07:54:40 +00:00
Jon Coppeard 2eff6e798b Bug 1668825 - Move canSkipJsid to JSTracer so it's together with the other tracing options r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D92255
2020-10-05 07:54:17 +00:00
Jon Coppeard 19a6dae234 Bug 1668825 - Split CallbackTracer into GenericTracer and CallbackTracer r=sfink
This splits out a GenericTracer class (with a virtual method per edge kind)
from CallbackTracer (with a single virtual method for all edges). GenericTracer
is used interally whereas all external uses use CallbackTracer.

Differential Revision: https://phabricator.services.mozilla.com/D92254
2020-10-05 07:54:09 +00:00
Jon Coppeard 070d9db800 Bug 1668825 - Combine TracerKindTag and TracerKind r=sfink
Currently we have two different enums that determine the tracer kind. Combine
this into a single enum and move it to the JS namespace.

Differential Revision: https://phabricator.services.mozilla.com/D92253
2020-10-05 07:53:38 +00:00
Jon Coppeard f2905d4d6e Bug 1668825 - Rename WeakMapTraceKind to WeakMapTraceAction and make it an enum class r=sfink
The instances of this are called 'actions' everywhere and I think it makes
sense that the type should be called that. Also make it an enum class and move
it into the JS namespace.

Differential Revision: https://phabricator.services.mozilla.com/D92252
2020-10-05 07:52:59 +00:00
Jeff Walden 0554852f27 Bug 1663365 - Move Intl functionality out of jsfriendapi.h to a new header. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D92168
2020-10-03 10:12:05 +00:00
Brindusan Cristian b13b794bea Backed out 2 changesets (bug 1663365) for SM bustage at jsfriendapi.cpp. CLOSED TREE
Backed out changeset 220512fd6767 (bug 1663365)
Backed out changeset b6e8a7a7b875 (bug 1663365)
2020-10-03 10:51:27 +03:00
Jeff Walden 5275a96593 Bug 1663365 - Move Intl functionality out of jsfriendapi.h to a new header. r=jandem
Depends on D92167

Differential Revision: https://phabricator.services.mozilla.com/D92168
2020-10-02 08:40:11 +00:00
André Bargull 7e04b39310 Bug 1668785: Remove using declarations from namespace level in Proxy.h. r=mgaudet
The `using` declarations in "Proxy.h" make it act like a second
"NamespaceImports.h", introducing names from `JS` into the `js` namespace.

Remove the `using` declarations from "Proxy.h" and then fix up the breakage by:
- Prepend `JS::` in various header files.
- Add "NamespaceImports.h" in cpp files.
- Add `PropertyDescriptor` to "NamespaceImports.h". There are many unqualified
  references to `PropertyDescriptor`, making it a prime candidate for
  "NamespaceImports.h".

Drive-by changes:
- Use local variables in `CheckProxyFlags()` to make the `static_assert`
  conditions more readable.

Differential Revision: https://phabricator.services.mozilla.com/D92207
2020-10-02 12:51:03 +00:00
Florian Quèze 9c87b313a1 Bug 1668056 - Bailout profiler markers should be text markers. r=jandem,gerald
Differential Revision: https://phabricator.services.mozilla.com/D91775
2020-09-30 12:19:54 +00:00
Simon Giesecke e003e4d581 Bug 1667019 - Simplify moving of Results for PackingStrategy NullIsOk. r=emilio
No longer reset a moved-from Result to an error state, which required
UnusedZero<E>::GetDefaultValue, which was somewhat confusing, and might
also be inefficient. Leaving Result in a valid state, which might be a
success or error state is sufficient.

Differential Revision: https://phabricator.services.mozilla.com/D91250
2020-09-29 08:09:02 +00:00
Ryan Hunt 33b1e95109 Bug 1664361 - wasm: Add function-references configuration option and runtime flag. r=lth
This commit adds the boilerplate machinery for the function-references proposal. The
interesting piece is that the GC proposal is moved to require the function-references
proposal to be enabled.

The configuration machinery for features is refactored in this commit to avoid passing
6 different booleans around as parameters to functions.
 * A FeatureArgs struct is added with values for all 'feature' configuration options
   - A feature is defined as an option that affects validation or semantics
   - Essentially everything besides 'debug', 'mode', 'tier'
 * All feature configuration responsibility is removed from CompilerEnvironment
 * ModuleEnvironment is modified to accept a FeatureArgs in addition to a
   CompilerEnvironment
   - The CompilerEnvironment field may eventually be removed, as it's not needed
     within function validation, and is only used by the compilers later

Differential Revision: https://phabricator.services.mozilla.com/D89857
2020-09-28 19:18:48 +00:00
Tooru Fujisawa 9ef7fb0845 Bug 1662273 - Use stencil XDR in incremental encoding and off-thread single script decoding. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D91437
2020-09-28 17:14:34 +00:00
Jan de Mooij 47d9b0c94d Bug 1667330 - Stop exposing constructor names of JS objects. r=iain
The getConstructorName testing function and UbiNode got the constructor name of a
JS object via the ObjectGroup's TypeNewScript. There's currently no way to get that
information without TI (and it always depended on brittle optimization heuristics)
so this patch removes that code.

Differential Revision: https://phabricator.services.mozilla.com/D91419
2020-09-26 03:00:15 +00:00
Jon Coppeard 0bbf0e853e Bug 1666853 - Part 4: Remove use of ApplyGCThingTyped from Value barriers as this doesn't generate good code r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D91311
2020-09-26 10:40:48 +00:00
Ted Campbell 598bc5feef Bug 1667258 - Remove support for RealmCreationOptions::cloneSingletons. r=jandem
Script object-literal singletons are only generated for top-level run-once
scripts which both XDR and cloning no longer need to support. As a result,
the `cloneSingletons` mechanism is no longer needed and can be removed.

We can simplify the Interpreter and JITs handling of JSOp::Object to no
longer worry about cloneSingletons as a result. They also lets us remove the
`setSingletonsAsValues` code since we no longer have realm-wide poison bits.

Differential Revision: https://phabricator.services.mozilla.com/D91365
2020-09-25 12:31:03 +00:00
Simon Giesecke eaa00050e4 Bug 1665850 - Switch JS to use non-reference errors with mozilla::Result. r=jandem
Also switch optimizations for HasFreeLSB and existing tests to no longer
use references.

Differential Revision: https://phabricator.services.mozilla.com/D90661
2020-09-21 13:14:10 +00:00
Simon Giesecke 2e065c64d6 Bug 1665614 - Make mozilla::Result work with non-copyable/non-param error types. r=emilio,jandem
Among other things, there were some misuses of std::forward, and
GenericErrorResult was (presumably accidentally) instatiated with
references as the template argument type, e.g. const nsresult&,
which circumvented the check for not calling it with NS_OK in
ResultExtensions.h

Differential Revision: https://phabricator.services.mozilla.com/D90561
2020-09-21 13:12:48 +00:00
Butkovits Atila 270e7e2200 Backed out 5 changesets (bug 1665927, bug 1665614, bug 1665850) for causing bustage on Result.h. CLOSED TREE
Backed out changeset 1467e76399e8 (bug 1665927)
Backed out changeset ebd4dfbc0a88 (bug 1665850)
Backed out changeset 5e23340e3b39 (bug 1665850)
Backed out changeset 5bc547e7a773 (bug 1665850)
Backed out changeset 8d88afb85a78 (bug 1665614)
2020-09-21 15:25:16 +03:00
Simon Giesecke 70bda1ef61 Bug 1665850 - Switch JS to use non-reference errors with mozilla::Result. r=jandem
Also switch optimizations for HasFreeLSB and existing tests to no longer
use references.

Differential Revision: https://phabricator.services.mozilla.com/D90661
2020-09-21 11:11:02 +00:00
Simon Giesecke 3b0420646e Bug 1665614 - Make mozilla::Result work with non-copyable/non-param error types. r=emilio,jandem
Among other things, there were some misuses of std::forward, and
GenericErrorResult was (presumably accidentally) instatiated with
references as the template argument type, e.g. const nsresult&,
which circumvented the check for not calling it with NS_OK in
ResultExtensions.h

Differential Revision: https://phabricator.services.mozilla.com/D90561
2020-09-21 10:38:19 +00:00
Jessica Tallon 1ab5dc76df 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-21 11:01:19 +00:00
Tom Schuster 07459af75f Bug 1665396 - Support calling DOM setters in CacheIR. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D90422
2020-09-17 06:43:23 +00:00
Tom Schuster a58b9699aa Bug 1664617 - Support calling DOM getters in CacheIR r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D90011
2020-09-16 14:38:06 +00:00