MCPcopy Index your code
hub / github.com/RustPython/RustPython / new_code

Method new_code

crates/vm/src/vm/context.rs:751–754  ·  view source on GitHub ↗
(&self, code: impl code::IntoCodeObject)

Source from the content-addressed store, hash-verified

749 }
750
751 pub fn new_code(&self, code: impl code::IntoCodeObject) -> PyRef<PyCode> {
752 let code = code.into_code_object(self);
753 PyRef::new_ref(PyCode::new(code), self.types.code_type.to_owned(), None)
754 }
755}
756
757impl AsRef<Self> for Context {

Callers 11

get_pipFunction · 0.45
runFunction · 0.45
make_frozenFunction · 0.45
import_frozenFunction · 0.45
get_frozen_objectFunction · 0.45
make_codeMethod · 0.45
compileFunction · 0.45
make_constantMethod · 0.45
make_codeMethod · 0.45
to_pyobjectMethod · 0.45
compile_with_optsMethod · 0.45

Calls 3

newFunction · 0.85
into_code_objectMethod · 0.80
to_ownedMethod · 0.45

Tested by

no test coverage detected