]> Cypherpunks repositories - gostls13.git/commit
cmd/gc: fix escape analysis
authorRuss Cox <rsc@golang.org>
Tue, 5 Feb 2013 03:48:31 +0000 (22:48 -0500)
committerRuss Cox <rsc@golang.org>
Tue, 5 Feb 2013 03:48:31 +0000 (22:48 -0500)
commit572d984eaa64e6e3a1a67ecde9f6a1038d76becc
tree42cf53effc415c3b7a85d597e0e233e57716baa5
parentc56bb1d238672f658c4f5f5e1efc0fa88c3b3101
cmd/gc: fix escape analysis

If the analysis reached a node twice, then the analysis was cut off.
However, if the second arrival is at a lower depth (closer to escaping)
then it is important to repeat the traversal.

The repeating must be cut off at some point to avoid the occasional
infinite recursion. This CL cuts it off as soon as possible while still
passing all tests.

Fixes #4751.

R=ken2
CC=golang-dev, lvd
https://golang.org/cl/7303043
src/cmd/gc/esc.c
src/cmd/gc/go.h
test/escape2.go