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

Method push_fblock_full

crates/codegen/src/compile.rs:1471–1491  ·  view source on GitHub ↗

Push an fblock with all parameters including fb_datum

(
        &mut self,
        fb_type: FBlockType,
        fb_block: BlockIdx,
        fb_exit: BlockIdx,
        fb_datum: FBlockDatum,
    )

Source from the content-addressed store, hash-verified

1469
1470 /// Push an fblock with all parameters including fb_datum
1471 fn push_fblock_full(
1472 &mut self,
1473 fb_type: FBlockType,
1474 fb_block: BlockIdx,
1475 fb_exit: BlockIdx,
1476 fb_datum: FBlockDatum,
1477 ) -> CompileResult<()> {
1478 let code = self.current_code_info();
1479 if code.fblock.len() >= MAXBLOCKS {
1480 return Err(self.error(CodegenErrorType::SyntaxError(
1481 "too many statically nested blocks".to_owned(),
1482 )));
1483 }
1484 code.fblock.push(FBlockInfo {
1485 fb_type,
1486 fb_block,
1487 fb_exit,
1488 fb_datum,
1489 });
1490 Ok(())
1491 }
1492
1493 /// Pop an fblock
1494 // = compiler_pop_fblock

Callers 4

push_fblockMethod · 0.80
compile_try_statementMethod · 0.80

Calls 6

current_code_infoMethod · 0.80
ErrClass · 0.50
lenMethod · 0.45
errorMethod · 0.45
to_ownedMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected