Skip to content

Commit

Permalink
Editorial: Add a sentence in Data Blocks about bytes (#1907)
Browse files Browse the repository at this point in the history
  • Loading branch information
syg authored and ljharb committed May 9, 2020
1 parent 4da5dd1 commit 56bd5fc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -4435,7 +4435,7 @@ <h1>The Abstract Closure Specification Type</h1>

<emu-clause id="sec-data-blocks">
<h1>Data Blocks</h1>
<p>The <dfn>Data Block</dfn> specification type is used to describe a distinct and mutable sequence of byte-sized (8 bit) numeric values. A Data Block value is created with a fixed number of bytes that each have the initial value 0.</p>
<p>The <dfn>Data Block</dfn> specification type is used to describe a distinct and mutable sequence of byte-sized (8 bit) numeric values. A <dfn>byte value</dfn> is an integer value in the range 0 through 255, inclusive. A Data Block value is created with a fixed number of bytes that each have the initial value 0.</p>
<p>For notational convenience within this specification, an array-like syntax can be used to access the individual bytes of a Data Block value. This notation presents a Data Block value as a 0-origined integer-indexed sequence of bytes. For example, if _db_ is a 5 byte Data Block value then _db_[2] can be used to access its 3<sup>rd</sup> byte.</p>
<p>A data block that resides in memory that can be referenced from multiple agents concurrently is designated a <dfn>Shared Data Block</dfn>. A Shared Data Block has an identity (for the purposes of equality testing Shared Data Block values) that is <em>address-free</em>: it is tied not to the virtual addresses the block is mapped to in any process, but to the set of locations in memory that the block represents. Two data blocks are equal only if the sets of the locations they contain are equal; otherwise, they are not equal and the intersection of the sets of locations they contain is empty. Finally, Shared Data Blocks can be distinguished from Data Blocks.</p>
<p>The semantics of Shared Data Blocks is defined using Shared Data Block events by the memory model. Abstract operations below introduce Shared Data Block events and act as the interface between evaluation semantics and the event semantics of the memory model. The events form a candidate execution, on which the memory model acts as a filter. Please consult the memory model for full semantics.</p>
Expand Down Expand Up @@ -36765,7 +36765,7 @@ <h1>ArrayBuffer Objects</h1>
<emu-clause id="sec-arraybuffer-notation">
<h1>Notation</h1>
<p>The descriptions below in this section, <emu-xref href="#sec-atomics-object"></emu-xref>, and <emu-xref href="#sec-memory-model"></emu-xref> use the read-modify-write modification function internal data structure.</p>
<p>A <dfn>read-modify-write modification function</dfn> is a mathematical function that is notationally represented as an abstract closure that takes two Lists of bytes as arguments and returns a List of bytes. These abstract closures satisfy all of the following properties:</p>
<p>A <dfn>read-modify-write modification function</dfn> is a mathematical function that is notationally represented as an abstract closure that takes two Lists of byte values as arguments and returns a List of byte values. These abstract closures satisfy all of the following properties:</p>
<ul>
<li>They perform all their algorithm steps atomically.</li>
<li>Their individual algorithm steps are not observable.</li>
Expand Down Expand Up @@ -36965,7 +36965,7 @@ <h1>SetValueInBuffer ( _arrayBuffer_, _byteIndex_, _type_, _value_, _isTypedArra

<emu-clause id="sec-getmodifysetvalueinbuffer" aoid="GetModifySetValueInBuffer">
<h1>GetModifySetValueInBuffer ( _arrayBuffer_, _byteIndex_, _type_, _value_, _op_ [ , _isLittleEndian_ ] )</h1>
<p>The abstract operation GetModifySetValueInBuffer takes arguments _arrayBuffer_ (a SharedArrayBuffer object), _byteIndex_ (a non-negative integer), _type_ (a TypedArray element type), _value_ (a Number or a BigInt), and _op_ (an abstract closure) and optional argument _isLittleEndian_ (a Boolean). It performs the following steps when called:</p>
<p>The abstract operation GetModifySetValueInBuffer takes arguments _arrayBuffer_ (a SharedArrayBuffer object), _byteIndex_ (a non-negative integer), _type_ (a TypedArray element type), _value_ (a Number or a BigInt), and _op_ (a read-modify-write modification function) and optional argument _isLittleEndian_ (a Boolean). It performs the following steps when called:</p>
<emu-alg>
1. Assert: IsSharedArrayBuffer(_arrayBuffer_) is *true*.
1. Assert: There are sufficient bytes in _arrayBuffer_ starting at _byteIndex_ to represent a value of _type_.
Expand Down Expand Up @@ -37802,7 +37802,7 @@ <h1>NotifyWaiter ( _WL_, _W_ )</h1>

<emu-clause id="sec-atomicreadmodifywrite" aoid="AtomicReadModifyWrite">
<h1>AtomicReadModifyWrite ( _typedArray_, _index_, _value_, _op_ )</h1>
<p>The abstract operation AtomicReadModifyWrite takes arguments _typedArray_, _index_, _value_, and _op_ (an abstract closure). _op_ takes two List of byte values arguments and returns a List of byte values. This operation atomically loads a value, combines it with another value, and stores the result of the combination. It returns the loaded value. It performs the following steps when called:</p>
<p>The abstract operation AtomicReadModifyWrite takes arguments _typedArray_, _index_, _value_, and _op_ (an read-modify-write modification function). _op_ takes two List of byte values arguments and returns a List of byte values. This operation atomically loads a value, combines it with another value, and stores the result of the combination. It returns the loaded value. It performs the following steps when called:</p>
<emu-alg>
1. Let _buffer_ be ? ValidateSharedIntegerTypedArray(_typedArray_).
1. Let _i_ be ? ValidateAtomicAccess(_typedArray_, _index_).
Expand Down Expand Up @@ -37834,7 +37834,7 @@ <h1>AtomicLoad ( _typedArray_, _index_ )</h1>

<emu-clause id="sec-bytelistbitwiseop" aoid="ByteListBitwiseOp">
<h1>ByteListBitwiseOp( _op_, _xBytes_, _yBytes_ )</h1>
<p>The abstract operation ByteListBitwiseOp takes three arguments, a bitwise operator _op_, a List of byte values _xBytes_, and a List of byte values _yBytes_. The operation atomically performs a bitwise operation on all bytes and returns a List of byte values. It performs the following steps:</p>
<p>The abstract operation ByteListBitwiseOp takes arguments _op_ (a read-modify-write modification function), _xBytes_ (a List of byte values), and _yBytes_ (a List of byte values). The operation atomically performs a bitwise operation on all byte values of the arguments and returns a List of byte values. It performs the following steps when called:</p>
<emu-alg>
1. Assert: _xBytes_ and _yBytes_ have the same number of elements.
1. Let _result_ be a new empty List.
Expand All @@ -37850,7 +37850,7 @@ <h1>ByteListBitwiseOp( _op_, _xBytes_, _yBytes_ )</h1>

<emu-clause id="sec-bytelistequal" aoid="ByteListEqual">
<h1>ByteListEqual( _xBytes_, _yBytes_ )</h1>
<p>The abstract operation ByteListEqual takes two arguments, two Lists of byte values _xBytes_ and _yBytes_, and returns a Boolean. It performs the following steps:</p>
<p>The abstract operation ByteListEqual takes arguments _xBytes_ (a List of byte values) and _yBytes_ (a List of byte values). It performs the following steps when called:</p>
<emu-alg>
1. If _xBytes_ and _yBytes_ do not have the same number of elements, return *false*.
1. Let _i_ be 0.
Expand Down

0 comments on commit 56bd5fc

Please sign in to comment.