From b110a43628526787f73db44e11829520d92e5b2b Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 15 Feb 2021 11:26:58 -0500 Subject: [PATCH] runtime: delete gosave (dead code) Change-Id: Ie811526534df8622d89c5b1b81dbe19ece1c962b Reviewed-on: https://go-review.googlesource.com/c/go/+/292110 Trust: Russ Cox Reviewed-by: Cherry Zhang Reviewed-by: Ian Lance Taylor --- src/runtime/proc.go | 2 +- src/runtime/stack.go | 2 +- src/runtime/stubs.go | 1 + src/runtime/sys_wasm.go | 2 +- src/runtime/sys_x86.go | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/runtime/proc.go b/src/runtime/proc.go index ccfe0856910ae1..dbb430fd259db9 100644 --- a/src/runtime/proc.go +++ b/src/runtime/proc.go @@ -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. // diff --git a/src/runtime/stack.go b/src/runtime/stack.go index 8c90e7b46f0ded..d971e5e26f8e54 100644 --- a/src/runtime/stack.go +++ b/src/runtime/stack.go @@ -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 { diff --git a/src/runtime/stubs.go b/src/runtime/stubs.go index c0cc95ec65f451..b9b313a71127cd 100644 --- a/src/runtime/stubs.go +++ b/src/runtime/stubs.go @@ -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 diff --git a/src/runtime/sys_wasm.go b/src/runtime/sys_wasm.go index 3ed621f92ebd1a..057ed4ccd90a75 100644 --- a/src/runtime/sys_wasm.go +++ b/src/runtime/sys_wasm.go @@ -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 diff --git a/src/runtime/sys_x86.go b/src/runtime/sys_x86.go index 5b7a6666791188..8f21585d28b0f2 100644 --- a/src/runtime/sys_x86.go +++ b/src/runtime/sys_x86.go @@ -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