Re: code review 6610054: cmd/gc: escape analysis to track flow of in to out para... (issue 6610054)

54 views
Skip to first unread message

r...@golang.org

unread,
Oct 21, 2012, 5:59:53 PM10/21/12
to l...@google.com, golan...@googlegroups.com, re...@codereview-hr.appspotmail.com
LGTM



https://codereview.appspot.com/6610054/diff/7001/src/cmd/gc/esc.c
File src/cmd/gc/esc.c (right):

https://codereview.appspot.com/6610054/diff/7001/src/cmd/gc/esc.c#newcode511
src/cmd/gc/esc.c:511: // OAS2FUNC in disguise
Seems like we need to hook these up?

https://codereview.appspot.com/6610054/

l...@google.com

unread,
Oct 22, 2012, 4:13:07 AM10/22/12
to r...@golang.org, golan...@googlegroups.com, re...@codereview-hr.appspotmail.com
On 2012/10/21 21:59:53, rsc wrote:
> Seems like we need to hook these up?

not until the next step. here, return values of n->list->n still leak
on account of their loopdepth being zero (which has the same effect as
tying them to the sink before)

https://codereview.appspot.com/6610054/

l...@google.com

unread,
Oct 22, 2012, 4:18:22 AM10/22/12
to l...@google.com, r...@golang.org, golan...@googlegroups.com, re...@codereview-hr.appspotmail.com
*** Submitted as
http://code.google.com/p/go/source/detail?r=dede8dc61bf6 ***

cmd/gc: escape analysis to track flow of in to out parameters.

includes step 0: synthesize outparams, from 6600044
step 1: give outparams loopdepth 0 and verify unchanged results
step 2: generate esc:$mask tags, but still tie to sink if a param has
mask != 0
next step: use in esccall (and ORETURN with implicit OAS2FUNC) to avoid
tying to sink

R=rsc
CC=golang-dev
http://codereview.appspot.com/6610054


http://codereview.appspot.com/6610054/

rogp...@gmail.com

unread,
Oct 22, 2012, 6:13:08 AM10/22/12
to l...@google.com, r...@golang.org, golan...@googlegroups.com, re...@codereview-hr.appspotmail.com

https://codereview.appspot.com/6610054/diff/10002/src/cmd/gc/esc.c
File src/cmd/gc/esc.c (right):

https://codereview.appspot.com/6610054/diff/10002/src/cmd/gc/esc.c#newcode214
src/cmd/gc/esc.c:214: static Strlit *tags[16] = { nil, nil, nil, nil,
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil };
isn't the initialiser unnecessary.?

https://codereview.appspot.com/6610054/

Luuk van Dijk

unread,
Oct 22, 2012, 7:32:33 AM10/22/12
to Luuk van Dijk, roger peppe, Russ Cox, golang-dev, re...@codereview-hr.appspotmail.com
of course.  I'll fix that in 6741044
Reply all
Reply to author
Forward
0 new messages