]> Cypherpunks repositories - gostls13.git/commit
cmd/gc: escape analysis to track flow of in to out parameters.
authorLuuk van Dijk <lvd@golang.org>
Mon, 29 Oct 2012 12:38:21 +0000 (13:38 +0100)
committerLuuk van Dijk <lvd@golang.org>
Mon, 29 Oct 2012 12:38:21 +0000 (13:38 +0100)
commit507fcf37d2a5565fbe5d13b24f7082464b17dc3a
tree65b44b7e80c356ea3a50a1616c2fc7ff681c0de8
parentc8fe9c7606cd00e2b68d0b619d81edc92e4e7ec7
cmd/gc: escape analysis to track flow of in to out parameters.

includes step 0: synthesize outparams, from 6600044
includes step 1,2: give outparams loopdepth 0 and verify unchanged results
         generate esc:$mask tags, but still tie to sink if a param has mask != 0
from 6610054

adds final steps:
- have esccall generate n->escretval, a list of nodes the function results flow to
- use these in esccall and ORETURN/OAS2FUNC/and f(g())
- only tie parameters to sink if tag is absent, otherwise according to mask, tie them to escretval

R=rsc, bradfitz
CC=dave, gobot, golang-dev, iant, rsc
https://golang.org/cl/6741044
src/cmd/gc/esc.c
src/cmd/gc/go.h
test/escape2.go
test/escape5.go [new file with mode: 0644]