diff options
| author | Austin Clements <austin@google.com> | 2022-08-17 09:02:41 -0400 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2022-09-02 19:08:56 +0000 |
| commit | b91e3737296c815ecf2508644cc07328172640eb (patch) | |
| tree | 4a8a99f42b0e009b121c898e84f4b21619151cd4 /src/runtime/stack.go | |
| parent | dbf442b1b2c28b77db288121ee3a7bc669cdc768 (diff) | |
| download | go-b91e3737296c815ecf2508644cc07328172640eb.tar.xz | |
runtime: make getStackMap a method of stkframe
This places getStackMap alongside argBytes and argMapInternal as
another method of stkframe.
For #54466, albeit rather indirectly.
Change-Id: I411dda3605dd7f996983706afcbefddf29a68a85
Reviewed-on: https://go-review.googlesource.com/c/go/+/424515
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Austin Clements <austin@google.com>
Auto-Submit: Austin Clements <austin@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/runtime/stack.go')
| -rw-r--r-- | src/runtime/stack.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/stack.go b/src/runtime/stack.go index 1b3b0b7840..1b782ede88 100644 --- a/src/runtime/stack.go +++ b/src/runtime/stack.go @@ -664,7 +664,7 @@ func adjustframe(frame *stkframe, arg unsafe.Pointer) bool { return true } - locals, args, objs := getStackMap(frame, &adjinfo.cache, true) + locals, args, objs := frame.getStackMap(&adjinfo.cache, true) // Adjust local variables if stack frame has been allocated. if locals.n > 0 { @@ -1249,7 +1249,7 @@ func freeStackSpans() { // getStackMap returns the locals and arguments live pointer maps, and // stack object list for frame. -func getStackMap(frame *stkframe, cache *pcvalueCache, debug bool) (locals, args bitvector, objs []stackObjectRecord) { +func (frame *stkframe) getStackMap(cache *pcvalueCache, debug bool) (locals, args bitvector, objs []stackObjectRecord) { targetpc := frame.continpc if targetpc == 0 { // Frame is dead. Return empty bitvectors. |
