Skip to main content

Module tagged_stack

Module tagged_stack 

Source
Expand description

Tagged Stack Implementation

Selects between two implementations based on the tagged-ptr feature flag:

  • Default: 40-byte StackValue (5 x u64 struct)
  • tagged-ptr: 8-byte StackValue (tagged u64 pointer)

Structs§

TaggedStack
Stack state for the tagged value stack

Constants§

DEFAULT_STACK_CAPACITY
Default stack capacity (number of stack values)
STACK_VALUE_SIZE
Size of StackValue in bytes (8 bytes = 1 x u64)
TAG_FALSE
Tagged value for Bool false
TAG_TRUE
Tagged value for Bool true

Functions§

is_tagged_heap
Check if a tagged value is a heap pointer (not Int, not Bool)
is_tagged_int
Check if a tagged value is an inline integer
seq_stack_base
Safety
seq_stack_capacity
Safety
seq_stack_clone
Safety
seq_stack_free
Safety
seq_stack_grow
Safety
seq_stack_new
seq_stack_new_default
seq_stack_set_sp
Safety
seq_stack_sp
Safety
tag_int
Encode an i64 as a tagged integer.
untag_int
Decode a tagged integer back to i64 (arithmetic shift)

Type Aliases§

StackValue
An 8-byte tagged stack value.