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

@@ -162,7 +162,7 @@ func (b Builder) getDefer(kind DoAction) *aDefer {
czero := prog.IntVal(0, prog.CInt())
retval := b.Sigsetjmp(jb, czero)
if kind != DeferAlways {
rundBlk = self.MakeBlock()
rundBlk = self.MakeBlock("")
} else {
blks = self.MakeBlocks(2)
next, rundBlk = blks[0], blks[1]
@@ -228,7 +228,7 @@ func (b Builder) Defer(kind DoAction, fn Expr, args ...Expr) {
// RunDefers emits instructions to run deferred instructions.
func (b Builder) RunDefers() {
self := b.getDefer(DeferInCond)
blk := b.Func.MakeBlock()
blk := b.Func.MakeBlock("")
self.runsNext = append(self.runsNext, blk)
b.Store(self.rundPtr, blk.Addr())