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
WebRef has recently added definitions for ECMAScript, which means most of the explicit anchor definitions are no longer needed. Also, some abstract operations had their names changed.
This change should be entirely editorial.
@@ -367,11 +313,11 @@ A {{Module}} object represents a single WebAssembly module. Each {{Module}} obje
367
313
1. If |module|.[=imports=][=list/is empty|is not empty=], and |importObject| is undefined, throw a {{TypeError}} exception.
368
314
1. Let |imports| be « ».
369
315
1. [=list/iterate|For each=] (|moduleName|, |componentName|, |externtype|) of [=module_imports=](|module|),
370
-
1. Let |o| be [=?=][=Get=](|importObject|, |moduleName|).
316
+
1. Let |o| be [=?=][$Get$](|importObject|, |moduleName|).
371
317
1. If [=Type=](|o|) is not Object, throw a {{TypeError}} exception.
372
-
1. Let |v| be [=?=][=Get=](|o|, |componentName|).
318
+
1. Let |v| be [=?=][$Get$](|o|, |componentName|).
373
319
1. If |externtype| is of the form [=func=] |functype|,
374
-
1. If [=IsCallable=](|v|) is false, throw a {{LinkError}} exception.
320
+
1. If [$IsCallable$](|v|) is false, throw a {{LinkError}} exception.
375
321
1. If |v| has a \[[FunctionAddress]] internal slot, and therefore is an [=Exported Function=],
376
322
1. Let |funcaddr| be the value of |v|'s \[[FunctionAddress]] internal slot.
377
323
1. Otherwise,
@@ -415,7 +361,7 @@ The verification of WebAssembly type requirements is deferred to the
415
361
416
362
<div algorithm>
417
363
To <dfn>create an exports object</dfn> from a WebAssembly module |module| and instance |instance|, perform the following steps:
418
-
1. Let |exportsObject| be [=!=][=ObjectCreate=](null).
364
+
1. Let |exportsObject| be [=!=][$OrdinaryObjectCreate$](null).
419
365
1. [=list/iterate|For each=] (|name|, |externtype|) of [=module_exports=](|module|),
420
366
1. Let |externval| be [=instance_export=](|instance|, |name|).
421
367
1. Assert: |externval| is not [=error=].
@@ -439,11 +385,11 @@ The verification of WebAssembly type requirements is deferred to the
439
385
1. Let [=external value|table=] |tableaddr| be |externval|.
440
386
1. Let |table| be [=create a Table object|a new Table object=] created from |tableaddr|.
441
387
1. Let |value| be |table|.
442
-
1. Let |status| be [=!=][=CreateDataProperty=](|exportsObject|, |name|, |value|).
388
+
1. Let |status| be [=!=][$CreateDataProperty$](|exportsObject|, |name|, |value|).
443
389
1. Assert: |status| is true.
444
390
445
391
Note: the validity and uniqueness checks performed during [=WebAssembly module validation=] ensure that each property name is valid and no properties are defined twice.
1. Let |buffer| be the result of [=create a memory buffer|creating a memory buffer=] from |memaddr|.
711
657
1. Set |memory|.\[[BufferObject]] to |buffer|.
712
658
</div>
@@ -990,13 +936,13 @@ This slot holds a [=function address=] relative to the [=surrounding agent=]'s [
990
936
1. Let |store| be the [=surrounding agent=]'s [=associated store=].
991
937
1. Let |funcinst| be |store|.funcs[|funcaddr|].
992
938
1. If |funcinst| is of the form {type <var ignore>functype</var>, hostcode |hostfunc|},
993
-
1. Assert: |hostfunc| is a JavaScript object and [=IsCallable=](|hostfunc|) is true.
939
+
1. Assert: |hostfunc| is a JavaScript object and [$IsCallable$](|hostfunc|) is true.
994
940
1. Let |index| be the [=index of the host function=] |funcaddr|.
995
941
1. Otherwise,
996
942
1. Let |moduleinst| be |funcinst|.module.
997
943
1. Assert: |funcaddr| is contained in |moduleinst|.funcaddrs.
998
944
1. Let |index| be the index of |moduleinst|.funcaddrs where |funcaddr| is found.
999
-
1. Return [=!=][=ToString=](|index|).
945
+
1. Return [=!=][$ToString$](|index|).
1000
946
</div>
1001
947
1002
948
<div algorithm>
@@ -1012,7 +958,7 @@ This slot holds a [=function address=] relative to the [=surrounding agent=]'s [
1012
958
1. Let [|paramTypes|] → [<var ignore>resultTypes</var>] be |functype|.
1013
959
1. Let |arity| be |paramTypes|'s [=list/size=].
1014
960
1. Let |name| be the [=name of the WebAssembly function=] |funcaddr|.
1015
-
1. Let |function| be [=!=][=CreateBuiltinFunction=](|steps|, |arity|, |name|, « \[[FunctionAddress]] », |realm|).
961
+
1. Let |function| be [=!=][$CreateBuiltinFunction$](|steps|, |arity|, |name|, « \[[FunctionAddress]] », |realm|).
1016
962
1. Set |function|.\[[FunctionAddress]] to |funcaddr|.
1017
963
1. [=map/Set=] |map|[|funcaddr|] to |function|.
1018
964
1. Return |function|.
@@ -1044,7 +990,7 @@ This slot holds a [=function address=] relative to the [=surrounding agent=]'s [
1044
990
1. Let |values| be « ».
1045
991
1. [=list/iterate|For each=] |r| of |ret|,
1046
992
1. [=list/Append=][=ToJSValue=](|r|) to |values|.
1047
-
1. Return [=CreateArrayFromList=](|values|).
993
+
1. Return [$CreateArrayFromList$](|values|).
1048
994
</div>
1049
995
1050
996
Note: [=call an Exported Function|Calling an Exported Function=] executes in the \[[Realm]] of the callee Exported Function, as per the definition of [=built-in function objects=].
@@ -1059,14 +1005,14 @@ Note: Exported Functions do not have a \[[Construct]] method and thus it is not
1059
1005
1. Let |jsArguments| be « ».
1060
1006
1. [=list/iterate|For each=] |arg| of |arguments|,
1061
1007
1. [=list/Append=][=!=][=ToJSValue=](|arg|) to |jsArguments|.
1062
-
1. Let |ret| be [=?=][=Call=](|func|, undefined, |jsArguments|).
1008
+
1. Let |ret| be [=?=][$Call$](|func|, undefined, |jsArguments|).
1063
1009
1. Let |resultsSize| be |results|'s [=list/size=].
1064
1010
1. If |resultsSize| is 0, return « ».
1065
1011
1. Otherwise, if |resultsSize| is 1, return « [=?=][=ToWebAssemblyValue=](|ret|, |results|[0]) ».
1066
1012
1. Otherwise,
1067
-
1. Let |method| be [=?=][=GetMethod=](|ret|, [=@@iterator=]).
1013
+
1. Let |method| be [=?=][$GetMethod$](|ret|, {{@@iterator}}).
1068
1014
1. If |method| is undefined, [=throw=] a {{TypeError}}.
1069
-
1. Let |values| be [=?=][=IterableToList=](|ret|, |method|).
1015
+
1. Let |values| be [=?=][$IterableToList$](|ret|, |method|).
1070
1016
1. Let |wasmValues| be a new, empty [=list=].
1071
1017
1. If |values|'s [=list/size=] is not |resultsSize|, throw a {{TypeError}} exception.
1072
1018
1. For each |value| and |resultType| in |values| and |results|, paired linearly,
@@ -1077,11 +1023,11 @@ Note: Exported Functions do not have a \[[Construct]] method and thus it is not
1077
1023
<div algorithm>
1078
1024
To <dfn>create a host function</dfn> from the JavaScript object |func| and type |functype|, perform the following steps:
1079
1025
1080
-
1. Assert: [=IsCallable=](|func|).
1026
+
1. Assert: [$IsCallable$](|func|).
1081
1027
1. Let |stored settings| be the <a spec=HTML>incumbent settings object</a>.
1082
1028
1. Let |hostfunc| be a [=host function=] which performs the following steps when called with arguments |arguments|:
1083
1029
1. Let |realm| be |func|'s [=associated Realm=].
1084
-
1. Let |relevant settings| be |realm|'s [=Realm/settings object=].
1030
+
1. Let |relevant settings| be |realm|'s [=realm/settings object=].
1085
1031
1. [=Prepare to run script=] with |relevant settings|.
1086
1032
1. [=Prepare to run a callback=] with |stored settings|.
1087
1033
1. Let |result| be the result of [=run a host function|running a host function=] from |func|, |functype|, and |arguments|.
@@ -1116,7 +1062,7 @@ The algorithm <dfn>ToJSValue</dfn>(|w|) coerces a [=WebAssembly value=] to a Jav
1116
1062
1. If |w| is of the form [=ref.func=] |funcaddr|, return the result of creating [=a new Exported Function=] from |funcaddr|.
1117
1063
1. If |w| is of the form [=ref.extern=] |externaddr|, return the result of [=retrieving an extern value=] from |externaddr|.
1118
1064
1119
-
Note: Number values which are equal to NaN may have various observable NaN payloads; see [=NumberToRawBytes=] for details.
1065
+
Note: Number values which are equal to NaN may have various observable NaN payloads; see [$NumericToRawBytes$] for details.
1120
1066
</div>
1121
1067
1122
1068
<div algorithm>
@@ -1134,21 +1080,21 @@ The algorithm <dfn>ToWebAssemblyValue</dfn>(|v|, |type|) coerces a JavaScript va
1134
1080
1135
1081
1. Assert: |type| is not [=v128=].
1136
1082
1. If |type| is [=i64=],
1137
-
1. Let |i64| be [=?=][=ToBigInt64=](|v|).
1083
+
1. Let |i64| be [=?=][$ToBigInt64$](|v|).
1138
1084
1. Return [=i64.const=] |i64|.
1139
1085
1. If |type| is [=i32=],
1140
-
1. Let |i32| be [=?=][=ToInt32=](|v|).
1086
+
1. Let |i32| be [=?=][$ToInt32$](|v|).
1141
1087
1. Return [=i32.const=] |i32|.
1142
1088
1. If |type| is [=f32=],
1143
-
1. Let |number| be [=?=][=ToNumber=](|v|).
1089
+
1. Let |number| be [=?=][$ToNumber$](|v|).
1144
1090
1. If |number| is **NaN**,
1145
1091
1. Let |n| be an implementation-defined integer such that [=canon=]<sub>32</sub> ≤ |n| < 2<sup>[=signif=](32)</sup>.
1146
1092
1. Let |f32| be [=nan=](n).
1147
1093
1. Otherwise,
1148
1094
1. Let |f32| be |number| rounded to the nearest representable value using IEEE 754-2008 round to nearest, ties to even mode. [[IEEE-754]]
1149
1095
1. Return [=f32.const=] |f32|.
1150
1096
1. If |type| is [=f64=],
1151
-
1. Let |number| be [=?=][=ToNumber=](|v|).
1097
+
1. Let |number| be [=?=][$ToNumber$](|v|).
1152
1098
1. If |number| is **NaN**,
1153
1099
1. Let |n| be an implementation-defined integer such that [=canon=]<sub>64</sub> ≤ |n| < 2<sup>[=signif=](64)</sup>.
0 commit comments