summaryrefslogtreecommitdiff
path: root/lib/compiler/src/beam_kernel_to_ssa.erl
diff options
context:
space:
mode:
authorJohn Högberg <john@erlang.org>2019-07-08 10:53:19 +0200
committerJohn Högberg <john@erlang.org>2019-08-06 10:01:54 +0200
commit8a05c30353a6c1a531b03448c01efcf60327178d (patch)
treeefd3bdfd0067f2b5615af0d7b71fe526a95b19a2 /lib/compiler/src/beam_kernel_to_ssa.erl
parentf84acd6e090c052c8a70a611eafbf7959464937b (diff)
downloaderlang-8a05c30353a6c1a531b03448c01efcf60327178d.tar.gz
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/compiler/src/beam_kernel_to_ssa.erl')
-rw-r--r--lib/compiler/src/beam_kernel_to_ssa.erl9
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) ->