]> Cypherpunks repositories - gostls13.git/commit
cmd/gc: fix escape analysis ordering
authorRuss Cox <rsc@golang.org>
Tue, 25 Jun 2013 21:28:49 +0000 (17:28 -0400)
committerRuss Cox <rsc@golang.org>
Tue, 25 Jun 2013 21:28:49 +0000 (17:28 -0400)
commit148fac79a33bf7e9be279002aa289eacad41cb8f
tree8cf3414c63884a3c727565231deeae86b132e9f4
parenta14e143c2173e106b1155905a41f5144e1a864b7
cmd/gc: fix escape analysis ordering

Functions without bodies were excluded from the ordering logic,
because when I wrote the ordering logic there was no reason to
analyze them.

But then we added //go:noescape tags that need analysis, and we
didn't update the ordering logic.

So in the absence of good ordering, //go:noescape only worked
if it appeared before the use in the source code.

Fixes #5773.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/10570043
src/cmd/gc/esc.c
test/escape2.go