(f: impl FnOnce(&VirtualMachine) -> R)
| 69 | scoped_tls::scoped_thread_local!(static VM_CURRENT: VirtualMachine); |
| 70 | |
| 71 | pub fn with_current_vm<R>(f: impl FnOnce(&VirtualMachine) -> R) -> R { |
| 72 | if !VM_CURRENT.is_set() { |
| 73 | panic!("call with_current_vm() but VM_CURRENT is null"); |
| 74 | } |
| 75 | VM_CURRENT.with(f) |
| 76 | } |
| 77 | |
| 78 | pub fn enter_vm<R>(vm: &VirtualMachine, f: impl FnOnce() -> R) -> R { |
| 79 | VM_STACK.with(|vms| { |
no test coverage detected