MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / in_vm

Function in_vm

compiler/src/main/mod.rs:161–163  ·  view source on GitHub ↗

`with_vm` that errors when called outside run(). */

(err: &'static str, f: impl FnOnce(&mut VM<'static>) -> Result<Val, VmErr>)

Source from the content-addressed store, hash-verified

159
160/* `with_vm` that errors when called outside run(). */
161pub(super) fn in_vm(err: &'static str, f: impl FnOnce(&mut VM<'static>) -> Result<Val, VmErr>) -> Result<Val, VmErr> {
162 with_vm(f).ok_or(VmErr::Runtime(err))?
163}
164
165pub(super) unsafe fn write_out(s: &str) -> usize {
166 let b = s.as_bytes();

Callers 5

dispatch_new_dictFunction · 0.85
dispatch_new_listFunction · 0.85
dispatch_new_tupleFunction · 0.85
dispatch_new_setFunction · 0.85
dispatch_new_frozensetFunction · 0.85

Calls 1

with_vmFunction · 0.85

Tested by

no test coverage detected