diff options
author | John Högberg <[email protected]> | 2019-07-08 10:53:19 +0200 |
---|---|---|
committer | John Högberg <[email protected]> | 2019-08-06 10:01:54 +0200 |
commit | 8a05c30353a6c1a531b03448c01efcf60327178d (patch) | |
tree | efd3bdfd0067f2b5615af0d7b71fe526a95b19a2 /lib | |
parent | f84acd6e090c052c8a70a611eafbf7959464937b (diff) | |
download | otp-8a05c30353a6c1a531b03448c01efcf60327178d.tar.gz otp-8a05c30353a6c1a531b03448c01efcf60327178d.tar.bz2 otp-8a05c30353a6c1a531b03448c01efcf60327178d.zip |
compiler: All calls may throw, so they all need success checks
Only adding them when in try/catch worked, but made the exceptions
implicit and forced all later optimization passes to keep them in
mind. Making them explicit lets us simplify later passes.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/compiler/src/beam_kernel_to_ssa.erl | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/compiler/src/beam_kernel_to_ssa.erl b/lib/compiler/src/beam_kernel_to_ssa.erl index 474cb1a851..2406a634e6 100644 --- a/lib/compiler/src/beam_kernel_to_ssa.erl +++ b/lib/compiler/src/beam_kernel_to_ssa.erl @@ -680,13 +680,8 @@ call_cg(Func0, As, [#k_var{name=R}|MoreRs]=Rs, Le, St0) -> set_ssa_var(Dummy, #b_literal{val=unused}, S) end, St1, MoreRs), - case FailCtx of - {no_catch, _} -> - {[Call],St2}; - {in_catch, _} -> - {TestIs,St} = make_succeeded(Ret, FailCtx, St2), - {[Call|TestIs],St} - end + {TestIs,St} = make_succeeded(Ret, FailCtx, St2), + {[Call|TestIs],St} end. enter_cg(Func0, As0, Le, St0) -> |