• Russ Cox's avatar
    cmd/gc: annotate local variables with unique ids for inlining · cb856ade
    Russ Cox authored
    Avoids problems with local declarations shadowing other names.
    We write a more explicit form than the incoming program, so there
    may be additional type annotations. For example:
    
            int := "hello"
            j := 2
    
    would normally turn into
    
            var int string = "hello"
            var j int = 2
    
    but the int variable shadows the int type in the second line.
    
    This CL marks all local variables with a per-function sequence number,
    so that this would instead be:
    
            var int·1 string = "hello"
            var j·2 int = 2
    
    Fixes #4326.
    
    R=ken2
    CC=golang-dev
    https://golang.org/cl/6816100
    cb856ade
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...