@@ -809,7 +809,7 @@ Note: Implementations may optionally replace the NaN payload with any other NaN
809
809
</div>
810
810
811
811
<div algorithm>
812
- The algorithm <dfn>ToWebAssemblyValue</dfn> (|v|, |type|, |error|) coerce a JavaScript value to a [=WebAssembly value=] performs the following steps:
812
+ The algorithm <dfn>ToWebAssemblyValue</dfn> (|v|, |type|, |error|) coerces a JavaScript value to a [=WebAssembly value=] performs the following steps:
813
813
814
814
815
815
Assert: |type| is not [=𝗂𝟨𝟦=] .
@@ -829,7 +829,7 @@ Assert: |type| is not [=𝗂𝟨𝟦=].
829
829
1. If |v| is a primitive value but not a symbol or null, throw |error|.
830
830
1. Return the result of [=allocating a host address=] for |v|.
831
831
1. If |type| is [=anyfunc=] ,
832
- 1. If |v| is not callable or null, throw |error|.
832
+ 1. If |v| is not an [=Exported function=] or null, throw |error|.
833
833
1. Return the result of [=allocating a host address=] for |v|.
834
834
835
835
</div>
@@ -838,11 +838,8 @@ Assert: |type| is not [=𝗂𝟨𝟦=].
838
838
For <dfn>allocating a host address</dfn> for a value |v|, perform the following steps:
839
839
1. If |v| is null,
840
840
1. Return [=ref.null=] .
841
- 1. If |v| is callable,
842
- 1. If |v| has a \[[FunctionAddress]] internal slot, and therefore is an [=Exported Function=] ,
843
- 1. Let |funcaddr| be the value of |v|'s \[[FunctionAddress]] internal slot.
844
- 1. Otherwise,
845
- 1. [=Create a host function=] from |v| and let |funcaddr| be the result.
841
+ 1. If |v| is an [=Exported Function=] ,
842
+ 1. Let |funcaddr| be the value of |v|'s \[[FunctionAddress]] internal slot.
846
843
1. Return [=ref.func=] |funcaddr|.
847
844
1. Let |map| be the [=surrounding agent=] 's associated [=host value cache=] .
848
845
1. If a [=host address=] |hostaddr| exists such that |map|[|hostaddr|] is the same as |v|,
0 commit comments