]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: also check package.function for GOSSAFUNC match
authorDavid Chase <drchase@google.com>
Tue, 25 Aug 2020 02:57:01 +0000 (22:57 -0400)
committerDavid Chase <drchase@google.com>
Tue, 25 Aug 2020 14:51:49 +0000 (14:51 +0000)
commitbca0b44629f1317cc177072560d9a1486620e48f
tree2749a812bf29fe17ab5cf952cb4dac7ccae5695a
parent02f445258c284f295d8648078d6cc15836670756
cmd/compile: also check package.function for GOSSAFUNC match

Old behavior is still enabled because it doesn't hurt to leave
it in and existing users of this feature (there are dozens of
us!) will not be surprised.  Adding this finer control allows
users to avoid writing ssa.html where they can't, shouldn't, or
just don't want to.

Example, both ways:

$ GOSSAFUNC="(*Reader).Reset" go test -c -o ./a compress/gzip
dumped SSA to bytes/ssa.html
dumped SSA to strings/ssa.html
dumped SSA to bufio/ssa.html
dumped SSA to compress/gzip/ssa.html

$ GOSSAFUNC="compress/gzip.(*Reader).Reset" go test -c -o ./a compress/gzip
dumped SSA to compress/gzip/ssa.html

Updates #40919.

Change-Id: I06b77c3c1d326372a32651570b5dd6e56dfb1d7f
Reviewed-on: https://go-review.googlesource.com/c/go/+/250340
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/gc/ssa.go