From 8a05c30353a6c1a531b03448c01efcf60327178d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20H=C3=B6gberg?= Date: Mon, 8 Jul 2019 10:53:19 +0200 Subject: 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. --- lib/compiler/src/beam_kernel_to_ssa.erl | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'lib/compiler/src/beam_kernel_to_ssa.erl') 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) -> -- cgit v1.2.1