Skip to content

Commit 2fd19ac

Browse files
committed
compiler/natives/src/runtime: Add stubs for getcallerpc, findfunc, funcname.
These are used by the new panicwrap implementation. panicwrap wasn't implemented previously either, so this is not a regression. Related to golang/go@354fa9a. Fixes: runtime/error.go:134:8: undeclared name: getcallerpc runtime/error.go:135:10: undeclared name: funcname runtime/error.go:135:19: undeclared name: findfunc
1 parent e2e4e6d commit 2fd19ac

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

compiler/natives/src/runtime/runtime.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,3 +218,11 @@ func KeepAlive(interface{}) {}
218218
func throw(s string) {
219219
panic(errorString(s))
220220
}
221+
222+
// These are used by panicwrap. Not implemented for GOARCH=js.
223+
// TODO: Implement if possible.
224+
func getcallerpc() uintptr { return 0 }
225+
func findfunc(pc uintptr) funcInfo { return funcInfo{} }
226+
func funcname(f funcInfo) string { return "" }
227+
228+
type funcInfo struct{}

0 commit comments

Comments
 (0)