shape_vm/constants.rs
1//! VM constants and configuration values
2
3/// Default stack capacity for VM execution
4pub const DEFAULT_STACK_CAPACITY: usize = 1024;
5
6/// Maximum call stack depth
7pub const MAX_CALL_STACK_DEPTH: usize = 10000;
8
9/// Maximum stack size (safety limit)
10pub const MAX_STACK_SIZE: usize = 100_000;
11
12/// Initial capacity for the call stack Vec
13pub const DEFAULT_CALL_STACK_CAPACITY: usize = 64;
14
15/// Default GC trigger threshold (instructions between collections)
16pub const DEFAULT_GC_TRIGGER_THRESHOLD: usize = 1000;
17
18/// Maximum integer magnitude that can be losslessly represented as an f64.
19/// 2^53 = 9_007_199_254_740_992. Used by both arithmetic and comparison
20/// modules to reject mixed int/float operations that would lose precision.
21pub const EXACT_F64_INT_LIMIT: i128 = 9_007_199_254_740_992;