gwr/execution/stack
Types
Activation frames carry the return arity
https://webassembly.github.io/spec/core/exec/runtime.html#activation-frames
pub type ActivationFrame {
ActivationFrame(arity: Int, framestate: FrameState)
}
Constructors
-
ActivationFrame(arity: Int, framestate: FrameState)
https://webassembly.github.io/spec/core/exec/runtime.html#activation-frames
pub type FrameState {
FrameState(
locals: List(runtime.Value),
module_instance: runtime.ModuleInstance,
)
}
Constructors
-
FrameState( locals: List(runtime.Value), module_instance: runtime.ModuleInstance, )
Labels carry an argument arity
https://webassembly.github.io/spec/core/exec/runtime.html#labels
pub type Label {
Label(arity: Int, target: List(instruction.Instruction))
}
Constructors
-
Label(arity: Int, target: List(instruction.Instruction))
https://webassembly.github.io/spec/core/exec/runtime.html#stack
pub type Stack {
Stack(entries: List(StackEntry))
}
Constructors
-
Stack(entries: List(StackEntry))
https://webassembly.github.io/spec/core/exec/runtime.html#stack
pub type StackEntry {
ValueEntry(runtime.Value)
LabelEntry(Label)
ActivationEntry(ActivationFrame)
}
Constructors
-
ValueEntry(runtime.Value)
-
LabelEntry(Label)
-
ActivationEntry(ActivationFrame)
Functions
pub fn pop_repeat(
from stack: Stack,
up_to count: Int,
) -> #(Stack, List(Option(StackEntry)))