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:localsset to the sequence of value typest*^1 t*, concatenating parameters and locals,labelsset to the singular sequence containing only result type[t?^2].returnset to the result type[t?^2].C′, the expressionexprmust be valid with typet?^2.[t*^1] => [t?^2].