• Russ Cox's avatar
    gc: fix label recursion bugs · 60d47101
    Russ Cox authored
    Was keeping a pointer to the labeled statement in n->right,
    which meant that generic traversals of the tree visited it twice.
    That combined with aggressive flattening of the block
    structure when possible during parsing meant that
    the kinds of label: code label: code label: code sequences
    generated by yacc were giving the recursion 2ⁿ paths
    through the program.
    
    Fixes #2212.
    
    R=lvd
    CC=golang-dev
    https://golang.org/cl/4960050
    60d47101
go.y 30.9 KB