diff options
author | Björn Gustavsson <[email protected]> | 2018-11-25 08:11:52 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2018-11-28 11:36:54 +0100 |
commit | 96ac99d3e9b12295b7e8a70888fd1134a78e63a8 (patch) | |
tree | 9265a1416c674c5b50a96733f1c3e04f79e7ac8b /lib/compiler/src | |
parent | 2e59e2ab69d7f50c8a03b1c89528f8cf38a3a8b4 (diff) | |
download | otp-96ac99d3e9b12295b7e8a70888fd1134a78e63a8.tar.gz otp-96ac99d3e9b12295b7e8a70888fd1134a78e63a8.tar.bz2 otp-96ac99d3e9b12295b7e8a70888fd1134a78e63a8.zip |
Cover more code in beam_jump
The previous optimizations caused some code in beam_jump to
become uncovered. Add tests to cover more code. Also remove
a clause in beam_jump:opt/3 that does not seem possible to
cover anymore (this is safe, because the clause was an
optimization).
Diffstat (limited to 'lib/compiler/src')
-rw-r--r-- | lib/compiler/src/beam_jump.erl | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/lib/compiler/src/beam_jump.erl b/lib/compiler/src/beam_jump.erl index 57329338bf..8b0e3e32f8 100644 --- a/lib/compiler/src/beam_jump.erl +++ b/lib/compiler/src/beam_jump.erl @@ -429,16 +429,6 @@ opt([{test,_,{f,L}=Lbl,_}=I|[{jump,{f,L}}|_]=Is], Acc, St) -> %% as in the jump that follows -- thus it is not needed. opt(Is, Acc, St) end; -opt([{test,_,{f,L}=Lbl,_}=I|[{label,L}|_]=Is], Acc, St) -> - %% Similar to the above, except we have a fall-through rather than jump - %% Test Label Ops - %% label Label - case beam_utils:is_pure_test(I) of - false -> - opt(Is, [I|Acc], label_used(Lbl, St)); - true -> - opt(Is, Acc, St) - end; opt([{test,Test0,{f,L}=Lbl,Ops}=I|[{jump,To}|Is]=Is0], Acc, St) -> case is_label_defined(Is, L) of false -> |