This adds support for `arguments[i]`. It is based directly on WarpCacheIRTranspiler::emitLoadFrameArgumentResult.
If this bounds check fails, then baseline will attach a new stub in tryAttachGenericElement, preventing a bailout loop. We could also disable scalar replacement of arguments immediately, using a special BailoutKind.
Depends on D103111
Differential Revision: https://phabricator.services.mozilla.com/D103112
This is based on the existing code for scalar replacement of objects and arrays. Unlike objects and arrays, we don't have to support mutation of the arguments object, so we can simplify a lot of the code: for example, we don't need to track state per-block.
This initial patch adds support for `arguments.length`.
Differential Revision: https://phabricator.services.mozilla.com/D103110
The goal of scalar replacement of arguments is to remove all uses of the CreateArgumentsObject instruction, so that DCE can remove it.
However, the MCreateArgumentsObject constructor calls setGuard, which stops DCE from removing it. (This has been true since it was introduced.) As far as I can tell, it doesn't have to be a guard. In FinishBailoutToBaseline, if a frame needs an args object and doesn't have one, then we call ArgumentsObject::createExpected to create it from the restored baseline frame.
Depends on D103108
Differential Revision: https://phabricator.services.mozilla.com/D103109
This adds support for `arguments[i]`. It is based directly on WarpCacheIRTranspiler::emitLoadFrameArgumentResult.
If this bounds check fails, then baseline will attach a new stub in tryAttachGenericElement, preventing a bailout loop. We could also disable scalar replacement of arguments immediately, using a special BailoutKind.
Depends on D103111
Differential Revision: https://phabricator.services.mozilla.com/D103112
This is based on the existing code for scalar replacement of objects and arrays. Unlike objects and arrays, we don't have to support mutation of the arguments object, so we can simplify a lot of the code: for example, we don't need to track state per-block.
This initial patch adds support for `arguments.length`.
Differential Revision: https://phabricator.services.mozilla.com/D103110
The goal of scalar replacement of arguments is to remove all uses of the CreateArgumentsObject instruction, so that DCE can remove it.
However, the MCreateArgumentsObject constructor calls setGuard, which stops DCE from removing it. (This has been true since it was introduced.) As far as I can tell, it doesn't have to be a guard. In FinishBailoutToBaseline, if a frame needs an args object and doesn't have one, then we call ArgumentsObject::createExpected to create it from the restored baseline frame.
Depends on D103108
Differential Revision: https://phabricator.services.mozilla.com/D103109
Drive-by change: for Compare_Symbol and Compare_Object this allows the RHS to be
a memory operand on non-ARM platforms, instead of requiring a register.
Differential Revision: https://phabricator.services.mozilla.com/D103483
Change useAnyOrConstant to useAnyOrInt32Constant and use for Compare_UIntPtr.
For IntPtr values, useAnyOrInt32Constant checks a constant is only used for values
in the Int32 range.
Differential Revision: https://phabricator.services.mozilla.com/D103482
Drive-by change: for Compare_Symbol and Compare_Object this allows the RHS to be
a memory operand on non-ARM platforms, instead of requiring a register.
Differential Revision: https://phabricator.services.mozilla.com/D103483
Change useAnyOrConstant to useAnyOrInt32Constant and use for Compare_UIntPtr.
For IntPtr values, useAnyOrInt32Constant checks a constant is only used for values
in the Int32 range.
Differential Revision: https://phabricator.services.mozilla.com/D103482
Parallel phases don't nest, unlike main thread phases. This removes the restriction that parallel phases must be recorded when in a suitable main thread parent, to allow the main thread to pause background work in any phase without associating that work with what is currently happening in the main thread.
Depends on D103675
Differential Revision: https://phabricator.services.mozilla.com/D103676
Rather than having to declar some phase kinds up-front, this records phase kind names when they are created and adds a function to reference previously created kinds. This makes the graph description simpler and removes the need to do a DFS to get all the phase kinds later.
Differential Revision: https://phabricator.services.mozilla.com/D103674
Entering zeal mode can interact with the nursery's background decommit task, so we should always wait for it at the start of the method.
Differential Revision: https://phabricator.services.mozilla.com/D103625
The code in MIR.cpp takes care of reordering and there are test cases
in wasm/simd/binop-x64-ion-codegen.js, see the codegenTextX64_LITERALxv128_v128
block. So just add a comment to avoid future confusion.
Differential Revision: https://phabricator.services.mozilla.com/D103455