diff options
author | Björn Gustavsson <[email protected]> | 2015-02-06 13:22:20 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2015-03-09 10:10:27 +0100 |
commit | 9e15be5f241730b127d89dca01c6ad5f1e7508d7 (patch) | |
tree | fd02b9b724b079e6d8a3817a959f7292ac478eeb /.mailmap | |
parent | e2ced63dfaf14f38d2a334d51b3ca45030d55e0c (diff) | |
download | otp-9e15be5f241730b127d89dca01c6ad5f1e7508d7.tar.gz otp-9e15be5f241730b127d89dca01c6ad5f1e7508d7.tar.bz2 otp-9e15be5f241730b127d89dca01c6ad5f1e7508d7.zip |
v3_core: Teach pat_alias/2 to eliminate duplicated variables
Duplicated variables as aliases in patterns, such as:
f({_,_}=Dup=Dup) -> ...
will work, but produce sub-optimal code similar to:
f({_,_}=Dup=NewVar) when Dup =:= NewVar -> ...
with one extra guard test for each duplicated variable.
Rewrite pat_alias/2 to eliminate all duplicated variables. While
we are at it, also simplify handling of tuples, conses, and literals
by using the data functions in the cerl module.
Diffstat (limited to '.mailmap')
0 files changed, 0 insertions, 0 deletions