]> Cypherpunks repositories - gostls13.git/commit
cmd/gc: add way to specify 'noescape' for extern funcs
authorRuss Cox <rsc@golang.org>
Tue, 5 Feb 2013 12:00:38 +0000 (07:00 -0500)
committerRuss Cox <rsc@golang.org>
Tue, 5 Feb 2013 12:00:38 +0000 (07:00 -0500)
commitfd178d6a7e62796c71258ba155b957616be86ff4
tree905b3bcdfa21372d9df68f19353b17e239340f2f
parentf1c409b98b8f9359d3e561a3a3f8d2ca514b1d44
cmd/gc: add way to specify 'noescape' for extern funcs

A new comment directive //go:noescape instructs the compiler
that the following external (no body) func declaration should be
treated as if none of its arguments escape to the heap.

Fixes #4099.

R=golang-dev, dave, minux.ma, daniel.morsing, remyoudompheng, adg, agl, iant
CC=golang-dev
https://golang.org/cl/7289048
src/cmd/gc/doc.go
src/cmd/gc/esc.c
src/cmd/gc/go.h
src/cmd/gc/go.y
src/cmd/gc/lex.c
src/cmd/gc/y.tab.c
test/escape2.go
test/fixedbugs/issue4099.go [new file with mode: 0644]