aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ose
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2015-02-06 13:22:20 +0100
committerBjörn Gustavsson <[email protected]>2015-03-09 10:10:27 +0100
commit9e15be5f241730b127d89dca01c6ad5f1e7508d7 (patch)
treefd02b9b724b079e6d8a3817a959f7292ac478eeb /lib/ose
parente2ced63dfaf14f38d2a334d51b3ca45030d55e0c (diff)
downloadotp-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 'lib/ose')
0 files changed, 0 insertions, 0 deletions