aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/runtime2.go
diff options
context:
space:
mode:
authorBryan C. Mills <bcmills@google.com>2019-10-16 20:41:53 +0000
committerBryan C. Mills <bcmills@google.com>2019-10-16 20:59:53 +0000
commitb76e6f88251712a21071d4ea11573bd8cdfa21de (patch)
tree8f61e6b95100c9ea5db743ed7934d0f253d3a58c /src/runtime/runtime2.go
parent2718789bc7937c58a7a65e53d9cc941b04682f99 (diff)
downloadgo-b76e6f88251712a21071d4ea11573bd8cdfa21de.tar.xz
Revert "cmd/compile, cmd/link, runtime: make defers low-cost through inline code and extra funcdata"
This reverts CL 190098. Reason for revert: broke several builders. Change-Id: I69161352f9ded02537d8815f259c4d391edd9220 Reviewed-on: https://go-review.googlesource.com/c/go/+/201519 Run-TryBot: Bryan C. Mills <bcmills@google.com> Reviewed-by: Austin Clements <austin@google.com> Reviewed-by: Dan Scales <danscales@google.com>
Diffstat (limited to 'src/runtime/runtime2.go')
-rw-r--r--src/runtime/runtime2.go30
1 files changed, 7 insertions, 23 deletions
diff --git a/src/runtime/runtime2.go b/src/runtime/runtime2.go
index 20813d09eb..dd399e00a6 100644
--- a/src/runtime/runtime2.go
+++ b/src/runtime/runtime2.go
@@ -701,7 +701,7 @@ type _func struct {
nameoff int32 // function name
args int32 // in/out args size
- deferreturn uint32 // offset of start of a deferreturn call instruction from entry, if any.
+ deferreturn uint32 // offset of a deferreturn block from entry, if any.
pcsp int32
pcfile int32
@@ -774,7 +774,7 @@ 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 and deferProcStack
+// 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.
@@ -785,27 +785,11 @@ type _defer struct {
siz int32 // includes both arguments and results
started bool
heap bool
- // openDefer indicates that this _defer is for a frame with open-coded
- // defers. We have only one defer record for the entire frame (which may
- // currently have 0, 1, or more defers active).
- openDefer bool
- sp uintptr // sp at time of defer
- pc uintptr // pc at time of defer
- fn *funcval
- _panic *_panic // panic that is running defer
- link *_defer
-
- // If openDefer is true, the fields below record values about the stack
- // frame and associated function that has the open-coded defer(s). sp
- // above will be the sp for the frame, and pc will be address of the
- // deferreturn call in the function.
- fd unsafe.Pointer // funcdata for the function associated with the frame
- varp uintptr // value of varp for the stack frame
- // framepc is the current pc associated with the stack frame. Together,
- // with sp above (which is the sp associated with the stack frame),
- // framepc/sp can be used as pc/sp pair to continue a stack trace via
- // gentraceback().
- framepc uintptr
+ sp uintptr // sp at time of defer
+ pc uintptr
+ fn *funcval
+ _panic *_panic // panic that is running defer
+ link *_defer
}
// A _panic holds information about an active panic.