• Alan Donovan's avatar
    exp/ssa: make invokation of deferred procedure calls explicit. · 5a09f1b3
    Alan Donovan authored
    The correct semantics of named result parameters and deferred
    procedures cannot be implemented with the existing Ret
    instruction alone, since the required sequence is:
    (1) evaluate return operands and parallel-assign them to
        named result parameters
    (2) invoke deferred procedures
    (3) load named result parameters to form result tuple.
    
    We introduce a new 'rundefers' instruction that explicitly
    invokes the deferred procedure calls, and we generate code
    that follows the sequence above.
    
    Most functions do not use deferred procedures but this cannot
    be known in a single pass.  So, we add an optimisation to
    eliminate redundant 'rundefers'; it is piggybacked on the
    existing pass done for "lifting".
    
    Added tests.
    
    R=gri
    CC=golang-dev
    https://golang.org/cl/7411043
    5a09f1b3
Name
Last commit
Last update
..
cmd Loading commit data...
lib9 Loading commit data...
libbio Loading commit data...
libmach Loading commit data...
pkg Loading commit data...
Make.dist Loading commit data...
all.bash Loading commit data...
all.bat Loading commit data...
all.rc Loading commit data...
clean.bash Loading commit data...
clean.bat Loading commit data...
clean.rc Loading commit data...
make.bash Loading commit data...
make.bat Loading commit data...
make.rc Loading commit data...
race.bash Loading commit data...
race.bat Loading commit data...
run.bash Loading commit data...
run.bat Loading commit data...
run.rc Loading commit data...
sudo.bash Loading commit data...