Skip to content

Commit 24c9c8d

Browse files
authored
update spec.emu with import bytes (#20)
In PR #12 we changed the type from `buffer` to `bytes` again and the output was changed from ArrayBuffer to Uint8Array, but the spec was not updated. This PR updates the spec to match the readme.
1 parent 8539195 commit 24c9c8d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

spec.emu

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ contributors: Steven, Guy Bedford
6161
<ol>
6262
<li><p><ins>Let _type_ be _entry_.[[Value]].</ins></p></li>
6363
<li><p><ins>If _type_ is *"json"*, the host environment must perform FinishLoadingImportedModule(_referrer_, _moduleRequest_, _payload_, _result_), where _result_ is either the Completion Record returned by an invokation of ParseJSONModule or a throw completion.</ins></p></li>
64-
<li><p><ins>If _type_ is *"buffer"*, the host environment must perform FinishLoadingImportedModule(_referrer_, _moduleRequest_, _payload_, _result_), where _result_ is either the Completion Record returned by an invokation of CreateBufferModule or a throw completion.</ins></p></li>
64+
<li><p><ins>If _type_ is *"bytes"*, the host environment must perform FinishLoadingImportedModule(_referrer_, _moduleRequest_, _payload_, _result_), where _result_ is either the Completion Record returned by an invokation of CreateBytesModule or a throw completion.</ins></p></li>
6565
</ol>
6666
<li>
6767
The operation must treat _payload_ as an opaque value to be passed through to FinishLoadingImportedModule.
@@ -71,11 +71,11 @@ contributors: Steven, Guy Bedford
7171
<p>The actual process performed is host-defined, but typically consists of performing whatever I/O operations are necessary to load the appropriate Module Record. Multiple different (_referrer_, _moduleRequest_.[[Specifer]], _moduleRequest_.[[Attributes]]) triples may map to the same Module Record instance. The actual mapping semantics is host-defined but typically a normalization process is applied to _specifier_ as part of the mapping process. A typical normalization process would include actions such as expansion of relative and abbreviated path specifiers.</p>
7272

7373
<emu-note>
74-
<p>The above text implies that hosts *must* support JSON modules <ins>and buffer modules</ins> imported with `type: "json"` <ins>and `type: "buffer"` respectively </ins>(if it completes normally), but it doesn't prohibit hosts from supporting JSON modules imported with no type specified. Some environments (for example, web browsers) plan to require `with { type: "json" }`, and environments which want to restrict themselves to a compatible subset would do so as well.</p>
74+
<p>The above text implies that hosts *must* support JSON modules <ins>and bytes modules</ins> imported with `type: "json"` <ins>and `type: "bytes"` respectively </ins>(if it completes normally), but it doesn't prohibit hosts from supporting JSON modules imported with no type specified. Some environments (for example, web browsers) plan to require `with { type: "json" }`, and environments which want to restrict themselves to a compatible subset would do so as well.</p>
7575
</emu-note>
7676

7777
<emu-note>
78-
<p>All of the import statements in the module graph that address the same JSON <ins>or buffer </ins>module may evaluate to the same mutable object.</p>
78+
<p>All of the import statements in the module graph that address the same JSON <ins>or bytes </ins>module may evaluate to the same mutable object.</p>
7979
</emu-note>
8080
</emu-clause>
8181

@@ -84,7 +84,7 @@ contributors: Steven, Guy Bedford
8484

8585
<p>A <dfn variants="Synthetic Module Records">Synthetic Module Record</dfn> is used to represent information about a module that is defined by specifications. Its exports are derived from a pair of lists, of string keys and of ECMAScript values. The set of exported names is static, and determined at creation time (as an argument to CreateSyntheticModule), while the set of exported values can be changed over time using SetSyntheticModuleExport. It has no imports or dependencies.</p>
8686

87-
<emu-note>A Synthetic Module Record could be used for defining a variety of module types: for example, built-in modules, or JSON modules, <ins>or buffer modules, </ins>or CSS modules.</emu-note>
87+
<emu-note>A Synthetic Module Record could be used for defining a variety of module types: for example, built-in modules, or JSON modules, <ins>or bytes modules, </ins>or CSS modules.</emu-note>
8888

8989
<p>In addition to the fields defined in <emu-xref href="#table-module-record-fields"></emu-xref> Synthetic Module Records have the additional fields listed in <emu-xref href="#table-synthetic-module-record-fields"></emu-xref>. Each of these fields is initially set in CreateSyntheticModule.</p>
9090

@@ -110,10 +110,10 @@ contributors: Steven, Guy Bedford
110110
</table>
111111
</emu-table>
112112

113-
<emu-clause id="sec-create-buffer-module" type="abstract operation">
113+
<emu-clause id="sec-create-bytes-module" type="abstract operation">
114114
<h1>
115115
<ins>
116-
CreateBufferModule (
116+
CreateBytesModule (
117117
_arrayBuffer_: an immutable ArrayBuffer or a SharedArrayBuffer
118118
): a Synthetic Module Record
119119
</ins>

0 commit comments

Comments
 (0)