From 31465f4296bc0b02832c7712402f41e18207aadd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Wed, 6 Dec 2017 07:45:34 +0100 Subject: v3_codegen: Remove unnecessary clause for handling #cg_block{} The function guard_cg/5 handles constructs found within the records #k_guard_clause{] and #k_protected{}. Since #k_guard_clause{} can only contain a #k_protected{}, and #k_protected{} in turn cannot contain a #cg_block{}, the clause for handling #cg_block{} in guard_cg/5 is never executed and can be removed. --- lib/compiler/src/v3_codegen.erl | 2 -- 1 file changed, 2 deletions(-) (limited to 'lib') diff --git a/lib/compiler/src/v3_codegen.erl b/lib/compiler/src/v3_codegen.erl index 0a1e7aeb45..cfc0bcf9ba 100644 --- a/lib/compiler/src/v3_codegen.erl +++ b/lib/compiler/src/v3_codegen.erl @@ -1487,8 +1487,6 @@ guard_clause_cg(#k_guard_clause{anno=#l{vdb=Vdb},guard=G,body=B}, Fail, Bef, St0 guard_cg(#k_protected{arg=Ts,ret=Rs,anno=#l{i=I,vdb=Pdb}}, Fail, _Vdb, Bef, St) -> protected_cg(Ts, Rs, Fail, I, Pdb, Bef, St); -guard_cg(#cg_block{es=Ts,anno=#l{i=I,vdb=Bdb}}, Fail, _Vdb, Bef, St) -> - guard_cg_list(Ts, Fail, I, Bdb, Bef, St); guard_cg(#k_test{anno=#l{i=I},op=Test0,args=As,inverted=Inverted}, Fail, Vdb, Bef, St0) -> #k_remote{mod=#k_atom{val=erlang},name=#k_atom{val=Test}} = Test0, -- cgit v1.2.3