`name` is non-nullptr if and only if the non-resolve hook fast-path was taken.
That means we can change `if (!name)` to use a simple `else` statement.
Differential Revision: https://phabricator.services.mozilla.com/D90965
I will land a testcase separately once I manage to write something that triggers the arguments rectifier code and doesn't use Intl.
Differential Revision: https://phabricator.services.mozilla.com/D91018
On CPUs with SSE 4.1 this is quite a lot faster than the C++ call (at least 4x on
some micro-benchmarks) so it's worth keeping this optimization.
Depends on D90983
Differential Revision: https://phabricator.services.mozilla.com/D90984
Replace argLengths array with a byte-sized struct that stores both the arg length
and transpile flag. Use this flag in WarpOracle instead of the switch-statement.
The flag could also be used by trial inlining to check for un-transpilable ops.
Differential Revision: https://phabricator.services.mozilla.com/D90847
In a name section of length 0, the first call to DecodeModuleNameSubsection will decode a name
but fail when finishNameSubsection detects the currentOffset is past the declared length of the
section. This failure result will bubble to the finish label of DecodeNameSection and be ignored.
This is okay, but we need to not set the moduleName until the subsection is completely validated.
Differential Revision: https://phabricator.services.mozilla.com/D90514
Use the same approach as taken for binary bitwise operations. This ensures no
unexpected performance differences can happen when switching between binary
and unary operations. This change also removes unreachable code in
`UnaryArithIRGenerator::tryAttachStringNumber()`: If the input is a string,
we always succeed in `tryAttachStringInt32()`, so the `JSOp::BitNot` case in
`tryAttachStringNumber()` is never taken. Furthermore this avoids attaching
the same stub multiple times in `tryAttachStringInt32()` when the string can't
be parsed as an int32 (e.g. `~"1.1"`).
Depends on D90714
Differential Revision: https://phabricator.services.mozilla.com/D90715
Extract the `CanTruncateToInt32` and `EmitTruncateToInt32Guard` functions in
preparation for the next part.
Depends on D90713
Differential Revision: https://phabricator.services.mozilla.com/D90714
`string|0` is sometimes used as a "fast" way to convert strings to integers.
Ion handles this case, but Warp doesn't yet.
Depends on D90712
Differential Revision: https://phabricator.services.mozilla.com/D90713
Handle `null` and `undefined` to avoid the slow VM-call fallback for code like
`int32Array[invalidIndex]|0` (bug 1515620).
Differential Revision: https://phabricator.services.mozilla.com/D90712
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
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
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
I don't know why we never did this before. And I guess it won't be needed when
we stop allocating GC things off-thread.
Differential Revision: https://phabricator.services.mozilla.com/D90701
It was hard to fix the test to reproduce on mozilla-central tip so this adds a
trialInline() testing function to trigger trial inlining of the caller's frame.
Differential Revision: https://phabricator.services.mozilla.com/D90552
No self-hosted code reads `BOUND_FUN_LENGTH_SLOT`, so we might as well move it
to the other constants in `FunctionExtended`.
Drive-by fix:
- Use fallibleUnboxInt32 in `MacroAssembler::loadFunctionLength()`.
Differential Revision: https://phabricator.services.mozilla.com/D90408
Uses the same alias set as `MGetArgumentsObjectArg`. A more narrow alias set
may be possible, but we need to be sure not to run into any issues with mapped
arguments.
Differential Revision: https://phabricator.services.mozilla.com/D90404
Don't attach LoadArgumentsObjectArgResult when it will fail anyway. The checks mirror
the dynamic checks from CacheIRCompiler.
Differential Revision: https://phabricator.services.mozilla.com/D90396