From e4d80d01f8c91d998502046b148ca049eb566cfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Thu, 14 Feb 2019 07:08:14 +0100 Subject: Remove attempt to handle all bs_match_string instructions eb0b8da6e816 started to use a binary instead of a string in bs_match_string instructions. Remove a clause that attempts to handle the old form of bs_match_string from old .S files. This is pointless, because an old .S file is likely to contain a bs_context_to_binary instruction as well. The bs_context_to_binary is no longer recognized by `beam_validator`, so those old .S files will not work anyway. --- lib/compiler/src/beam_a.erl | 4 ---- 1 file changed, 4 deletions(-) (limited to 'lib') diff --git a/lib/compiler/src/beam_a.erl b/lib/compiler/src/beam_a.erl index 1ac892a8f1..0bccad1ecd 100644 --- a/lib/compiler/src/beam_a.erl +++ b/lib/compiler/src/beam_a.erl @@ -122,10 +122,6 @@ rename_instr({bs_private_append=I,F,Sz,U,Src,Flags,Dst}) -> {bs_init,F,{I,U,Flags},none,[Sz,Src],Dst}; rename_instr(bs_init_writable=I) -> {bs_init,{f,0},I,1,[{x,0}],{x,0}}; -rename_instr({test,bs_match_string=Op,F,[Ctx,Bits,{string,Str}]}) when is_list(Str) -> - %% When compiling from an old .S file. Starting from OTP 22, Str is a binary. - <> = list_to_binary(Str), - {test,Op,F,[Ctx,Bs]}; rename_instr({put_map_assoc,Fail,S,D,R,L}) -> {put_map,Fail,assoc,S,D,R,L}; rename_instr({put_map_exact,Fail,S,D,R,L}) -> -- cgit v1.2.3