Module.imports/exports gives reflection of the imports and exports
of a module. We had a non-standard .signature property for function
types that is now superseded with the JS-type proposal [1].
The implementation of creating a type object for the various kinds
of definitions had to be refactored to be shared.
[1] https://github.com/WebAssembly/js-types/issues/19
Differential Revision: https://phabricator.services.mozilla.com/D125274
The input function to WA.Function is currently restricted to not
be an exported wasm function. This is being debated in the proposal,
but is currently being asserted in our code and so should be checked
for explicitly.
In addition, some OOM checking, standardized naming, and general
cleanup was added to WA.Function.
Differential Revision: https://phabricator.services.mozilla.com/D125228
The type() method implementations didn't accurately report OOM's
upon allocation failure. A drive by fix was done to make the
ValTypesToArray method idiomatic and return the array instead of
defining it upon a properties array. Some potential rooting issues
were also addressed.
Depends on D125226
Differential Revision: https://phabricator.services.mozilla.com/D125227
It's possible to compile OOM testing facilites outside of debug builds with the
--enable-oom-breakpoint flag so the test should work in that case too.
Differential Revision: https://phabricator.services.mozilla.com/D125402
This adds an IterativeFailureTest class which encompasses the current testing
framework with the testing code in a 'test' method.
Differential Revision: https://phabricator.services.mozilla.com/D125400
As a non-standard extension, add the "abbreviated" style to be able to select
CLDR's abbreviated format. This style is used by the DateTimePicker component
for weekdays.
Differential Revision: https://phabricator.services.mozilla.com/D125174
Previously we did this calculation after marking all the roots that doesn't
work any more. This handles setting the maybeAlive flag based on gray root
marking after that happens for each sweep group, and moves the calculation of
the compartments expected to die to the end of sweeping.
Depends on D125188
Differential Revision: https://phabricator.services.mozilla.com/D125380
This removes gray root buffering from the first marking slice and traces the
gray roots directly in a later slice. This relies on Heap<T> read barriers
being sufficient to ensure correctness.
This is conservative in that it makes no effort to skip tracing roots added
after the start of GC. It also doesn't trace roots removed after the start of
GC, but this is OK because barriers ensure marking of any observed values.
The gray root tracing callback will be called once per sweep group, which means
we will trace all zone holders and xpconnect gray roots for every group rather
than just once. This should not be a problem in practice as we expect the
number of zones and hence zone groups to decrease with fission.
On the plus side we no longer have to do a virtual dispatch per root traced
(for the buffering tracer), allocate memory for the buffer, or trace each root
twice.
Note that this doesn't make the gray root marking itself incremental yet.
Differential Revision: https://phabricator.services.mozilla.com/D125188
As a non-standard extension, add the "abbreviated" style to be able to select
CLDR's abbreviated format. This style is used by the DateTimePicker component
for weekdays.
Differential Revision: https://phabricator.services.mozilla.com/D125174
When doing trial inlining, show a spew message for cases that are not being
inlined due to polymorphism. Also fix indentation of SUCCESS in existing spew.
Differential Revision: https://phabricator.services.mozilla.com/D125133
This patch completes the move of pattern manipulation for
Intl.DateTimeFormat and places it in the unified API. If and when we
switch to ICU4X, the pattern manipulation code can be removed, as ICU4X
will handle that.
Differential Revision: https://phabricator.services.mozilla.com/D123823
This patch will not compile. It naively copies over the hour cycle code
from SpiderMonkey into the unified components. In a following patch,
these will be modified to use only the unified types.
Differential Revision: https://phabricator.services.mozilla.com/D123821
Add Interrupt status to JS::ExceptionStatus and set it when intentionally
throwing an uncatchable exception. This is only a guideline for now, so avoid
excessive asserts for now.
Differential Revision: https://phabricator.services.mozilla.com/D125363
Remove ReportOutOfMemory calls that are redundant. Also add a few missing calls
that were previously covered by a redundant call. Later patches will add asserts
to check for these redundancies. This patch should not change behaviour since
the out-of-memory exception continues to be thrown (just now only once).
Differential Revision: https://phabricator.services.mozilla.com/D125362
Save the exception state of the ExceptionHandlerBailout before calling the
normal bailout code. If the the bailout fails, we drop the error that triggered
the bailout and instead use the error that caused bailout to fail (which is
probably OOM). This is implicitly what the previous code did, but this avoids
implicitly clobbering exceptions.
This also means we no longer run the RInstruction interpreter under while an
exception is pending so we can remover a number of callWithABI exclusions.
Differential Revision: https://phabricator.services.mozilla.com/D125360
Explicitly call ReportOutOfMemory from callers of getDebuggerFrames instead of
implicitly by the Vector. Also clear pending exception in slowPathOnLeaveFrame
before raising the OOM if getDebuggerFrames fails.
Differential Revision: https://phabricator.services.mozilla.com/D125359
This oomTest covers snapshot recovery during a bailout, including inlined
frames. Previous test coverage was spotty and was platform dependent.
Differential Revision: https://phabricator.services.mozilla.com/D125357
This test was missing from moz.build so it has not been running for long enough
that the JavaScript in it is no longer even legal JS.
Differential Revision: https://phabricator.services.mozilla.com/D125356