Open Bug 1077305 Opened 5 years ago Updated 3 years ago

Atomics: Generate better code for accesses to Uint32 arrays


(Core :: JavaScript Engine: JIT, defect, P5)





(Reporter: lth, Unassigned)


(Blocks 1 open bug)


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.
Priority: -- → P5
Assignee: lhansen → nobody
Blocks: 1317626
No longer blocks: shared-array-buffer
You need to log in before you can comment on or make changes to this bug.