• 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
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...