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
{{ message }}
This repository was archived by the owner on Dec 22, 2021. It is now read-only.
@@ -363,6 +365,8 @@ A {{Module}} object represents a single WebAssembly module. Each {{Module}} obje
363
365
1. Throw a {{LinkError}} exception.
364
366
1. If |valtype| is not [=i64=] and [=Type=](|v|) is BigInt,
365
367
1. Throw a {{LinkError}} exception.
368
+
1. If |valtype| is [=v128=],
369
+
1. Throw a {{LinkError}} exception.
366
370
1. Let |value| be [=ToWebAssemblyValue=](|v|, |valtype|).
367
371
1. Let |store| be the [=surrounding agent=]'s [=associated store=].
368
372
1. Let (|store|, |globaladdr|) be [=global_alloc=](|store|, [=const=] |valtype|, |value|).
@@ -816,7 +820,8 @@ enum ValueType {
816
820
"i32",
817
821
"i64",
818
822
"f32",
819
-
"f64"
823
+
"f64",
824
+
"v128"
820
825
};
821
826
</pre>
822
827
@@ -866,6 +871,7 @@ which can be simultaneously referenced by multiple {{Instance}} objects. Each
866
871
1. If |s| equals "i64", return [=i64=].
867
872
1. If |s| equals "f32", return [=f32=].
868
873
1. If |s| equals "f64", return [=f64=].
874
+
1. If |s| equals "v128", return [=v128=].
869
875
</div>
870
876
871
877
<div algorithm>
@@ -881,6 +887,8 @@ which can be simultaneously referenced by multiple {{Instance}} objects. Each
881
887
The <dfn constructor for="Global">Global(|descriptor|, |v|)</dfn> constructor, when invoked, performs the following steps:
882
888
1. Let |mutable| be |descriptor|["mutable"].
883
889
1. Let |valuetype| be [=ToValueType=](|descriptor|["value"]).
890
+
1. If |valuetype| is [=v128=],
891
+
1. Throw a {{LinkError}} exception.
884
892
1. If |v| is undefined,
885
893
1. Let |value| be [=DefaultValue=](|valuetype|).
886
894
1. Otherwise,
@@ -896,6 +904,8 @@ which can be simultaneously referenced by multiple {{Instance}} objects. Each
896
904
The algorithm <dfn>GetGlobalValue</dfn>({{Global}} |global|) performs the following steps:
897
905
1. Let |store| be the current agent's [=associated store=].
898
906
1. Let |globaladdr| be |global|.\[[Global]].
907
+
1. Let |globaltype| be [=global_type=](|store|, |globaladdr|).
908
+
1. If |globaltype| is of the form <var ignore>mut</var>[=v128=], throw a {{TypeError}}.
899
909
1. Let |value| be [=global_read=](|store|, |globaladdr|).
900
910
1. Return [=ToJSValue=](|value|).
901
911
</div>
@@ -908,6 +918,7 @@ which can be simultaneously referenced by multiple {{Instance}} objects. Each
908
918
1. Let |store| be the current agent's [=associated store=].
909
919
1. Let |globaladdr| be **this**.\[[Global]].
910
920
1. Let |mut| |valuetype| be [=global_type=](|store|, |globaladdr|).
921
+
1. If |valuetype| is [=v128=], throw a {{TypeError}}.
911
922
1. If |mut| is [=const=], throw a {{TypeError}}.
912
923
1. Let |value| be [=ToWebAssemblyValue=](**the given value**, |valuetype|).
913
924
1. Let |store| be [=global_write=](|store|, |globaladdr|, |value|).
@@ -968,6 +979,9 @@ This slot holds a [=function address=] relative to the [=surrounding agent=]'s [
968
979
1. Let |store| be the [=surrounding agent=]'s [=associated store=].
969
980
1. Let |functype| be [=func_type=](|store|, |funcaddr|).
970
981
1. Let [|parameters|] → [<var ignore>results</var>] be |functype|.
982
+
1. If |parameters| or |results| contain [=v128=], throw a {{TypeError}}.
983
+
984
+
Note: the above error is thrown each time the \[[Call]] method is invoked.
971
985
1. Let |args| be « ».
972
986
1. Let |i| be 0.
973
987
1. [=list/iterate|For each=] |t| of |parameters|,
@@ -996,6 +1010,7 @@ Note: Exported Functions do not have a \[[Construct]] method and thus it is not
996
1010
To <dfn>run a host function</dfn> from the JavaScript object |func|, type |functype|, and [=list=] of [=WebAssembly values=] |arguments|, perform the following steps:
997
1011
998
1012
1. Let [<var ignore>parameters</var>] → [|results|] be |functype|.
1013
+
1. If |parameters| or |results| contain [=v128=], throw a {{TypeError}}.
999
1014
1. Let |jsArguments| be « ».
1000
1015
1. [=list/iterate|For each=] |arg| of |arguments|,
1001
1016
1. [=list/Append=] ! [=ToJSValue=](|arg|) to |jsArguments|.
@@ -1039,6 +1054,7 @@ Note: Exported Functions do not have a \[[Construct]] method and thus it is not
1039
1054
<div algorithm>
1040
1055
The algorithm <dfn>ToJSValue</dfn>(|w|) coerces a [=WebAssembly value=] to a JavaScript value by performing the following steps:
1041
1056
1057
+
1. Assert: |w| is not of the form [=v128.const=]<var ignore>v128</var>.
1042
1058
1. If |w| is of the form [=i64.const=] |i64|,
1043
1059
1. Let |v| be [=signed_64=](|i64|).
1044
1060
1. Return a [=BigInt=] representing the mathematical value |v|.
@@ -1053,6 +1069,7 @@ Note: Number values which are equal to NaN may have various observable NaN paylo
1053
1069
1054
1070
The algorithm <dfn>ToWebAssemblyValue</dfn>(|v|, |type|) coerces a JavaScript value to a [=WebAssembly value=] by performing the following steps:
0 commit comments