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

Method compile

crates/vm/src/vm/compile.rs:12–19  ·  view source on GitHub ↗
(
        &self,
        source: &str,
        mode: compiler::Mode,
        source_path: String,
    )

Source from the content-addressed store, hash-verified

10
11impl VirtualMachine {
12 pub fn compile(
13 &self,
14 source: &str,
15 mode: compiler::Mode,
16 source_path: String,
17 ) -> Result<PyRef<PyCode>, CompileError> {
18 self.compile_with_opts(source, mode, source_path, self.compile_opts())
19 }
20
21 pub fn compile_with_opts(
22 &self,

Callers 5

evalFunction · 0.45
run_stringMethod · 0.45
run_block_exprMethod · 0.45
run_simple_file_innerMethod · 0.45
test_nested_frozenFunction · 0.45

Calls 2

compile_with_optsMethod · 0.80
compile_optsMethod · 0.80

Tested by 1

test_nested_frozenFunction · 0.36