ssa: make block with label name for debug readable

This commit is contained in:
Li Jie
2024-08-03 20:51:43 +08:00
parent 0687efaec6
commit cdfa0166bd
4 changed files with 11 additions and 9 deletions

View File

@@ -318,7 +318,7 @@ func (p *context) compileBlock(b llssa.Builder, block *ssa.BasicBlock, n int, do
modPtr := pkg.PyNewModVar(modName, true).Expr
mod := b.Load(modPtr)
cond := b.BinOp(token.NEQ, mod, prog.Nil(mod.Type))
newBlk := fn.MakeBlock()
newBlk := fn.MakeBlock("")
b.If(cond, jumpTo, newBlk)
b.SetBlockEx(newBlk, llssa.AtEnd, false)
b.Store(modPtr, b.PyImportMod(modPath))