diff options
author | Björn Gustavsson <[email protected]> | 2016-04-11 13:45:08 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2016-04-11 13:45:08 +0200 |
commit | 9d2dde09689246cd61a5e7bfdc8ca37884043a9c (patch) | |
tree | 28103683a37e38c5ba4c5e1313ef8c952f3d8fb9 /lib/compiler/src/beam_block.erl | |
parent | 01ac0d2cb316b97834eb1dbbe4a86d2a6be84f04 (diff) | |
parent | ab03678e87732407625150c202e177a85a025beb (diff) | |
download | otp-9d2dde09689246cd61a5e7bfdc8ca37884043a9c.tar.gz otp-9d2dde09689246cd61a5e7bfdc8ca37884043a9c.tar.bz2 otp-9d2dde09689246cd61a5e7bfdc8ca37884043a9c.zip |
Merge branch 'bjorn/raise'
* bjorn/raise:
Remove unreachable code after 'raise' instructions
Simplify the raise instruction to reduce code size
Diffstat (limited to 'lib/compiler/src/beam_block.erl')
-rw-r--r-- | lib/compiler/src/beam_block.erl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/compiler/src/beam_block.erl b/lib/compiler/src/beam_block.erl index d1052303e0..429b1aa010 100644 --- a/lib/compiler/src/beam_block.erl +++ b/lib/compiler/src/beam_block.erl @@ -88,7 +88,9 @@ collect_block([I|Is]=Is0, Acc) -> case collect(I) of error -> {reverse(Acc),Is0}; Instr -> collect_block(Is, [Instr|Acc]) - end. + end; +collect_block([], Acc) -> + {reverse(Acc),[]}. collect({allocate,N,R}) -> {set,[],[],{alloc,R,{nozero,N,0,[]}}}; collect({allocate_zero,N,R}) -> {set,[],[],{alloc,R,{zero,N,0,[]}}}; |