diff options
author | Björn Gustavsson <[email protected]> | 2010-04-27 11:11:38 +0200 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2010-05-20 12:20:49 +0200 |
commit | 0078862df75ff97827a09aee8e59fe3cf9343a5e (patch) | |
tree | 85abf7fc2deedeb2bf6c3f8190073f0c4477004e /lib/compiler/src | |
parent | 2bbfb378e90ac6569c950571c26a207ed8e559db (diff) | |
download | otp-0078862df75ff97827a09aee8e59fe3cf9343a5e.tar.gz otp-0078862df75ff97827a09aee8e59fe3cf9343a5e.tar.bz2 otp-0078862df75ff97827a09aee8e59fe3cf9343a5e.zip |
beam_block: Remove a clause that will never be executed
Since the introduction of literals in R12B, empty tuples
are literals. Thus the put_tuple/2 instruction is always
followed by at least one put/1 instruction. Therefore
the alloc_may_pass/1 function in beam_block no longer needs
a clause for for "put_tuple", because the clause for "put"
will always be reached first (since the instruction stream
is scanned in reverse execution order).
Note that if the compiler would generate a "put_tuple 0 Dst"
instruction for some unfathomable reason, we should still be
because the run-time system will now refuse to load a module
containing such an instruction.
Diffstat (limited to 'lib/compiler/src')
-rw-r--r-- | lib/compiler/src/beam_block.erl | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/compiler/src/beam_block.erl b/lib/compiler/src/beam_block.erl index 32703b4dd1..9c6f835ab0 100644 --- a/lib/compiler/src/beam_block.erl +++ b/lib/compiler/src/beam_block.erl @@ -201,7 +201,6 @@ move_allocates_2(Alloc, [], Acc) -> alloc_may_pass({set,_,_,{alloc,_,_}}) -> false; alloc_may_pass({set,_,_,{set_tuple_element,_}}) -> false; alloc_may_pass({set,_,_,put_list}) -> false; -alloc_may_pass({set,_,_,{put_tuple,_}}) -> false; alloc_may_pass({set,_,_,put}) -> false; alloc_may_pass({set,_,_,_}) -> true. |