]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: clear OTFUNC info when converting to OTYPE
authorIan Lance Taylor <iant@golang.org>
Mon, 28 Mar 2016 02:44:06 +0000 (19:44 -0700)
committerIan Lance Taylor <iant@golang.org>
Mon, 28 Mar 2016 14:10:21 +0000 (14:10 +0000)
commit7e88826a69366bbcb64f2f89dbe02c57f7ebf678
treea43f789127fe9762e6ce68d0a57f40710440dee0
parentaa482f971508d1bfdedf293a85968d80fd80fae2
cmd/compile: clear OTFUNC info when converting to OTYPE

I want to get rid of OTFUNC, which serves no useful purpose.  However,
it turns out that the escape analysis pass looks at the node slices set
up for OTFUNC, even though by the time escape analysis runs the OTFUNC
has been converted to OTYPE.  This CL converts the escape analysis code
to look at the function decls instead, and clears the OTFUNC info when
converting to OTYPE to ensure that nothing else looks at it.

Change-Id: I3f2f5997ea8ea7a127a858e94b20aabfab84a5bf
Reviewed-on: https://go-review.googlesource.com/21202
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/compile/internal/gc/esc.go
src/cmd/compile/internal/gc/typecheck.go