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

Method new_block

crates/codegen/src/compile.rs:9874–9879  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

9872 }
9873
9874 fn new_block(&mut self) -> BlockIdx {
9875 let code = self.current_code_info();
9876 let idx = BlockIdx::new(code.blocks.len().to_u32());
9877 code.blocks.push(ir::Block::default());
9878 idx
9879 }
9880
9881 fn switch_to_block(&mut self, block: BlockIdx) {
9882 let code = self.current_code_info();

Callers 15

compile_statementMethod · 0.80
compile_try_statementMethod · 0.80
compile_function_bodyMethod · 0.80
compile_ifMethod · 0.80
compile_whileMethod · 0.80
compile_withMethod · 0.80
compile_forMethod · 0.80
ensure_fail_popMethod · 0.80

Calls 5

newFunction · 0.85
current_code_infoMethod · 0.80
to_u32Method · 0.45
lenMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected