defer refactor

This commit is contained in:
xushiwei
2024-06-03 01:06:01 +08:00
parent 410f9dd759
commit 56a5a7d72e
17 changed files with 207 additions and 171 deletions

Binary file not shown.

View File

@@ -21,6 +21,7 @@ type Defer struct {
proc func(uintptr)
bits uintptr
link *Defer
rund int // index of RunDefers
}
// DeferProc calls deferred statements.
@@ -28,5 +29,6 @@ func DeferProc(d *Defer) {
for d != nil {
d.proc(d.bits)
d = d.link
_ = d.rund
}
}