diff options
author | Cherry Mui <cherryyz@google.com> | 2021-06-04 18:11:59 -0400 |
---|---|---|
committer | Cherry Mui <cherryyz@google.com> | 2021-06-08 20:54:04 +0000 |
commit | 8e5304f7298a0eef48e4796017c51b4d9aeb52b5 (patch) | |
tree | 30ab50bcac86867662888dc776844b26d5a901af /src/cmd/compile/internal/ssagen | |
parent | 00d01b57866d4b052c3b75706bbc8601167ead7c (diff) | |
download | go-8e5304f7298a0eef48e4796017c51b4d9aeb52b5.tar.gz go-8e5304f7298a0eef48e4796017c51b4d9aeb52b5.zip |
[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/cmd/compile/internal/ssagen')
-rw-r--r-- | src/cmd/compile/internal/ssagen/ssa.go | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/cmd/compile/internal/ssagen/ssa.go b/src/cmd/compile/internal/ssagen/ssa.go index 6479346845..27f0ee685b 100644 --- a/src/cmd/compile/internal/ssagen/ssa.go +++ b/src/cmd/compile/internal/ssagen/ssa.go @@ -4972,14 +4972,11 @@ func (s *state) call(n *ir.CallExpr, k callKind, returnResultAddr bool) *ssa.Val argStart := base.Ctxt.FixedFrameSize() // Defer/go args. if k != callNormal { - // Write argsize and closure (args to newproc/deferproc). - argsize := s.constInt32(types.Types[types.TUINT32], int32(stksize)) - ACArgs = append(ACArgs, types.Types[types.TUINT32]) // not argExtra - callArgs = append(callArgs, argsize) - ACArgs = append(ACArgs, types.Types[types.TUINTPTR]) + // Write closure (arg to newproc/deferproc). + ACArgs = append(ACArgs, types.Types[types.TUINTPTR]) // not argExtra callArgs = append(callArgs, closure) - stksize += 2 * int64(types.PtrSize) - argStart += 2 * int64(types.PtrSize) + stksize += int64(types.PtrSize) + argStart += int64(types.PtrSize) } // Set receiver (for interface calls). |