(chunk: &'a SSAChunk, limits: Limits)
| 164 | pub fn new(chunk: &'a SSAChunk) -> Self { Self::with_limits(chunk, Limits::none()) } |
| 165 | |
| 166 | pub fn with_limits(chunk: &'a SSAChunk, limits: Limits) -> Self { |
| 167 | let sandbox_off = limits.ops == usize::MAX; |
| 168 | let mut vm = Self { |
| 169 | stack: Vec::with_capacity(256), |
| 170 | iter_stack: Vec::with_capacity(16), |
| 171 | yields: Vec::new(), |
| 172 | chunk, |
| 173 | heap: HeapPool::new(limits.heap), |
| 174 | globals: HashMap::default(), |
| 175 | module_state: HashMap::default(), |
| 176 | live_slots: Vec::new(), |
| 177 | templates: Templates::new(), |
| 178 | budget: limits.ops, |
| 179 | depth: 0, |
| 180 | max_calls: limits.calls, |
| 181 | with_stack: Vec::new(), |
| 182 | temp_roots: Vec::new(), |
| 183 | pending: Pending::new(), |
| 184 | next_host_call_id: 0, |
| 185 | pending_sync_frames: Vec::new(), |
| 186 | pending_exec_exc_base: None, |
| 187 | yielded: false, |
| 188 | yield_from_value: Val::none(), |
| 189 | resume_ip: 0, |
| 190 | strict_input: false, |
| 191 | output: Vec::new(), |
| 192 | output_open: false, |
| 193 | print_hook: None, |
| 194 | input_buffer: Vec::new(), |
| 195 | event_queue: Vec::new(), |
| 196 | observed_impure: Vec::new(), |
| 197 | mro_cache: HashMap::default(), |
| 198 | exception_stack: Vec::new(), |
| 199 | unwind_stack: Vec::new(), |
| 200 | handling_exc: None, |
| 201 | error_byte_pos: None, |
| 202 | module_table: HashMap::default(), |
| 203 | fn_module: Vec::new(), |
| 204 | function_names: Vec::new(), |
| 205 | call_stack: Vec::new(), |
| 206 | scheduler: Vec::new(), |
| 207 | waiting_for_children_count: 0, |
| 208 | time_hook: None, |
| 209 | virtual_clock_ns: 0, |
| 210 | functions: Vec::new(), |
| 211 | fn_index: Vec::new(), |
| 212 | function_parents: Vec::new(), |
| 213 | body_to_fi: HashMap::default(), |
| 214 | body_maps: Vec::new(), |
| 215 | param_slots: Vec::new(), |
| 216 | slot_templates: Vec::new(), |
| 217 | nonlocal_tables: Vec::new(), |
| 218 | needs_caller_slots: Vec::new(), |
| 219 | is_param_slot: Vec::new(), |
| 220 | body_free_loads: Vec::new(), |
| 221 | is_async: Vec::new(), |
| 222 | default_slots: Vec::new(), |
| 223 | self_ref_slot: Vec::new(), |
nothing calls this directly
no test coverage detected