Module stack_manager

Source
Expand description

§Stack Manager

Provides concrete implementation of stack operations for the VM executor. Manages the execution stack and implements the StackOperations trait to provide stack manipulation functionality.

§Overview

The stack manager wraps the low-level Stack implementation and provides a high-level interface for stack operations including:

  • Push/Pop Operations: Adding and removing values
  • Inspection: Peeking at values without modification
  • Management: Clearing, sizing, and state checking

§Usage

use jetcrab::vm::executor::stack_manager::StackManager;
use jetcrab::vm::executor::traits::StackOperations;
use jetcrab::vm::value::Value;

let mut stack_manager = StackManager::new();
stack_manager.push(Value::Number(42.0));
let value = stack_manager.pop();

Structs§

StackManager
Concrete implementation of stack operations for the VM