]> Cypherpunks repositories - gostls13.git/commit
cmd/gc: in the runtime package, don't promote any decls to the heap.
authorKeith Randall <khr@golang.org>
Tue, 22 Jul 2014 03:56:44 +0000 (20:56 -0700)
committerKeith Randall <khr@golang.org>
Tue, 22 Jul 2014 03:56:44 +0000 (20:56 -0700)
commit064acace5b39308e19419e9f0e5b8a2e68f14a85
tree85a24414cc654ba469e111448966b6b587998b4f
parent76f1b901dba2aa68c1e9e9a7e073287d4f293a53
cmd/gc: in the runtime package, don't promote any decls to the heap.

In the runtime, we want to control where allocations happen.
In particular, we don't want the code implementing malloc to
itself trigger a malloc.  This change prevents the compiler
from inserting mallocs on our behalf (due to escaping declarations).

This check does not trigger on the current runtime code.

Note: Composite literals are still allowed.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/105280047
src/cmd/gc/gen.c