Skip to main content

Class BlockInstruction

Base of block instructions.

Assembly: WaaS.Core.dll
Declaration
public abstract class BlockInstruction : Instruction

Inheritance: System.Object -> WaaS.Models.Instruction

Derived:
WaaS.Models.Block, WaaS.Models.If, WaaS.Models.Loop

Properties

BlockType

View Source
Declaration
public BlockType BlockType { get; }

End

View Source
Declaration
public End End { get; }

Arity

View Source
Declaration
public abstract uint Arity { get; }

Methods

PreValidateStackState(in ValidationContext)

Get the number of values to pop and push from the stack to validate stack depth.

View Source
Declaration
public override (uint popCount, uint pushCount) PreValidateStackState(in ValidationContext context)
Returns

System.ValueTuple<System.UInt32,System.UInt32>

Parameters
TypeName
WaaS.Models.ValidationContextcontext

ValidateStackState(in ValidationContext, ref ValidationBlockStackState)

Simulates stack operations to validate the stack state.

View Source
Declaration
public override void ValidateStackState(in ValidationContext context, ref ValidationBlockStackState stackState)
Parameters
TypeName
WaaS.Models.ValidationContextcontext
WaaS.Models.ValidationBlockStackStatestackState

OnBeforeBlockEnter(WasmStackFrame, out uint)

View Source
Declaration
protected abstract void OnBeforeBlockEnter(WasmStackFrame current, out uint continuationIndex)
Parameters
TypeName
WaaS.Runtime.WasmStackFramecurrent
System.UInt32continuationIndex

Execute(WasmStackFrame)

Executes the instruction.

View Source
Declaration
public override sealed void Execute(WasmStackFrame current)
Parameters
TypeName
WaaS.Runtime.WasmStackFramecurrent

InjectDelimiter(BlockDelimiterInstruction)

View Source
Declaration
public virtual void InjectDelimiter(BlockDelimiterInstruction delimiter)
Parameters
TypeName
WaaS.Models.BlockDelimiterInstructiondelimiter