Module stack

Module stack 

Source

Re-exports§

pub use patch_seq_drop_op as drop_op;
pub use patch_seq_dup as dup;
pub use patch_seq_nip as nip;
pub use patch_seq_over as over;
pub use patch_seq_pick_op as pick_op;
pub use patch_seq_push_value as push_value;
pub use patch_seq_roll as roll;
pub use patch_seq_rot as rot;
pub use patch_seq_swap as swap;
pub use patch_seq_tuck as tuck;

Structs§

StackNode
StackNode: Implementation detail of the stack

Functions§

clone_stack
Clone a stack - creates a deep copy of all values
drop
Drop the top value from the stack: ( a – )
is_empty
Check if the stack is empty
patch_seq_drop_op
Alias for drop to avoid LLVM keyword conflicts
patch_seq_dup
Duplicate the top value on the stack: ( a – a a )
patch_seq_nip
Remove the second value: ( a b – b )
patch_seq_over
Copy the second value to the top: ( a b – a b a )
patch_seq_pick_op
Pick operation exposed to compiler
patch_seq_push_value
Push an arbitrary Value onto the stack (for LLVM codegen)
patch_seq_roll
Roll: Rotate n+1 items, bringing the item at depth n to the top ( x_n x_(n-1) … x_1 x_0 n – x_(n-1) … x_1 x_0 x_n )
patch_seq_rot
Rotate the top three values: ( a b c – b c a )
patch_seq_swap
Swap the top two values: ( a b – b a )
patch_seq_tuck
Copy top value below second value: ( a b – b a b )
peek
Peek at the top value without removing it
pick
Pick: Copy the nth value to the top (0-indexed from top) ( … xn … x1 x0 n – … xn … x1 x0 xn )
pop
Pop a value from the stack
pop_two
Pop two values from the stack (for binary operations)
push
Push a value onto the stack

Type Aliases§

Stack
Stack: A pointer to the top of the stack