• Russ Cox's avatar
    cmd/gc: relax address-of escape analysis · e5d742fc
    Russ Cox authored
    Make the loop nesting depth of &x depend on where x is declared,
    not on where the &x appears. The latter is only a conservative
    estimate of the former. Being more careful can avoid some
    variables escaping, and it is easier to reason about.
    
    It would have avoided issue 7313, although that was still a bug
    worth fixing.
    
    Not much effect in the tree: one variable in the whole tree
    is saved from a heap allocation (something in x509 parsing).
    
    LGTM=daniel.morsing
    R=daniel.morsing
    CC=golang-codereviews
    https://golang.org/cl/62380043
    e5d742fc
Name
Last commit
Last update
api Loading commit data...
doc Loading commit data...
include Loading commit data...
lib Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.hgignore Loading commit data...
.hgtags Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...