Skip to content

Commit

Permalink
runtime: delete gosave (dead code)
Browse files Browse the repository at this point in the history
Change-Id: Ie811526534df8622d89c5b1b81dbe19ece1c962b
Reviewed-on: https://go-review.googlesource.com/c/go/+/292110
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
  • Loading branch information
rsc committed Feb 19, 2021
1 parent 474d5f4 commit b110a43
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/runtime/proc.go
Original file line number Diff line number Diff line change
Expand Up @@ -3482,7 +3482,7 @@ func save(pc, sp uintptr) {
// This is called only from the go syscall library and cgocall,
// not from the low-level system calls used by the runtime.
//
// Entersyscall cannot split the stack: the gosave must
// Entersyscall cannot split the stack: the save must
// make g->sched refer to the caller's stack segment, because
// entersyscall is going to return immediately after.
//
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/stack.go
Original file line number Diff line number Diff line change
Expand Up @@ -1089,7 +1089,7 @@ func nilfunc() {
}

// adjust Gobuf as if it executed a call to fn
// and then did an immediate gosave.
// and then stopped before the first instruction in fn.
func gostartcallfn(gobuf *gobuf, fv *funcval) {
var fn unsafe.Pointer
if fv != nil {
Expand Down
1 change: 1 addition & 0 deletions src/runtime/stubs.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ func noescape(p unsafe.Pointer) unsafe.Pointer {
// This in turn calls cgocallbackg, which is where we'll find
// pointer-declared arguments.
func cgocallback(fn, frame, ctxt uintptr)

func gogo(buf *gobuf)

//go:noescape
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/sys_wasm.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func wasmTruncU()
func wasmExit(code int32)

// adjust Gobuf as it if executed a call to fn with context ctxt
// and then did an immediate gosave.
// and then stopped before the first instruction in fn.
func gostartcall(buf *gobuf, fn, ctxt unsafe.Pointer) {
sp := buf.sp
sp -= sys.PtrSize
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/sys_x86.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

// adjust Gobuf as if it executed a call to fn with context ctxt
// and then did an immediate gosave.
// and then stopped before the first instruction in fn.
func gostartcall(buf *gobuf, fn, ctxt unsafe.Pointer) {
sp := buf.sp
sp -= sys.PtrSize
Expand Down

0 comments on commit b110a43

Please sign in to comment.