aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2017-12-05 12:18:12 +0100
committerBjörn Gustavsson <[email protected]>2017-12-07 10:09:35 +0100
commit596921c3467b8e6b06340e492c3fbba687b74d01 (patch)
tree08ea844ad837edb6c8fabbece7a5612b33c41075
parent71bb60815630574bf710b8ce8a7d3b0e48b5a985 (diff)
downloadotp-596921c3467b8e6b06340e492c3fbba687b74d01.tar.gz
otp-596921c3467b8e6b06340e492c3fbba687b74d01.tar.bz2
otp-596921c3467b8e6b06340e492c3fbba687b74d01.zip
v3_codegen: Remove unnecessary adding of variable to set
The variable being added will already be there (added by v3_kernel).
-rw-r--r--lib/compiler/src/v3_codegen.erl11
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/compiler/src/v3_codegen.erl b/lib/compiler/src/v3_codegen.erl
index 409adcb546..0a1e7aeb45 100644
--- a/lib/compiler/src/v3_codegen.erl
+++ b/lib/compiler/src/v3_codegen.erl
@@ -357,14 +357,9 @@ match(#k_alt{anno=A,first=Kf,then=Kt}, Ls, I, Vdb0) ->
F = match(Kf, Ls, I+1, Vdb1),
T = match(Kt, Ls, I+1, Vdb1),
#k_alt{anno=[],first=F,then=T};
-match(#k_select{anno=A,var=V,types=Kts}=Select, Ls0, I, Vdb0) ->
- Vanno = get_kanno(V),
- Ls1 = case member(no_usage, Vanno) of
- false -> add_element(V#k_var.name, Ls0);
- true -> Ls0
- end,
- Vdb1 = use_vars(union(A#k.us, Ls1), I, Vdb0),
- Ts = [type_clause(Tc, Ls1, I+1, Vdb1) || Tc <- Kts],
+match(#k_select{anno=A,types=Kts}=Select, Ls, I, Vdb0) ->
+ Vdb1 = use_vars(union(A#k.us, Ls), I, Vdb0),
+ Ts = [type_clause(Tc, Ls, I+1, Vdb1) || Tc <- Kts],
Select#k_select{anno=[],types=Ts};
match(#k_guard{anno=A,clauses=Kcs}, Ls, I, Vdb0) ->
Vdb1 = use_vars(union(A#k.us, Ls), I, Vdb0),