]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: split n.Noescape() into separate uses
authorMatthew Dempsky <mdempsky@google.com>
Tue, 8 Oct 2019 21:21:17 +0000 (14:21 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Tue, 8 Oct 2019 23:53:55 +0000 (23:53 +0000)
commit2197321db1dd997165c0091ba2bcb3b6be7633d0
tree29d2e08c67e6816467e0d86998d91ceade7ae222
parent5650a53dac73703a1bc095a277a194813519001f
cmd/compile: split n.Noescape() into separate uses

n.Noescape() was overloaded for two uses: (1) to indicate a function
was annotated with //go:noescape, and (2) to indicate that certain
temporary allocations don't outlive the current statement.

The first use case is redundant with n.Func.Pragma&Noescape!=0, which
is the convention we use for checking other function-level pragmas.

The second use case is better served by renaming "Noescape" to
"Transient".

Passes toolstash-check.

Change-Id: I0f09d2d5767513894b7bf49da9cdabd04aa4a05e
Reviewed-on: https://go-review.googlesource.com/c/go/+/199822
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/compile/internal/gc/esc.go
src/cmd/compile/internal/gc/escape.go
src/cmd/compile/internal/gc/noder.go
src/cmd/compile/internal/gc/order.go
src/cmd/compile/internal/gc/syntax.go