Expression

Expression

data class Expression

Representation of an "expression" in WASM.

According to the docs, an Expression is a possibly-empty list of Instructions.

Fields

Name Description
val instructions: List<Instruction>

Constructors

<init>

constructor(instructions: List<Instruction>)

Representation of an "expression" in WASM.

According to the docs, an Expression is a possibly-empty list of Instructions.

Parameters

Name Description
instructions: List<Instruction>

Extensions

validate

fun Expression.validate(expectedResult: ValueType?, context: FunctionBody): FunctionBody

Validates a non-constant Expression node.

Receiver

Name Description
Expression

Parameters

Name Description
expectedResult: ValueType?
context: FunctionBody

ReturnValue

Name Description
FunctionBody

validateConstant

fun Expression.validateConstant(expectedResult: ValueType?, context: FunctionBody): FunctionBody

Validates a constant Expression node.

Receiver

Name Description
Expression

Parameters

Name Description
expectedResult: ValueType?
context: FunctionBody

ReturnValue

Name Description
FunctionBody