]> Cypherpunks repositories - gostls13.git/commit
cmd/gc: introduce hidden closure functions earlier
authorRuss Cox <rsc@golang.org>
Mon, 4 Jun 2012 21:07:59 +0000 (17:07 -0400)
committerRuss Cox <rsc@golang.org>
Mon, 4 Jun 2012 21:07:59 +0000 (17:07 -0400)
commit25922c06582a91ae02ca8a632b2a75aeb7cdc887
treec0c5b1361edf3a891e01c33d8f672c3c6bbdf450
parentd152321cea4ebee18b7b819d29d0718dbc139212
cmd/gc: introduce hidden closure functions earlier

The original implementation of closures created the
underlying top-level function during walk, which is fairly
late in the compilation process and caused ordering-based
complications due to earlier stages that had to be repeated
any number of times.

Create the underlying function during typecheck, much
earlier, so that later stages can be run just once.

The result is a simpler compilation sequence.

R=ken2
CC=golang-dev
https://golang.org/cl/6279049
src/cmd/gc/closure.c
src/cmd/gc/esc.c
src/cmd/gc/fmt.c
src/cmd/gc/inl.c
src/cmd/gc/lex.c
src/cmd/gc/sinit.c