diff options
author | Björn-Egil Dahlberg <[email protected]> | 2014-02-24 14:28:22 +0100 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2014-02-24 14:28:22 +0100 |
commit | 4acee7b02b53d785c444e886c39ed82ab76b52fe (patch) | |
tree | 2d5110c59ad0022d43f97e76681b13e5dec58ea7 /lib/compiler/src/cerl.erl | |
parent | ce614726e9fb19b462ed41a2f020b68ef98cd532 (diff) | |
parent | 771fa6d1f96684b61ed5f6033db51f5b0a55ec19 (diff) | |
download | otp-4acee7b02b53d785c444e886c39ed82ab76b52fe.tar.gz otp-4acee7b02b53d785c444e886c39ed82ab76b52fe.tar.bz2 otp-4acee7b02b53d785c444e886c39ed82ab76b52fe.zip |
Merge branch 'egil/maps/fix-cerl-inlining'
* egil/maps/fix-cerl-inlining:
compiler: Update map_SUITE to handle inlining
erts: Maps src instructions can't be literals
compiler: Fix map inlining
compiler: Add variable coverage of map in cerl
Diffstat (limited to 'lib/compiler/src/cerl.erl')
-rw-r--r-- | lib/compiler/src/cerl.erl | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/lib/compiler/src/cerl.erl b/lib/compiler/src/cerl.erl index 60a8559950..3c121f3b04 100644 --- a/lib/compiler/src/cerl.erl +++ b/lib/compiler/src/cerl.erl @@ -124,8 +124,9 @@ %% keep map exports here for now map_es/1, - update_c_map/2, - ann_c_map/2, + map_val/1, + update_c_map/3, + ann_c_map/3, map_pair_op/1,map_pair_key/1,map_pair_val/1, update_c_map_pair/4, ann_c_map_pair/4 @@ -1579,11 +1580,15 @@ ann_make_list(_, [], Node) -> map_es(#c_map{es = Es}) -> Es. -ann_c_map(As, Es) -> - #c_map{es = Es, anno = As }. +-spec map_val(c_map()) -> cerl(). +map_val(#c_map{var = M}) -> + M. -update_c_map(Old, Es) -> - #c_map{es = Es, anno = get_ann(Old)}. +ann_c_map(As,M,Es) -> + #c_map{var=M,es = Es, anno = As }. + +update_c_map(Old,M,Es) -> + #c_map{var=M, es = Es, anno = get_ann(Old)}. map_pair_key(#c_map_pair{key=K}) -> K. map_pair_val(#c_map_pair{val=V}) -> V. |