Skip to content

Commit

Permalink
Normative: Call NumberToRawBytes instead of the conversion operation …
Browse files Browse the repository at this point in the history
…to get the byte values list in Atomics.compareExchange
  • Loading branch information
anba authored and bterlson committed Feb 14, 2017
1 parent 7949fae commit 90ed6ce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -34724,10 +34724,10 @@ <h1>Atomics.compareExchange( _typedArray_, _index_, _expectedValue_, _replacemen
1. Let _expected_ be ? ToInteger(_expectedValue_).
1. Let _replacement_ be ? ToInteger(_replacementValue_).
1. Let _arrayTypeName_ be _typedArray_.[[TypedArrayName]].
1. Let _convOp_ be the conversion operation specified in <emu-xref href="#table-49"></emu-xref> for _arrayTypeName_.
1. Let _expectedBytes_ be _convOp_(_expected_).
1. Let _elementSize_ be the Number value of the Element Size value specified in <emu-xref href="#table-49"></emu-xref> for _arrayTypeName_.
1. Let _elementType_ be the String value of the Element Type value in <emu-xref href="#table-49"></emu-xref> for _arrayTypeName_.
1. Let _isLittleEndian_ be the value of the [[LittleEndian]] field of the surrounding agent's Agent Record.
1. Let _expectedBytes_ be NumberToRawBytes(_elementType_, _expected_, _isLittleEndian_).
1. Let _elementSize_ be the Number value of the Element Size value specified in <emu-xref href="#table-49"></emu-xref> for _arrayTypeName_.
1. Let _offset_ be _typedArray_.[[ByteOffset]].
1. Let _indexedPosition_ be (_i_ &times; _elementSize_) + _offset_.
1. Let `compareExchange` denote a semantic function of two List of byte values arguments that returns the second argument if the first argument is element-wise equal to _expectedBytes_.
Expand Down

0 comments on commit 90ed6ce

Please sign in to comment.