diff options
author | Björn-Egil Dahlberg <[email protected]> | 2014-08-26 19:41:53 +0200 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2014-08-26 19:49:01 +0200 |
commit | d76a8c75d62c8075b6d3d46003d50d266cd1a6ca (patch) | |
tree | 5df7dcbfdf6fbe36148f868dbda7a56f19576163 /lib/compiler/src | |
parent | 6637d75caf2033619a0419ce4418302f7d65388e (diff) | |
download | otp-d76a8c75d62c8075b6d3d46003d50d266cd1a6ca.tar.gz otp-d76a8c75d62c8075b6d3d46003d50d266cd1a6ca.tar.bz2 otp-d76a8c75d62c8075b6d3d46003d50d266cd1a6ca.zip |
compiler: Fix v3_core Maps pair chains
Check for literals instead of variables when constructing chains.
Diffstat (limited to 'lib/compiler/src')
-rw-r--r-- | lib/compiler/src/v3_core.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/compiler/src/v3_core.erl b/lib/compiler/src/v3_core.erl index dd835a6a9f..1223e69ffe 100644 --- a/lib/compiler/src/v3_core.erl +++ b/lib/compiler/src/v3_core.erl @@ -827,10 +827,10 @@ map_pair_block([{Op,L,K0,V0}|Es],Ces,Esp,St0) -> A = lineno_anno(L, St2), Pair0 = map_op_to_c_map_pair(Op), Pair1 = Pair0#c_map_pair{anno=A,key=K,val=V}, - case cerl:is_c_var(K) of - false -> - map_pair_block(Es,[Pair1|Ces],Ep0 ++ Ep1 ++ Esp,St2); + case cerl:is_literal(K) of true -> + map_pair_block(Es,[Pair1|Ces],Ep0 ++ Ep1 ++ Esp,St2); + false -> {{Ces,Esp},{[Pair1],Ep0++Ep1},Es,St2} end; map_pair_block([],Ces,Esp,St) -> |