Expand description
§Heap Manager
Provides concrete implementation of heap operations for the VM executor.
Manages object allocation, property access, and memory management
through the HeapOperations trait implementation.
§Overview
The heap manager wraps the low-level Heap implementation and provides
a high-level interface for heap operations including:
- Object Allocation: Creating objects, arrays, and functions
- Property Access: Getting and setting object properties
- Array Operations: Manipulating array elements
- Memory Management: Interfacing with garbage collection
§Usage
use jetcrab::vm::executor::heap_manager::HeapManager;
use jetcrab::vm::executor::traits::HeapOperations;
use jetcrab::vm::value::Value;
let mut heap_manager = HeapManager::new();
let object_id = heap_manager.alloc_object();
heap_manager.set_object_property(object_id, "key".to_string(), Value::Number(42.0));Structs§
- Heap
Manager - Concrete implementation of heap operations for the VM