diff options
Diffstat (limited to 'src/runtime/runtime2.go')
| -rw-r--r-- | src/runtime/runtime2.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/runtime/runtime2.go b/src/runtime/runtime2.go index bc5b48222b..16c02cd1ed 100644 --- a/src/runtime/runtime2.go +++ b/src/runtime/runtime2.go @@ -775,9 +775,16 @@ func extendRandom(r []byte, n int) { // A _defer holds an entry on the list of deferred calls. // If you add a field here, add code to clear it in freedefer. +// This struct must match the code in cmd/compile/internal/gc/reflect.go:deferstruct +// and cmd/compile/internal/gc/ssa.go:(*state).call. +// Some defers will be allocated on the stack and some on the heap. +// All defers are logically part of the stack, so write barriers to +// initialize them are not required. All defers must be manually scanned, +// and for heap defers, marked. type _defer struct { - siz int32 + siz int32 // includes both arguments and results started bool + heap bool sp uintptr // sp at time of defer pc uintptr fn *funcval |
