aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src/v3_life.erl
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2014-01-13 17:33:44 +0100
committerBjörn-Egil Dahlberg <[email protected]>2014-01-29 11:08:48 +0100
commit1f6c5e88f4f387cc27c9affbdf1ceaae7cfdcfd3 (patch)
treef3ae17288f22e14b5112a9f8818786cb4db9a078 /lib/compiler/src/v3_life.erl
parent3645dc6b15d4fdd79768b92bb598c264005a8689 (diff)
downloadotp-1f6c5e88f4f387cc27c9affbdf1ceaae7cfdcfd3.tar.gz
otp-1f6c5e88f4f387cc27c9affbdf1ceaae7cfdcfd3.tar.bz2
otp-1f6c5e88f4f387cc27c9affbdf1ceaae7cfdcfd3.zip
compiler: Squash #k_map_pair_*{} to #k_map_pair{}
Simplify compiler internals for kernel passes.
Diffstat (limited to 'lib/compiler/src/v3_life.erl')
-rw-r--r--lib/compiler/src/v3_life.erl8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/compiler/src/v3_life.erl b/lib/compiler/src/v3_life.erl
index a3bd781c98..ae928e955c 100644
--- a/lib/compiler/src/v3_life.erl
+++ b/lib/compiler/src/v3_life.erl
@@ -369,9 +369,9 @@ literal(#k_tuple{es=Es}, Ctxt) ->
{tuple,literal_list(Es, Ctxt)};
literal(#k_map{var=Var,es=Es}, Ctxt) ->
{map,literal(Var, Ctxt),literal_list(Es, Ctxt)};
-literal(#k_map_pair_assoc{key=K,val=V}, Ctxt) ->
+literal(#k_map_pair{op=assoc,key=K,val=V}, Ctxt) ->
{map_pair_assoc,literal(K, Ctxt),literal(V, Ctxt)};
-literal(#k_map_pair_exact{key=K,val=V}, Ctxt) ->
+literal(#k_map_pair{op=exact,key=K,val=V}, Ctxt) ->
{map_pair_exact,literal(K, Ctxt),literal(V, Ctxt)};
literal(#k_literal{val=V}, _Ctxt) ->
{literal,V}.
@@ -404,9 +404,7 @@ literal2(#k_tuple{es=Es}, Ctxt) ->
{tuple,literal_list2(Es, Ctxt)};
literal2(#k_map{es=Es}, Ctxt) ->
{map,literal_list2(Es, Ctxt)};
-literal2(#k_map_pair_assoc{key=K,val=V}, Ctxt) ->
- {map_pair,literal2(K, Ctxt),literal2(V, Ctxt)};
-literal2(#k_map_pair_exact{key=K,val=V}, Ctxt) ->
+literal2(#k_map_pair{key=K,val=V}, Ctxt) ->
{map_pair,literal2(K, Ctxt),literal2(V, Ctxt)}.
literal_list2(Ks, Ctxt) ->