aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/panic.go
diff options
context:
space:
mode:
authorCherry Mui <cherryyz@google.com>2021-06-04 18:11:59 -0400
committerCherry Mui <cherryyz@google.com>2021-06-08 20:54:04 +0000
commit8e5304f7298a0eef48e4796017c51b4d9aeb52b5 (patch)
tree30ab50bcac86867662888dc776844b26d5a901af /src/runtime/panic.go
parent00d01b57866d4b052c3b75706bbc8601167ead7c (diff)
downloadgo-8e5304f7298a0eef48e4796017c51b4d9aeb52b5.tar.xz
[dev.typeparams] cmd/compile, runtime: remove the siz argument of newproc/deferproc
newproc/deferproc takes a siz argument for the go'd/deferred function's argument size. Now it is always zero. Remove the argument. Change-Id: If1bb8d427e34015ccec0ba10dbccaae96757fa8c Reviewed-on: https://go-review.googlesource.com/c/go/+/325917 Trust: Cherry Mui <cherryyz@google.com> Run-TryBot: Cherry Mui <cherryyz@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com>
Diffstat (limited to 'src/runtime/panic.go')
-rw-r--r--src/runtime/panic.go9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/runtime/panic.go b/src/runtime/panic.go
index 8a296a3c17..46e43382cd 100644
--- a/src/runtime/panic.go
+++ b/src/runtime/panic.go
@@ -224,21 +224,16 @@ func panicmemAddr(addr uintptr) {
panic(errorAddressString{msg: "invalid memory address or nil pointer dereference", addr: addr})
}
-// Create a new deferred function fn with siz bytes of arguments.
+// Create a new deferred function fn, which has no arguments and results.
// The compiler turns a defer statement into a call to this.
//go:nosplit
-func deferproc(siz int32, fn *funcval) { // arguments of fn follow fn
+func deferproc(fn *funcval) { // TODO: Make deferproc just take a func().
gp := getg()
if gp.m.curg != gp {
// go code on the system stack can't defer
throw("defer on system stack")
}
- if siz != 0 {
- // TODO: Make deferproc just take a func().
- throw("defer with non-empty frame")
- }
-
// the arguments of fn are in a perilous state. The stack map
// for deferproc does not describe them. So we can't let garbage
// collection or stack copying trigger until we've copied them out