aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2015-02-05 09:50:01 +0100
committerBjörn Gustavsson <[email protected]>2015-02-05 09:50:01 +0100
commit431c196486ebc3d6cc684419d8594eb26deaf846 (patch)
treebb7406385d38d3ce172559c52d532174c5377a65 /lib/compiler/src
parentc1e8eefea2822145100ce05453e8054ea29f4672 (diff)
parentf3a8efa2e4fa6f3f64ee38939103bfd55e78bc51 (diff)
downloadotp-431c196486ebc3d6cc684419d8594eb26deaf846.tar.gz
otp-431c196486ebc3d6cc684419d8594eb26deaf846.tar.bz2
otp-431c196486ebc3d6cc684419d8594eb26deaf846.zip
Merge branch 'maint'
* maint: Update primary bootstrap Correct unsafe optimization of '==' and '/=' Conflicts: bootstrap/lib/compiler/ebin/sys_core_fold.beam
Diffstat (limited to 'lib/compiler/src')
-rw-r--r--lib/compiler/src/sys_core_fold.erl5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/compiler/src/sys_core_fold.erl b/lib/compiler/src/sys_core_fold.erl
index 7066cebb2b..604c65f9b3 100644
--- a/lib/compiler/src/sys_core_fold.erl
+++ b/lib/compiler/src/sys_core_fold.erl
@@ -1221,6 +1221,11 @@ is_non_numeric([H|T]) ->
is_non_numeric(H) andalso is_non_numeric(T);
is_non_numeric(Tuple) when is_tuple(Tuple) ->
is_non_numeric_tuple(Tuple, tuple_size(Tuple));
+is_non_numeric(Map) when is_map(Map) ->
+ %% Note that 17.x and 18.x compare keys in different ways.
+ %% Be very conservative -- require that both keys and values
+ %% are non-numeric.
+ is_non_numeric(maps:to_list(Map));
is_non_numeric(Num) when is_number(Num) ->
false;
is_non_numeric(_) -> true.