aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src/v3_codegen.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2013-10-03 12:58:54 +0200
committerBjörn-Egil Dahlberg <[email protected]>2014-01-28 15:56:28 +0100
commit760ed909f8e2a655100ea773829c7d0e7dd40088 (patch)
tree1b79bd3c8076bac00a1cf7f609b9f63820686fad /lib/compiler/src/v3_codegen.erl
parentc0bb7f866257168e0a05110767fc7096a93d351d (diff)
downloadotp-760ed909f8e2a655100ea773829c7d0e7dd40088.tar.gz
otp-760ed909f8e2a655100ea773829c7d0e7dd40088.tar.bz2
otp-760ed909f8e2a655100ea773829c7d0e7dd40088.zip
Pass the map pair operators through to the v3_codegen pass
Diffstat (limited to 'lib/compiler/src/v3_codegen.erl')
-rw-r--r--lib/compiler/src/v3_codegen.erl17
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/compiler/src/v3_codegen.erl b/lib/compiler/src/v3_codegen.erl
index e8eec08323..c1d555efac 100644
--- a/lib/compiler/src/v3_codegen.erl
+++ b/lib/compiler/src/v3_codegen.erl
@@ -1502,16 +1502,17 @@ set_cg([{var,R}], {map,SrcMap,Es}, Le, Vdb, Bef,
_ -> SrcMap
end,
- % MapPairs in put_map must be sorted in ascending Key Order
- % Key literals must be unique when arriving here in v3_codegen
+ %% MapPairs in put_map must be sorted in ascending Key order.
+ %% Key literals must be unique when arriving here in v3_codegen.
- SortedEs = lists:sort(fun
- ({map_pair,{_T1,K1},_},{map_pair,{_T2,K2},_}) when K1 < K2 -> true;
- ({map_pair,{_,_},_},{map_pair,{_,_},_}) -> false
- end, Es),
+ SortedEs = lists:sort(fun({_,{_T1,K1},_},{_,{_T2,K2},_}) ->
+ K1 =< K2
+ end, Es),
List = flatmap(fun
- ({map_pair,K,{var,V}}) -> [K,fetch_var(V, Int0)];
- ({map_pair,K,E}) -> [K,E]
+ ({map_pair_assoc,K,{var,V}}) -> [K,fetch_var(V, Int0)];
+ ({map_pair_exact,K,{var,V}}) -> [K,fetch_var(V, Int0)];
+ ({map_pair_assoc,K,E}) -> [K,E];
+ ({map_pair_exact,K,E}) -> [K,E]
end, SortedEs),
Live = max_reg(Bef#sr.reg),
Int1 = clear_dead(Int0, Le#l.i, Vdb),