Support IntPtr in M{Add,Sub,Mul,Lsh,Rsh,Ursh,MinMax}
Categories
(Core :: JavaScript Engine: JIT, enhancement, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox143 | --- | fixed |
People
(Reporter: anba, Assigned: anba)
References
Details
Attachments
(5 external files)
Support for MIRType::IntPtr in M{Add,Sub,Mul,Lsh,Rsh,Ursh,MinMax} is needed for scalar replacement of subarray.
| Assignee | ||
Comment 1•1 year ago
|
||
Required for the next parts.
| Assignee | ||
Comment 2•1 year ago
|
||
Generated code ignores overflow, similar to Int64 code generation.
Drive-by change:
- Align Int64 with IntPtr, which also fixes some TODO notes about missing folding.
- Mark
getIdentity()as aconstmethod.
| Assignee | ||
Comment 3•1 year ago
|
||
| Assignee | ||
Comment 4•1 year ago
|
||
Also update MMinMax::foldsTo to handle both IntPtr and Int64.
Drive-by change:
- Re-enable folding
Math.min(typedArray.length, 0)to0by
handlingisNonNegativeIntPtrToInt32infoldLength.
| Assignee | ||
Comment 5•1 year ago
|
||
These two changes allow to optimise away more nested MinMax instructions
when one operand is a constant and the other a non-negative value.
The first change allows to fold the following pattern to constant zero:
min(min(0, len), min(>=0, len))
= min(min(0, >=0), len)
= min(0, len)
= 0
The other change allows to fold this pattern to constant zero:
min(0, min(>=0, len))
= min(min(0, >=0), len)
= min(0, len)
= 0
These patterns can be produced when scalar-replacing subarray.
Updated•1 year ago
|
Comment 7•1 year ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/7dad631137c8
https://hg.mozilla.org/mozilla-central/rev/82ddb1c2adcd
https://hg.mozilla.org/mozilla-central/rev/e835fc2f8998
https://hg.mozilla.org/mozilla-central/rev/c17c4bd82ad1
https://hg.mozilla.org/mozilla-central/rev/eb2f254b52d2
Updated•1 year ago
|
Description
•