• Keith Randall's avatar
    cmd/compile: fix defer/deferreturn · ddc6b644
    Keith Randall authored
    Make sure we do any just-before-return cleanup on all paths out of a
    function, including when recovering.  Each exit path should include
    deferreturn (if there are any defers) and then the exit
    code (e.g. copying heap-escaping return values back to the stack).
    
    Introduce a Defer SSA block type which has two outgoing edges - one the
    fallthrough edge (the defer was queued successfully) and one which
    immediately returns (the defer had a successful recover() call and
    normal execution should resume at the return point).
    
    Fixes #14725
    
    Change-Id: Iad035c9fd25ef8b7a74dafbd7461cf04833d981f
    Reviewed-on: https://go-review.googlesource.com/20486Reviewed-by: 's avatarDavid Chase <drchase@google.com>
    ddc6b644
Name
Last commit
Last update
..
addr2line Loading commit data...
api Loading commit data...
asm Loading commit data...
cgo Loading commit data...
compile Loading commit data...
cover Loading commit data...
dist Loading commit data...
doc Loading commit data...
fix Loading commit data...
go Loading commit data...
gofmt Loading commit data...
internal Loading commit data...
link Loading commit data...
nm Loading commit data...
objdump Loading commit data...
pack Loading commit data...
pprof Loading commit data...
trace Loading commit data...
vet Loading commit data...
yacc Loading commit data...