WasmFunctionValidator
object WasmFunctionValidator
Methods
visit
fun visit(node: WasmFunction, context: Module): Module
Validates the given node, and if necessary: its children (recursively, using other ValidationVisitor instances).
Parameters
Name | Description |
---|---|
node: WasmFunction
|
|
context: Module
|
ReturnValue
Name | Description |
---|---|
Module
|
Validator of WasmFunction nodes.
From the docs:
C.types[x]
must be defined in the context.[t*^1] => [t?^2]
be the function typeC.types[x]
.Let
C′
be the same context asC
, but with:locals
set to the sequence of value typest*^1 t*
, concatenating parameters and locals,labels
set to the singular sequence containing only result type[t?^2]
.return
set to the result type[t?^2]
.C′
, the expressionexpr
must be valid with typet?^2
.[t*^1] => [t?^2]
.