This commit is contained in:
xushiwei
2024-06-13 13:51:36 +08:00
parent 64e96cc101
commit 4abcbb9b51
9 changed files with 75 additions and 21 deletions

View File

@@ -179,6 +179,7 @@ type aFunction struct {
blks []BasicBlock
defer_ *aDefer
recov BasicBlock
params []Type
freeVars Expr
@@ -329,4 +330,9 @@ func (p Function) Block(idx int) BasicBlock {
return p.blks[idx]
}
// SetRecover sets the recover block for the function.
func (p Function) SetRecover(blk BasicBlock) {
p.recov = blk
}
// -----------------------------------------------------------------------------