diff options
author | John Högberg <[email protected]> | 2019-06-11 08:14:59 +0200 |
---|---|---|
committer | John Högberg <[email protected]> | 2019-06-11 08:14:59 +0200 |
commit | 05d316d93ddb4796b03a4a04175fd8c09b0092be (patch) | |
tree | 658beea07a290fd9463b4280a6f58e80060efed6 /lib/compiler/src | |
parent | a8ba18249d6fd3a913f320bdeeb8b9ea5eef2888 (diff) | |
parent | a726c015867beffe15cc20ee22e32778678e8fdf (diff) | |
download | otp-05d316d93ddb4796b03a4a04175fd8c09b0092be.tar.gz otp-05d316d93ddb4796b03a4a04175fd8c09b0092be.tar.bz2 otp-05d316d93ddb4796b03a4a04175fd8c09b0092be.zip |
Merge branch 'john/compiler/fix-bad-bitstring-type-opt/OTP-15872' into maint
* john/compiler/fix-bad-bitstring-type-opt/OTP-15872:
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 57fd7fec60..68920e7dd3 100644 --- a/lib/compiler/src/beam_ssa_type.erl +++ b/lib/compiler/src/beam_ssa_type.erl @@ -840,15 +840,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; |