Closed Bug 1536695 Opened 7 months ago Closed 6 months ago

Infallible BigInt coercion for TypedArray operations

Categories

(Core :: JavaScript Engine, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: terpri, Assigned: anba)

References

Details

Attachments

(2 files)

There are fast paths for some TypedArray operations that rely on infallible value conversions being available. Currently any conversion involving a BigInt value or BigInt array type is considered fallible. ElementSpecific::infallibleValueToNative and related methods should perform infallible conversion of BigInts when possible

Blocks: 1456569
Priority: -- → P2

Taking because bug 1456569 actually regressed non-BigInt conversion, too: js::ElementSpecific::canConvertInfallibly(...) currently takes a Scalar::Type argument which is recomputed for each call, but since that argument is always equal to TypeIDOfType<T>::id, it's not actually necessary to pass it to canConvertInfallibly in the first place.

Assignee: nobody → andrebargull
Status: NEW → ASSIGNED

The scalar-type matches TypeIDOfType<T>::id, which is a constant, so it's not
necessary to recompute the type for each call to canConvertInfallibly.

Pushed by nerli@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a40f5c68f454
Part 1: Avoid computing constant scalar-type when calling canConvertInfallibly. r=jandem
https://hg.mozilla.org/integration/autoland/rev/cb9e9d32e521
Part 2: Support infallible conversion for BigInt types. r=jandem

Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.