Kwasm.validation.instruction
package kwasm.validation.instruction
Classes
Name | Description |
---|---|
class ExpressionValidator
|
Validator of Expression nodes. From the docs: Expressions
Constant Expressions
|
class InstructionSequenceValidator
|
Validator of sequences of Instruction nodes. From the docs:Typing of instruction sequences is defined recursively. Empty Instruction Sequence:
Non-empty Instruction Sequence:
|
object InstructionValidator
|
Validates Instruction nodes by multiplexing out to implementation-specific variants. |
object MemoryInstructionValidator
|
Validator of MemoryInstruction nodes by multiplexing into specific validators for each type. See: LoadIntValidator, StoreIntValidator, LoadFloatValidator, StoreFloatValidator, SizeValidator, GrowValidator |
object NumericConstantInstructionValidator
|
Validates NumericConstantInstruction nodes. From the docs:
|
object NumericInstructionValidator
|
Validates NumericInstruction nodes. From the docs:
|
object ParametricInstructionValidator
|
Validator of ParametricInstruction nodes. From the docs:
|
object VariableInstructionValidator
|
Validator of VariableInstruction nodes. From the docs:
|
Subpackages
Name | Description |
---|---|
package kwasm.validation.instruction.control
|
|
package kwasm.validation.instruction.memory
|
Methods
validate
fun Expression.validate(expectedResult: ValueType?, context: FunctionBody): FunctionBody
Receiver
Name | Description |
---|---|
Expression
|
Parameters
Name | Description |
---|---|
expectedResult: ValueType?
|
|
context: FunctionBody
|
ReturnValue
Name | Description |
---|---|
FunctionBody
|
validate
fun Instruction.validate(context: FunctionBody): FunctionBody
Validates the Instruction.
Receiver
Name | Description |
---|---|
Instruction
|
Parameters
Name | Description |
---|---|
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
|
validate
fun List<Instruction>.validate(context: FunctionBody, requiredEndStack: List<ValueType>?, strictEndStackMatchRequired: Boolean): FunctionBody
Validates a sequence of Instructions.
Receiver
Name | Description |
---|---|
List<Instruction>
|
Parameters
Name | Description |
---|---|
context: FunctionBody
|
|
requiredEndStack: List<ValueType>?
|
see InstructionSequenceValidator.requiredEndStack |
strictEndStackMatchRequired: Boolean
|
see InstructionSequenceValidator.strictEndStackMatchRequired |
ReturnValue
Name | Description |
---|---|
FunctionBody
|
Validates a non-constant Expression node.