Skip to content

Commit d3653db

Browse files
committed
Editorial: Permit immutable Data Blocks with memory locations that subset other immutable Data Blocks
1 parent 9234ea1 commit d3653db

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

spec.emu

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@ shortname: <a href="https://github.com/tc39/proposal-immutable-arraybuffer"&g
1111
contributors: Mark S. Miller, Richard Gibson
1212
</pre>
1313

14+
<emu-clause id="sec-ecmascript-data-types-and-values" number="6">
15+
<h1>ECMAScript Data Types and Values</h1>
16+
17+
<emu-clause id="sec-data-blocks" number="2.9">
18+
<h1>Data Blocks</h1>
19+
<p>A data block that resides in memory that can be referenced from multiple agents concurrently is designated a <dfn variants="Shared Data Blocks">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<ins>.</ins> <del>and the intersection of the sets of locations they contain is empty</del> <ins>The intersection of the sets of locations contained by two non-equal data blocks may be non-empty only when both data blocks are immutable and one is a strict subset of the other</ins>. Finally, Shared Data Blocks can be distinguished from Data Blocks.</p>
20+
</emu-clause>
21+
</emu-clause>
22+
1423
<emu-clause id="sec-operations-on-objects" number="7">
1524
<h1>Operations on Objects</h1>
1625

@@ -473,7 +482,7 @@ contributors: Mark S. Miller, Richard Gibson
473482
</h1>
474483
<dl class="header">
475484
<dt>description</dt>
476-
<dd>It is used to create an immutable ArrayBuffer (i.e., an ArrayBuffer with a an [[ArrayBufferIsImmutable]] slot) with contents from _fromBlock_.</dd>
485+
<dd>It is used to create an immutable ArrayBuffer (i.e., an ArrayBuffer with a an [[ArrayBufferIsImmutable]] slot) with contents from _fromBlock_. Because neither the identity of a Data Block nor the set of locations in memory represented by it are observable, implementations may implement this operation without allocating new Data Block memory locations when _fromBlock_ is the value of the [[ArrayBufferData]] slot for some other immutable ArrayBuffer (and therefore already immutable) and _count_ = _byteLength_.</dd>
477486
</dl>
478487
<emu-alg>
479488
1. Assert: _constructor_ is %ArrayBuffer%.

0 commit comments

Comments
 (0)