llgo/ssa: defer support panic; IndirectJump/Switch

This commit is contained in:
xushiwei
2024-06-09 09:08:22 +08:00
parent 8b7d8b7786
commit 60dd33b48f
4 changed files with 131 additions and 34 deletions

View File

@@ -200,7 +200,8 @@ func (p Program) tyGetAttrString() *types.Signature {
func (p Package) PyInit() bool {
if fn := p.FuncOf("main"); fn != nil {
b := fn.NewBuilder()
b.SetBlockEx(fn.Block(0), AtStart, false).callPyInit()
b.SetBlockEx(fn.Block(0), AtStart, false)
b.callPyInit()
b.Dispose()
return true
}