diff options
author | John Högberg <[email protected]> | 2019-06-11 08:16:28 +0200 |
---|---|---|
committer | John Högberg <[email protected]> | 2019-06-11 08:16:28 +0200 |
commit | 915cea848908e486251f198a3c3e0f921bd4785f (patch) | |
tree | f98c807893a53cc05748cf2011e899a8fc0dde9c /lib/compiler/src | |
parent | 16309570f09b2bf2223ba537a7be09f1318b4718 (diff) | |
parent | 50c9a2e0f0668bcdc0d2779d450d28bdd8c8926c (diff) | |
download | otp-915cea848908e486251f198a3c3e0f921bd4785f.tar.gz otp-915cea848908e486251f198a3c3e0f921bd4785f.tar.bz2 otp-915cea848908e486251f198a3c3e0f921bd4785f.zip |
Merge branch 'maint'
* maint:
erts: Fix bad loader optimization of get_tuple_element
beam_ssa_type: Fix incorrect bitstring unit determination
Diffstat (limited to 'lib/compiler/src')
-rw-r--r-- | lib/compiler/src/beam_ssa_type.erl | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/compiler/src/beam_ssa_type.erl b/lib/compiler/src/beam_ssa_type.erl index f1c0030b3c..612277393e 100644 --- a/lib/compiler/src/beam_ssa_type.erl +++ b/lib/compiler/src/beam_ssa_type.erl @@ -927,15 +927,8 @@ type({bif,Bif}, Args, Ts, _Ds) -> Type -> Type end; -type(bs_init, [#b_literal{val=Type}|Args], _Ts, _Ds) -> - case {Type,Args} of - {new,[_,#b_literal{val=Unit}]} -> - {binary,Unit}; - {append,[_,_,#b_literal{val=Unit}]} -> - {binary,Unit}; - {private_append,[_,_,#b_literal{val=Unit}]} -> - {binary,Unit} - end; +type(bs_init, _Args, _Ts, _Ds) -> + {binary, 1}; type(bs_extract, [Ctx], Ts, _Ds) -> #t_bs_match{type=Type} = get_type(Ctx, Ts), Type; |