• Matthew Dempsky's avatar
    cmd/compile: split n.Noescape() into separate uses · 2197321d
    Matthew Dempsky authored
    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: default avatarCherry Zhang <cherryyz@google.com>
    2197321d
escape.go 34.3 KB