PlainValidator

PlainValidator

object PlainValidator

Validator of "plain" (non-kwasm.ast.instruction.BlockInstruction) ControlInstruction nodes.

From the docs:


nop
  • The instruction is valid with type [] => [].

unreachable

  • The instruction is valid with type [t*1] => [t*2], for any sequences of value types t*1 and t*2.

For the other types, see the validate extension functions on ControlInstruction.Break, ControlInstruction.BreakIf, ControlInstruction.BreakTable, ControlInstruction.Return, ControlInstruction.Call, and ControlInstruction.CallIndirect.

Methods

visit

fun visit(node: ControlInstruction, context: FunctionBody): FunctionBody

Validates the given node, and if necessary: its children (recursively, using other ValidationVisitor instances).

Parameters

Name Description
node: ControlInstruction
context: FunctionBody

ReturnValue

Name Description
FunctionBody