• Rémy Oudompheng's avatar
    cmd/5g, cmd/6g: fix out of registers with array indexing. · 0b2353ed
    Rémy Oudompheng authored
    Compiling expressions like:
        s[s[s[s[s[s[s[s[s[s[s[s[i]]]]]]]]]]]]
    make 5g and 6g run out of registers. Such expressions can arise
    if a slice is used to represent a permutation and the user wants
    to iterate it.
    
    This is due to the usual problem of allocating registers before
    going down the expression tree, instead of allocating them in a
    postfix way.
    
    The functions cgenr and agenr (that generate a value to a newly
    allocated register instead of an existing location), are either
    introduced or modified when they already existed to allocate
    the new register as late as possible, and sudoaddable is disabled
    for OINDEX nodes so that igen/agenr is used instead.
    
    Update #4207.
    
    R=dave, daniel.morsing, rsc
    CC=golang-dev
    https://golang.org/cl/6733055
    0b2353ed
Name
Last commit
Last update
..
5a Loading commit data...
5c Loading commit data...
5g Loading commit data...
5l Loading commit data...
6a Loading commit data...
6c Loading commit data...
6g Loading commit data...
6l Loading commit data...
8a Loading commit data...
8c Loading commit data...
8g Loading commit data...
8l Loading commit data...
addr2line Loading commit data...
api Loading commit data...
cc Loading commit data...
cgo Loading commit data...
cov Loading commit data...
dist Loading commit data...
fix Loading commit data...
gc Loading commit data...
go Loading commit data...
godoc Loading commit data...
gofmt Loading commit data...
ld Loading commit data...
nm Loading commit data...
objdump Loading commit data...
pack Loading commit data...
prof Loading commit data...
vet Loading commit data...
yacc Loading commit data...