]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: silence esc diagnostics about directiface OCONVIFACEs
authorMatthew Dempsky <mdempsky@google.com>
Fri, 30 Aug 2019 17:56:30 +0000 (10:56 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Tue, 3 Sep 2019 17:52:06 +0000 (17:52 +0000)
commit9f89edcd9668bb3b011961fbcdd8fc2796acba5d
treefac2ea3d67038eff5b913af5cb6b24224c94767f
parenta71967e4c5aa34f274b8b9aff915f14ac00e7ee8
cmd/compile: silence esc diagnostics about directiface OCONVIFACEs

In general, a conversion to interface type may require values to be
boxed, which in turn necessitates escape analysis to determine whether
the boxed representation can be stack allocated.

However, esc.go used to unconditionally print escape analysis
decisions about OCONVIFACE, even for conversions that don't require
boxing (e.g., pointers, channels, maps, functions).

For test compatibility with esc.go, escape.go similarly printed these
useless diagnostics. This CL removes the diagnostics, and updates test
expectations accordingly.

Change-Id: I97c57a4a08e44d265bba516c78426ff4f2bf1e12
Reviewed-on: https://go-review.googlesource.com/c/go/+/192697
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
13 files changed:
src/cmd/compile/internal/gc/escape.go
test/escape2.go
test/escape2n.go
test/escape5.go
test/escape_closure.go
test/escape_field.go
test/escape_iface.go
test/escape_indir.go
test/escape_level.go
test/escape_map.go
test/escape_param.go
test/escape_unsafe.go
test/fixedbugs/issue12006.go