You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -395,7 +393,7 @@ A {{Module}} object represents a single WebAssembly module. Each {{Module}} obje
395
393
1. Let |index| be the number of external functions in |imports|. This value |index| is known as the <dfn>index of the host function</dfn> |funcaddr|.
396
394
1. Let |externfunc| be the [=external value=][=external value|func=] |funcaddr|.
397
395
1. [=list/Append=] |externfunc| to |imports|.
398
-
1. If |externtype| is of the form [=global=]<var ignore>mut</var> |valtype|,
396
+
1. If |externtype| is of the form [=external-type/global=]<var ignore>mut</var> |valtype|,
399
397
1. If |v| [=implements=]{{Global}},
400
398
1. Let |globaladdr| be |v|.\[[Global]].
401
399
1. Otherwise,
@@ -411,16 +409,16 @@ A {{Module}} object represents a single WebAssembly module. Each {{Module}} obje
411
409
1. Set the [=surrounding agent=]'s [=associated store=] to |store|.
412
410
1. Let |externglobal| be [=external value|global=] |globaladdr|.
413
411
1. [=list/Append=] |externglobal| to |imports|.
414
-
1. If |externtype| is of the form [=mem=]<var ignore>memtype</var>,
412
+
1. If |externtype| is of the form [=external-type/mem=]<var ignore>memtype</var>,
415
413
1. If |v| does not [=implement=]{{Memory}}, throw a {{LinkError}} exception.
416
414
1. Let |externmem| be the [=external value=][=external value|mem=] |v|.\[[Memory]].
417
415
1. [=list/Append=] |externmem| to |imports|.
418
-
1. If |externtype| is of the form [=table=]<var ignore>tabletype</var>,
416
+
1. If |externtype| is of the form [=external-type/table=]<var ignore>tabletype</var>,
419
417
1. If |v| does not [=implement=]{{Table}}, throw a {{LinkError}} exception.
420
418
1. Let |tableaddr| be |v|.\[[Table]].
421
419
1. Let |externtable| be the [=external value=][=external value|table=] |tableaddr|.
422
420
1. [=list/Append=] |externtable| to |imports|.
423
-
1. If |externtype| is of the form [=externtype/tag=] |attribute| <var ignore>functype</var>,
421
+
1. If |externtype| is of the form [=external-type/tag=] |attribute| <var ignore>functype</var>,
424
422
1. Assert: |attribute| is [=tagtype/attribute/exception=].
425
423
1. If |v| does not [=implement=]{{Tag}}, throw a {{LinkError}} exception.
426
424
1. Let |tagaddr| be |v|.\[[Address]].
@@ -444,22 +442,22 @@ The verification of WebAssembly type requirements is deferred to the
444
442
1. Let [=external value|func=] |funcaddr| be |externval|.
445
443
1. Let |func| be the result of creating [=a new Exported Function=] from |funcaddr|.
446
444
1. Let |value| be |func|.
447
-
1. If |externtype| is of the form [=global=]<var ignore>mut</var><var ignore>globaltype</var>,
445
+
1. If |externtype| is of the form [=external-type/global=]<var ignore>mut</var><var ignore>globaltype</var>,
448
446
1. Assert: |externval| is of the form [=external value|global=] |globaladdr|.
449
447
1. Let [=external value|global=] |globaladdr| be |externval|.
450
448
1. Let |global| be [=create a global object|a new Global object=] created from |globaladdr|.
451
449
1. Let |value| be |global|.
452
-
1. If |externtype| is of the form [=mem=]<var ignore>memtype</var>,
450
+
1. If |externtype| is of the form [=external-type/mem=]<var ignore>memtype</var>,
453
451
1. Assert: |externval| is of the form [=external value|mem=] |memaddr|.
454
452
1. Let [=external value|mem=] |memaddr| be |externval|.
455
453
1. Let |memory| be [=create a memory object|a new Memory object=] created from |memaddr|.
456
454
1. Let |value| be |memory|.
457
-
1. If |externtype| is of the form [=table=]<var ignore>tabletype</var>,
455
+
1. If |externtype| is of the form [=external-type/table=]<var ignore>tabletype</var>,
458
456
1. Assert: |externval| is of the form [=external value|table=] |tableaddr|.
459
457
1. Let [=external value|table=] |tableaddr| be |externval|.
460
458
1. Let |table| be [=create a Table object|a new Table object=] created from |tableaddr|.
461
459
1. Let |value| be |table|.
462
-
1. If |externtype| is of the form [=externtype/tag=] |attribute| <var ignore>functype</var>,
460
+
1. If |externtype| is of the form [=external-type/tag=] |attribute| <var ignore>functype</var>,
463
461
1. Assert: |attribute| is [=tagtype/attribute/exception=].
464
462
1. Assert: |externval| is of the form [=external value/tag=] |tagaddr|.
465
463
1. Let [=external value/tag=] |tagaddr| be |externval|.
@@ -582,10 +580,10 @@ interface Module {
582
580
<div algorithm>
583
581
The <dfn>string value of the extern type</dfn> |type| is
584
582
* "function" if |type| is of the form [=external-type/func=]<var ignore>functype</var>
585
-
* "table" if |type| is of the form [=table=]<var ignore>tabletype</var>
586
-
* "memory" if |type| is of the form [=mem=]<var ignore>memtype</var>
587
-
* "global" if |type| is of the form [=global=]<var ignore>globaltype</var>
588
-
* "tag" if |type| is of the form [=externtype/tag=]<var ignore>tag</var>
583
+
* "table" if |type| is of the form [=external-type/table=]<var ignore>tabletype</var>
584
+
* "memory" if |type| is of the form [=external-type/mem=]<var ignore>memtype</var>
585
+
* "global" if |type| is of the form [=external-type/global=]<var ignore>globaltype</var>
586
+
* "tag" if |type| is of the form [=external-type/tag=]<var ignore>tag</var>
589
587
</div>
590
588
591
589
<div algorithm>
@@ -818,7 +816,8 @@ Immediately after a WebAssembly [=memory.grow=] instruction executes, perform th
818
816
{{ArrayBuffer}} objects returned by a {{Memory}} object must have a size that is a multiple of a WebAssembly [=page size=] (the constant 65536). For this reason [=HostResizeArrayBuffer=] is redefined as follows.
819
817
820
818
<div algorithm>
821
-
The <dfn>abstract operation [=HostResizeArrayBuffer=]</dfn> takes arguments |buffer| (an {{ArrayBuffer}}) and |newLength|. It performs the following steps when called.
819
+
820
+
The <dfn id=HostResizeArrayBuffer export>abstract operation [=HostResizeArrayBuffer=]</dfn> takes arguments |buffer| (an {{ArrayBuffer}}) and |newLength|. It performs the following steps when called.
822
821
823
822
1. If |buffer|.\[[ArrayBufferDetachKey]] is "WebAssembly.Memory",
824
823
1. Let |map| be the [=surrounding agent=]'s associated [=Memory object cache=].
@@ -1149,7 +1148,7 @@ This slot holds a [=function address=] relative to the [=surrounding agent=]'s [
1149
1148
1. Let |payload| be [=exn_read=](|store|, |exnaddr|).
1150
1149
1. Let |jsTagAddr| be the result of [=get the JavaScript exception tag |getting the JavaScript exception tag=].
1151
1150
1. If |tagaddr| is equal to |jsTagAddr|,
1152
-
1. Throw the result of [=retrieving an extern value=] from |payload|[0].
1151
+
1. Throw the result of [=retrieving a host value=] from |payload|[0].
1153
1152
1. Otherwise,
1154
1153
1. Let |exception| be [=create an Exception object|a new Exception=] created from |exnaddr|.
1155
1154
1. Throw |exception|.
@@ -1180,7 +1179,7 @@ Note: Exported Functions do not have a \[[Construct]] method and thus it is not
1180
1179
1. If |resultsSize| is 0, return « ».
1181
1180
1. Otherwise, if |resultsSize| is 1, return « [=?=][=ToWebAssemblyValue=](|ret|, |results|[0]) ».
1182
1181
1. Otherwise,
1183
-
1. Let |method| be [=?=][$GetMethod$](|ret|, {{@@iterator}}).
1182
+
1. Let |method| be [=?=][$GetMethod$](|ret|, {{%Symbol.iterator%}}).
1184
1183
1. If |method| is undefined, [=throw=] a {{TypeError}}.
1185
1184
1. Let |values| be [=?=][$IteratorToList$]([=?=][$GetIteratorFromMethod$](|ret|, |method|)).
1186
1185
1. Let |wasmValues| be a new, empty [=list=].
@@ -1229,7 +1228,7 @@ The algorithm <dfn>ToJSValue</dfn>(|w|) coerces a [=WebAssembly value=] to a Jav
1229
1228
1. If |w| is of the form [=i64.const=] |u64|,
1230
1229
1. Let |i64| be [=signed_64=](|u64|).
1231
1230
1. Return [=ℤ=](|i64| interpreted as a mathematical value).
1232
-
1. If |w| is of the form [=i32.const=] |u32|,
1231
+
1. If |w| is of the form [=i32.const=] |i32|,
1233
1232
1. Let |i32| be [=signed_32=](|i32|).
1234
1233
2. Return [=𝔽=](|i32| interpreted as a mathematical value).
1235
1234
1. If |w| is of the form [=f32.const=] |f32|,
@@ -1240,15 +1239,15 @@ The algorithm <dfn>ToJSValue</dfn>(|w|) coerces a [=WebAssembly value=] to a Jav
1240
1239
1. If |f64| is [=+∞=] or [=−∞=], return **+∞**<sub>𝔽</sub> or **-∞**<sub>𝔽</sub>, respectively.
1241
1240
1. If |f64| is [=nan=], return **NaN**.
1242
1241
1. Return [=𝔽=](|f64| interpreted as a mathematical value).
1243
-
1. If |w| is of the form [=ref.null=]|t|, return null.
1242
+
1. If |w| is of the form [=ref.null=]<var ignore>t</var>, return null.
1244
1243
1. If |w| is of the form [=ref.i31=] |u31|,
1245
1244
1. Let |i31| be [=signed_31=](|u31|).
1246
1245
1. Let return [=𝔽=](|i31|).
1247
1246
1. If |w| is of the form [=ref.struct=] |structaddr|, return the result of creating [=a new Exported GC Object=] from |structaddr| and "struct".
1248
1247
1. If |w| is of the form [=ref.array=] |arrayaddr|, return the result of creating [=a new Exported GC Object=] from |arrayaddr| and "array".
1249
1248
1. If |w| is of the form [=ref.func=] |funcaddr|, return the result of creating [=a new Exported Function=] from |funcaddr|.
1250
1249
1. If |w| is of the form [=ref.host=] |hostaddr|, return the result of [=retrieving a host value=] from |hostaddr|.
1251
-
1. If |w| is of the form [=ref.extern=]<var ignore>ref</var>, return [=ToJSValue=](|ref|).
1250
+
1. If |w| is of the form [=ref.extern=]|ref|, return [=ToJSValue=](|ref|).
1252
1251
1253
1252
1254
1253
Note: Number values which are equal to NaN may have various observable NaN payloads; see [$NumericToRawBytes$] for details.
@@ -1334,8 +1333,6 @@ The algorithm <dfn>ToWebAssemblyValue</dfn>(|v|, |type|) coerces a JavaScript va
1334
1333
1335
1334
The <dfn>tag_alloc</dfn>(|store|, |parameters|) algorithm creates a new [=tag address=] for |parameters| in |store| and returns the updated store and the [=tag address=].
1336
1335
1337
-
The <dfn>tag_parameters</dfn>(|store|, |tagAddress|) algorithm returns the [=list=] of types for |tagAddress| in |store|.
1338
-
1339
1336
<h4 id="tag-types">Tag types</h4>
1340
1337
1341
1338
<pre class="idl">
@@ -1494,7 +1491,7 @@ The internal methods of an [=Exported GC Object=] use the following implementati
1494
1491
1. Set |object|.\[[OwnPropertyKeys]] as specified in [=[[OwnPropertyKeys]] internal method of an Exported GC Object=].
1495
1492
1. [=map/Set=] |map|[|objectaddr|] to |object|.
1496
1493
1. Return |object|.
1497
-
1494
+
</div>
1498
1495
1499
1496
<h3 id="exceptions">Exceptions</h3>
1500
1497
@@ -1639,7 +1636,7 @@ When the [=namespace object=] for the {{WebAssembly}} namespace is [=create a na
1639
1636
1. Let |namespaceObject| be the [=namespace object=].
1640
1637
1. [=list/iterate|For each=] |error| of « "CompileError", "LinkError", "RuntimeError" »,
1641
1638
1. Let |constructor| be a new object, implementing the [=NativeError Object Structure=], with <var ignore>NativeError</var> set to |error|.
Copy file name to clipboardExpand all lines: proposals/simd/SIMD.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ packed data in one instruction. These are commonly used to improve performance
18
18
for multimedia applications. The set of SIMD instructions in hardware is large,
19
19
and varies across different versions of hardware. This proposal is comprised
20
20
of a portable subset of operations that in most cases map to commonly used
21
-
instructions in mordern hardware.
21
+
instructions in modern hardware.
22
22
23
23
24
24
# Types
@@ -136,14 +136,14 @@ Accessing WebAssembly module imports or exports containing SIMD Type from JavaSc
136
136
137
137
### Module Function Imports
138
138
139
-
Calling an imported function from JavaScript when the function arguments or result is of type v128 will cause the host function to immidiately throw a [`TypeError`](https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-typeerror).
139
+
Calling an imported function from JavaScript when the function arguments or result is of type v128 will cause the host function to immediately throw a [`TypeError`](https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-typeerror).
140
140
141
141
### Exported Function Exotic Objects
142
142
143
-
Invoking the [[Call]] method of an Exported Function Exotic Object when the function type of its [[Closure]] has an argument or result of type v128 will cause the host function to immidiately throw a [`TypeError`](https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-typeerror).
143
+
Invoking the [[Call]] method of an Exported Function Exotic Object when the function type of its [[Closure]] has an argument or result of type v128 will cause the host function to immediately throw a [`TypeError`](https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-typeerror).
144
144
145
145
146
-
## WebAssembly Module Instatiation
146
+
## WebAssembly Module Instantiation
147
147
148
148
Instantiating a WebAssembly Module from a Module moduleObject will throw a LinkError exception, when the global's valtype is v128 and the imported objects type is not WebAssembly.Global.
0 commit comments