aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src/beam_kernel_to_ssa.erl
diff options
context:
space:
mode:
authorJohn Högberg <[email protected]>2019-06-28 09:14:43 +0200
committerJohn Högberg <[email protected]>2019-07-05 11:33:38 +0200
commita10fb1edf471602be01bd5b4c1f019cc5534b9f5 (patch)
tree588664b6b7019227a04494b88037be732238f918 /lib/compiler/src/beam_kernel_to_ssa.erl
parentec35aa92f49dedf4b25a78c6b8d56d629db6642d (diff)
downloadotp-a10fb1edf471602be01bd5b4c1f019cc5534b9f5.tar.gz
otp-a10fb1edf471602be01bd5b4c1f019cc5534b9f5.tar.bz2
otp-a10fb1edf471602be01bd5b4c1f019cc5534b9f5.zip
compiler: Explain and rename ?BADARG_BLOCK
Diffstat (limited to 'lib/compiler/src/beam_kernel_to_ssa.erl')
-rw-r--r--lib/compiler/src/beam_kernel_to_ssa.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/compiler/src/beam_kernel_to_ssa.erl b/lib/compiler/src/beam_kernel_to_ssa.erl
index b2d824b648..474cb1a851 100644
--- a/lib/compiler/src/beam_kernel_to_ssa.erl
+++ b/lib/compiler/src/beam_kernel_to_ssa.erl
@@ -34,7 +34,7 @@
-type label() :: beam_ssa:label().
%% Main codegen structure.
--record(cg, {lcount=1 :: label(), %Label counter
+-record(cg, {lcount=1 :: label(), %Label counter
bfail=1 :: label(),
catch_label=none :: 'none' | label(),
vars=#{} :: map(), %Defined variables.
@@ -83,6 +83,7 @@ function(#k_fdef{anno=Anno0,func=Name,arity=Arity,
cg_fun(Ke, St0) ->
{UltimateFail,FailIs,St1} = make_failure(badarg, St0),
+ ?EXCEPTION_BLOCK = UltimateFail, %Assertion.
St2 = St1#cg{bfail=UltimateFail,ultimate_failure=UltimateFail},
{B,St} = cg(Ke, St2),
Asm = [{label,0}|B++FailIs],