mirror of
https://github.com/golang/go
synced 2024-11-02 13:42:29 +00:00
501b786e5c
Prep for subsequent CLs to remove old escape analysis pass. This CL removes -newescape=true from tests that use it, and deletes tests that use -newescape=false. (For history, see CL 170447.) Notably, this removes escape_because.go without any replacement, but this is being tracked by #31489. Change-Id: I6f6058d58fff2c5d210cb1d2713200cc9f501ca7 Reviewed-on: https://go-review.googlesource.com/c/go/+/187617 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
29 lines
618 B
Go
29 lines
618 B
Go
// errorcheck -0 -+ -p=runtime -m
|
|
|
|
// Copyright 2019 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package runtime
|
|
|
|
// A function that calls runtime.getcallerpc or runtime.getcallersp()
|
|
// cannot be inlined, no matter how small it is.
|
|
|
|
func getcallerpc() uintptr
|
|
func getcallersp() uintptr
|
|
|
|
func pc() uintptr {
|
|
return getcallerpc() + 1
|
|
}
|
|
|
|
func cpc() uintptr { // ERROR "can inline cpc"
|
|
return pc() + 2
|
|
}
|
|
|
|
func sp() uintptr {
|
|
return getcallersp() + 3
|
|
}
|
|
|
|
func csp() uintptr { // ERROR "can inline csp"
|
|
return sp() + 4
|
|
}
|