diff options
author | John Högberg <[email protected]> | 2019-02-04 10:42:02 +0100 |
---|---|---|
committer | John Högberg <[email protected]> | 2019-02-04 13:06:11 +0100 |
commit | 6f2171c6f33baddb2afac8e1dd982c839aefcd2f (patch) | |
tree | ea59efbcc8c99215aa277c7d160f00ee1f37f96d /lib | |
parent | 4b3c3ae0bdcab6028faa5a5ea3e4076ce6af5de4 (diff) | |
download | otp-6f2171c6f33baddb2afac8e1dd982c839aefcd2f.tar.gz otp-6f2171c6f33baddb2afac8e1dd982c839aefcd2f.tar.bz2 otp-6f2171c6f33baddb2afac8e1dd982c839aefcd2f.zip |
beam_validator: Remove unreachable case clause
Diffstat (limited to 'lib')
-rw-r--r-- | lib/compiler/src/beam_validator.erl | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/lib/compiler/src/beam_validator.erl b/lib/compiler/src/beam_validator.erl index b56d53d4ce..b66eb0074c 100644 --- a/lib/compiler/src/beam_validator.erl +++ b/lib/compiler/src/beam_validator.erl @@ -1407,16 +1407,13 @@ update_eq_types(LHS, RHS, Vst0) -> assign_1(Src, Dst, Vst0) -> Type = get_move_term_type(Src, Vst0), Vst = set_type_reg(Type, Dst, Vst0), - case Src of - {Kind,_} when Kind =:= x; Kind =:= y -> - #vst{current=St0} = Vst, - #st{aliases=Aliases0} = St0, - Aliases = Aliases0#{Src=>Dst,Dst=>Src}, - St = St0#st{aliases=Aliases}, - Vst#vst{current=St}; - _ -> - Vst - end. + + #vst{current=St0} = Vst, + #st{aliases=Aliases0} = St0, + Aliases = Aliases0#{Src=>Dst,Dst=>Src}, + St = St0#st{aliases=Aliases}, + + Vst#vst{current=St}. set_aliased_type(Type, Reg, #vst{current=#st{aliases=Aliases}}=Vst0) -> Vst1 = set_type(Type, Reg, Vst0), @@ -1451,7 +1448,6 @@ set_type_reg(Type, Src, Dst, Vst) -> _ -> set_type_reg(Type, Dst, Vst) end. - set_type_reg(Type, Reg, Vst) -> set_type_reg_expr(Type, none, Reg, Vst). |