ElementSegmentValidator

ElementSegmentValidator

object ElementSegmentValidator

Validator of ElementSegment nodes.

From the docs:

  • The table C.tables[x] must be defined in the context.
  • Let limits elemtype be the table type C.tables[x].
  • The element type elemtype must be funcref.
  • The expression expr must be valid with result type [i32].
  • The expression expr must be constant.
  • For each y_i in y*, the function C.funcs[y] must be defined in the context.
  • Then the element segment is valid.

Methods

visit

fun visit(node: ElementSegment, context: Module): Module

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

Parameters

Name Description
node: ElementSegment
context: Module

ReturnValue

Name Description
Module