diff options
author | Björn-Egil Dahlberg <[email protected]> | 2014-02-21 15:48:57 +0100 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2014-02-21 15:48:57 +0100 |
commit | 91e3f8f65963ada7b923fcf8531baaca24f484db (patch) | |
tree | 642d1a88db1604b8df0cda1ff0048e9ae6231a36 /lib/compiler/src/cerl.erl | |
parent | db911c1f15372d2dadf06e8502506b0936a4fbb3 (diff) | |
download | otp-91e3f8f65963ada7b923fcf8531baaca24f484db.tar.gz otp-91e3f8f65963ada7b923fcf8531baaca24f484db.tar.bz2 otp-91e3f8f65963ada7b923fcf8531baaca24f484db.zip |
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. |