This type was ballooning the size of the variant, but could instead be put
out-of-band in a vector on the CompilationInfo. This change also makes the
case more similar to BigInt / RegExp.
Differential Revision: https://phabricator.services.mozilla.com/D86015
In clang-12, 5809a32e7c split `__gcov_flush` into `__gcov_dump` and `__gcov_reset`. We have to make a corresponding update in CodeCoverageHandler.cpp to avoid build errors.
Differential Revision: https://phabricator.services.mozilla.com/D86026
This is useful for scalar replacement / escape analysis, because otherwise
we would have to handle that case there, too.
Differential Revision: https://phabricator.services.mozilla.com/D85873
Add `IsTypedArrayConstructorResult` to CacheIR to test if a constructor is
definitely a TypedArray constructor. The `IsTypedArrayConstructor` intrinsic
returns `true` when the input is TypedArray constructor function. It allows the
constructor to be from a different realm, but it doesn't unwraps wrappers. (So
false-negatives are possible. This is okay because the function is only used to
guard a fast-path.)
Drive-by change:
- Change `IsTypedArrayConstructor` to use `Scalar::Type` for its parameter. This
function is only called from asm.js code which already passes a `Scalar::Type`.
- Also change it to use the `JS_FOR_EACH_TYPED_ARRAY` macro used elsewhere in
TypedArrayObject.cpp.
Differential Revision: https://phabricator.services.mozilla.com/D85970
Renames "GuardFunctionPrototype" to "GuardDynamicSlotIsSpecificObject" and changes
the "proto" argument to "expected". Part 2 will reuse this CacheIR op.
Drive-by change:
- Add the "no fixed slots" assertion from InstanceOfIRGenerator to the
CallIRGenerator use site.
Differential Revision: https://phabricator.services.mozilla.com/D85967
VAAPI HW surfaces are released at ReleaseUnusedVAAPIFrames() and we use DMABufSurface::IsUsed() flag
to detect unused surfaces. Then we call GetUnusedDMABufSurfaceWrapper() to get unused surfaces to
re-use them for decoding.
Because DMABufSurface::IsUsed() flag is updated asynchronously it may change
between ReleaseUnusedVAAPIFrames() and GetUnusedDMABufSurfaceWrapper() calls.
In that case GetUnusedDMABufSurfaceWrapper() may return unused but also unreleased surface
as it was marked as used in time of ReleaseUnusedVAAPIFrames() call.
In this patch explicitly release VAAPI data of any surface before we re-use it.
Also fail when we try to upload data to already used DMABufSurfaceYUV surface.
Differential Revision: https://phabricator.services.mozilla.com/D85842
A late getEventTimings RDP request is being cancelled while we are exiting the test case and we have already closed the devtools toolbox.
The related network request is very likely unrelated to the scenario being tested (I suspect it may be an HTTP request triggered by some
privileged code and being automatically added to the webconsole panel, it is not unlikely that we are not explicitly checking if the http
requests logged in the webconsole are actually related to the extension that the devtools toolbox is targeting).
In the meantime, the attached patch is adding to the PromiseTestUtils's "global allow list" the rejections for any late RDP request
that may still be pending while the test is exiting.
Differential Revision: https://phabricator.services.mozilla.com/D86000
The assertion crash found by fuzzing is fixed after moving useraction state from
BrowsingContext to WindowContext, see bug 1611961.
Differential Revision: https://phabricator.services.mozilla.com/D85752
Previously we didn't compact ObjectGroups, but doing this would hopfully unlock more memory savings in bug 1654853.
Most of the trickiness here comes from accessing objects whose object group is forwarded, so require special-case handling to get their class, compartment etc.
Differential Revision: https://phabricator.services.mozilla.com/D86033
Add dump method to stencil-related structs, that dumps the struct as JSON,
and `dumpStencil()` shell-builtin as a consumer.
Some structs have dumpFields method, given that JSONPrinter only provide
beginObjectProperty/endObject to print a property with an object value.
There's some design decision about when to use string-representation and when
to use object.
Currently simple single-field struct like ScopeIndex uses string-representation
like "ScopeIndex(0)", and ScriptAtom also uses string-representation.
There's an exception in ScriptAtom case in DumpScriptThing,
that we need to differentiate string and string-representation of other
structs, and for simplicity, ScriptAtom case uses object with "type" property,
and other single-field structs use string-representation.
The current dumpStencil does not dump CompilationInfo.asmJS (FIXME) and
ScriptStencil.immutableScriptData.
Most of ScriptStencil.immutableScriptData field can be dumped by `dis()`
function.
Differential Revision: https://phabricator.services.mozilla.com/D86042
This is the third part of series of patches to Frame without tls pointer.
Here we preserve initial tls in all entry stubs and then use it to find a proper tls instance for a given frame.
To find the TlsData* for specific frame we start from a entry stub's tls
and then track tls through all possible cross-instance calls. This logic
is implemented in GetNearestEffectiveTls procedure.
Then, we use this new procedure to make singal handling free from Frame::tls.
Differential Revision: https://phabricator.services.mozilla.com/D83044
This is a followup patch for removing Frame::tls.
Now, we are preserving caller's and callee's tls'es for all possible cross-instance calls in the previously allocated abi slots.
We also use preserved tls values to restore the caller's tls in Ion. Baseline doesn't need this because it restores the caller tls from its private stack slot after the call.
Differential Revision: https://phabricator.services.mozilla.com/D82888
We are going to remove Frame::tls and support trampolines for indirect calls, so we need to get rid of using Frame::tls.
In this and the followup patches I will iteratively remove all dependencies of Frame::tls and remove it eventually.
In this patch I changed wasm ABI to allocate two stack slots after stack args to preserve caller's and callee's tls'es in the near future.
Differential Revision: https://phabricator.services.mozilla.com/D82881
On Linux PID_MAX_LIMIT is 2^22. By default pid_max was set to 2^15, but
systemd since version 243 sets it to 2^22.
nsHttpHandler::NewChannelId uses PID shifted by 32 bits to generate
channelId, and that results in values greater than 2^53.
Such values are fine for uint64_t, but when we pass channelId to
devtools it gets converted to JavaScript floats, and values greater
than 2^53 get errors in lower two bits. This in turn leads to much
sorrow, like request id collisions or "no headers for this request".
This patch shifts the PID by one bit less, resulting in channelIds
that always fit into safe JavaScript integer range for all PIDs.
Differential Revision: https://phabricator.services.mozilla.com/D85990
Add a modular approach for the integration of `static-analysis` module in order
to be able to share components of it with other modules, like the integration of
`clangd` in `vscode` where we need to have access to the configuration of `clang-tidy`
in order to have `in-ide` `static-analysis` messages.
In this initial step we make a separate module for the clang-tidy configuration.
Differential Revision: https://phabricator.services.mozilla.com/D85979
In order to have a cross platform ide for C++ language support we've added `clangd`
extenssion and artifact part of `vscode` suite.
To generate the configuration you simply run:
`./mach ide vscode `.
Differential Revision: https://phabricator.services.mozilla.com/D85416
Use assertions for consistency with other intrinsics which are already asserting
that the correct number of arguments with the correct types are used.
Differential Revision: https://phabricator.services.mozilla.com/D85854
The first intrinsics optimised in CacheIR were still using emitNativeCalleeGuard.
Later one we've removed this guard.
Differential Revision: https://phabricator.services.mozilla.com/D85853
Similar to Ion only optimise the case when the object isn't actually a wrapper.
We don't have a separate MArrayBufferByteLength MIR node, so use the same
approach as used in IonBuilder and use a fixed slot load to optimise the
call.
Differential Revision: https://phabricator.services.mozilla.com/D85851
Add dump method to stencil-related structs, that dumps the struct as JSON,
and `dumpStencil()` shell-builtin as a consumer.
Some structs have dumpFields method, given that JSONPrinter only provide
beginObjectProperty/endObject to print a property with an object value.
There's some design decision about when to use string-representation and when
to use object.
Currently simple single-field struct like ScopeIndex uses string-representation
like "ScopeIndex(0)", and ScriptAtom also uses string-representation.
There's an exception in ScriptAtom case in DumpScriptThing,
that we need to differentiate string and string-representation of other
structs, and for simplicity, ScriptAtom case uses object with "type" property,
and other single-field structs use string-representation.
The current dumpStencil does not dump CompilationInfo.asmJS (FIXME) and
ScriptStencil.immutableScriptData.
Most of ScriptStencil.immutableScriptData field can be dumped by `dis()`
function.
Differential Revision: https://phabricator.services.mozilla.com/D86042