runtime.Defer: remove proc
This commit is contained in:
@@ -107,6 +107,11 @@ func SmartDoFile(inFile string, pkgPath ...string) {
|
||||
}
|
||||
outFile := dir + fname
|
||||
|
||||
b, err := os.ReadFile(outFile)
|
||||
if err == nil && len(b) == 1 && b[0] == ';' {
|
||||
return // skip to gen
|
||||
}
|
||||
|
||||
if len(pkgPath) > 0 {
|
||||
Do(pkgPath[0], inFile, outFile)
|
||||
} else {
|
||||
|
||||
@@ -18,17 +18,7 @@ package runtime
|
||||
|
||||
// Defer presents defer statements in a function.
|
||||
type Defer struct {
|
||||
proc func(uintptr)
|
||||
bits uintptr
|
||||
link *Defer
|
||||
rund int // index of RunDefers
|
||||
}
|
||||
|
||||
// DeferProc calls deferred statements.
|
||||
func DeferProc(d *Defer) {
|
||||
for d != nil {
|
||||
d.proc(d.bits)
|
||||
d = d.link
|
||||
_ = d.rund
|
||||
}
|
||||
Bits uintptr
|
||||
Link *Defer
|
||||
Rund int // index of RunDefers
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user