Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Judgment codegen_block at crates/formality-rust/src/codegen/mod.rs:85

Signature:

codegen_block(global: CodegenGlobal, cfn: CodegenFn, scope: CodegenScope, block: Block,) => (CodeBlock, CodegenGlobal, CodegenFn)

The number on each rule’s conclusion is positive coverage; the number on each premise is negative coverage. Click a number to browse the tests.

block
LineCoverageSource
95(if let None = &block.label)
96N/A(let code = cfn.fresh_code_block())
97(for_all(i in 0..block.stmts.len()) with(code, scope, global, cfn)
(codegen_stmt(global, cfn, scope, &block.stmts[i]) => (stmt_code, scope, global, cfn))
(let (code, cfn) = cfn.append_from(code, stmt_code)))
──────── ("block")
101(codegen_block(global, cfn, scope, block) => (code, global, cfn))
labeled-block
LineCoverageSource
105(if let Some(label) = &block.label)
106N/A(let (exit_block, cfn) = cfn.fresh_bb())
107N/A(let scope = scope.with_label(&label.id, (), exit_block))
108N/A(let code = cfn.fresh_code_block())
109(for_all(i in 0..block.stmts.len()) with(code, scope, global, cfn)
(codegen_stmt(global, cfn, scope, &block.stmts[i]) => (stmt_code, scope, global, cfn))
(let (code, cfn) = cfn.append_from(code, stmt_code)))
112N/A(let (code, cfn) = cfn.terminate(code, terminator_goto(exit_block), Some(exit_block)))
──────── ("labeled-block")
114(codegen_block(global, cfn, scope, block) => (code, global, cfn))