Closed Bug 1077305 Opened 6 years ago Closed 5 months ago
Atomics: Generate better code for accesses to Uint32 arrays
47 bytes, text/x-phabricator-request
|Details | Review|
This is followup work to bug 979594. The operations on SharedUint32Array will only be inlined if the predicted result type of the operation is Uint32. That is too pessimistic, because frequently a SharedUint32Array will only contain values that are in the Int32 range and so the predicted (observed) result type may be Int32. We probably can't quite use the same technique as for LoadTypedArrayElement, which will predict the type to be Int32 and bail if the prediction fails, since some of the operations in question - compareExchange, add, sub, and, or, xor - are not idempotent. It's possible that the best solution is to force the return type to Double, in order to get predictable performance and acceptable semantics.
Pushed by email@example.com: https://hg.mozilla.org/integration/autoland/rev/701d9a09a5bf Return Double for Atomics on Uint32 TypedArrays. r=jandem
You need to log in before you can comment on or make changes to this bug.