]> Cypherpunks repositories - gostls13.git/commit
cmd/gc: inlining functions with local variables
authorLuuk van Dijk <lvd@golang.org>
Mon, 29 Oct 2012 12:55:27 +0000 (13:55 +0100)
committerLuuk van Dijk <lvd@golang.org>
Mon, 29 Oct 2012 12:55:27 +0000 (13:55 +0100)
commit530147e870eee380a1533f5f83ef7efe73b7139b
tree5c3893cccdebb0ba5a341b66ed1835e51cc0d808
parent507fcf37d2a5565fbe5d13b24f7082464b17dc3a
cmd/gc: inlining functions with local variables

- make sure dclcontext == PAUTO only in function bodies
- introduce PDISCARD to discard declarations in bodies of repeated imports
- skip printing initializing OAS'es in export mode, assuming they only occur after ODCL's
- remove ODCL and the initializing OAS from inl.c:ishairy
- fix confused use of ->typecheck in typecheckinl: it's about the ->inl, not about the fn.
- debuging aids: print ntype on ONAMEs too and -Emm instead of -Ell.

fixes #2812

R=rsc
CC=golang-dev
https://golang.org/cl/6800043
src/cmd/gc/dcl.c
src/cmd/gc/fmt.c
src/cmd/gc/go.h
src/cmd/gc/go.y
src/cmd/gc/inl.c
src/cmd/gc/y.tab.c