A range element as a Val, promoting magnitudes beyond the 47-bit inline range to LongInt. */
(heap: &mut HeapPool, i: i64)
| 8 | |
| 9 | /* A range element as a Val, promoting magnitudes beyond the 47-bit inline range to LongInt. */ |
| 10 | pub(crate) fn range_int(heap: &mut HeapPool, i: i64) -> Result<Val, VmErr> { |
| 11 | if (Val::INT_MIN..=Val::INT_MAX).contains(&i) { Ok(Val::int(i)) } |
| 12 | else { heap.alloc(HeapObj::LongInt(i as i128)) } |
| 13 | } |
| 14 | |
| 15 | // Lazy walker for short-circuit builtins; Vec variant copies because list/set/dict can't stream without a mutable heap borrow. |
| 16 | pub(crate) enum IterCursor { |
no test coverage detected