mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: skip pointless writes in freedefer
Change-Id: I501a0e5c87ec88616c7dcdf1b723758b6df6c088 Reviewed-on: https://go-review.googlesource.com/98758 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
4599419e69
commit
f7739c07c8
1 changed files with 3 additions and 2 deletions
|
|
@ -280,8 +280,9 @@ func freedefer(d *_defer) {
|
||||||
d.started = false
|
d.started = false
|
||||||
d.sp = 0
|
d.sp = 0
|
||||||
d.pc = 0
|
d.pc = 0
|
||||||
d.fn = nil
|
// d._panic and d.fn must be nil already.
|
||||||
d._panic = nil
|
// If not, we would have called freedeferpanic or freedeferfn above,
|
||||||
|
// both of which throw.
|
||||||
d.link = nil
|
d.link = nil
|
||||||
|
|
||||||
pp.deferpool[sc] = append(pp.deferpool[sc], d)
|
pp.deferpool[sc] = append(pp.deferpool[sc], d)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue