aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src/v3_kernel.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compiler/src/v3_kernel.erl')
-rw-r--r--lib/compiler/src/v3_kernel.erl18
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/compiler/src/v3_kernel.erl b/lib/compiler/src/v3_kernel.erl
index f4ba60e529..44f853ec2b 100644
--- a/lib/compiler/src/v3_kernel.erl
+++ b/lib/compiler/src/v3_kernel.erl
@@ -497,12 +497,18 @@ translate_match_fail_1(Anno, As, Sub, #kern{ff=FF}) ->
translate_fc(Args) ->
[#c_literal{val=function_clause},make_list(Args)].
+%% FIXME: Not completed
map_pairs(Es, Sub, St) ->
- foldr(fun(#c_map_pair{key=K0,val=V0}, {Kes,Esp,St0}) ->
- {K,[],St1} = expr(K0, Sub, St0),
- {V,Ep,St2} = atomic(V0, Sub, St1),
- {[#k_map_pair{key=K,val=V}|Kes],Ep ++ Esp,St2}
- end, {[],[],St}, Es).
+ foldr(fun
+ (#c_map_pair_assoc{key=K0,val=V0}, {Kes,Esp,St0}) ->
+ {K,[],St1} = expr(K0, Sub, St0),
+ {V,Ep,St2} = atomic(V0, Sub, St1),
+ {[#k_map_pair{key=K,val=V}|Kes],Ep ++ Esp,St2};
+ (#c_map_pair_exact{key=K0,val=V0}, {Kes,Esp,St0}) ->
+ {K,[],St1} = expr(K0, Sub, St0),
+ {V,Ep,St2} = atomic(V0, Sub, St1),
+ {[#k_map_pair{key=K,val=V}|Kes],Ep ++ Esp,St2}
+ end, {[],[],St}, Es).
%% call_type(Module, Function, Arity) -> call | bif | apply | error.
%% Classify the call.
@@ -662,7 +668,7 @@ pattern(#c_tuple{anno=A,es=Ces}, Isub, Osub0, St0) ->
pattern(#c_map{anno=A,es=Ces}, Isub, Osub0, St0) ->
{Kes,Osub1,St1} = pattern_list(Ces, Isub, Osub0, St0),
{#k_map{anno=A,es=Kes},Osub1,St1};
-pattern(#c_map_pair{anno=A,key=Ck,val=Cv},Isub, Osub0, St0) ->
+pattern(#c_map_pair_exact{anno=A,key=Ck,val=Cv},Isub, Osub0, St0) ->
{Kk,Osub1,St1} = pattern(Ck, Isub, Osub0, St0),
{Kv,Osub2,St2} = pattern(Cv, Isub, Osub1, St1),
{#k_map_pair{anno=A,key=Kk,val=Kv},Osub2,St2};