Closed Bug 1913947 Opened 1 month ago Closed 29 days ago

Use MInt64ToBigInt to create BigInt from Int64

Categories

(Core :: JavaScript Engine: JIT, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
131 Branch
Tracking Status
firefox131 --- fixed

People

(Reporter: anba, Assigned: anba)

References

(Blocks 1 open bug)

Details

Attachments

(8 files)

Multiple MIR nodes inline the Int64 -> BigInt conversion (cf. MLoadUnboxedScalar, MLoadDataViewElement, etc.) instead of using MInt64ToBigInt. Reusing MInt64ToBigInt for the conversion leads to an easier implementation and will allow further follow-up optimisations.

Change MInt64ToBigInt to allow creating unsigned BigInt64. Later parts will
use this functionality.

MacroAssembler::initializeBigInt64 clobbers the input value, so we restore it
for LInt64ToBigInt.

Return Int64 from MLoadUnboxedScalar and then convert the Int64 through
MInt64ToBigInt to get the BigInt result. This change will make it easier to
perform additional optimisations when reading from Big(U)Int64Array.

Similar to the previous part, return Int64 from MLoadDataViewElement and then
perform the Int64 -> BigInt conversion through a separate instruction.

Copying elements from one BigInt TypedArray to another will now no longer allocate
any temporary BigInts. (At least as long as the element is not captured by resume
points.)

Blocks: sm-jits
Severity: -- → N/A
Priority: -- → P1
Pushed by andre.bargull@gmail.com: https://hg.mozilla.org/integration/autoland/rev/f8a346e4e6ad Part 1: Support unsigned BigInt in MInt64ToBigInt. r=spidermonkey-reviewers,iain https://hg.mozilla.org/integration/autoland/rev/9a778b3bf532 Part 2: Don't modify LInt64ToBigInt's input register. r=spidermonkey-reviewers,iain https://hg.mozilla.org/integration/autoland/rev/3ee7cb924d2d Part 3: Return Int64 from MLoadUnboxedScalar. r=spidermonkey-reviewers,iain https://hg.mozilla.org/integration/autoland/rev/c095d58480bf Part 4: Return Int64 from MLoadDataViewElement. r=spidermonkey-reviewers,iain https://hg.mozilla.org/integration/autoland/rev/74a4462d7c6f Part 5: Return Int64 from MAtomicTypedArrayElementBinop. r=spidermonkey-reviewers,iain https://hg.mozilla.org/integration/autoland/rev/aa8618d34187 Part 6: Return Int64 from MAtomicExchangeTypedArrayElement. r=spidermonkey-reviewers,iain https://hg.mozilla.org/integration/autoland/rev/148129eff6c6 Part 7: Return Int64 from MCompareExchangeTypedArrayElement. r=spidermonkey-reviewers,iain https://hg.mozilla.org/integration/autoland/rev/13d1ab80a048 Part 8: Use Int64 input for StoreUnboxedScalarPolicy. r=spidermonkey-reviewers,iain
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: