aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2014-03-13 17:44:57 +0100
committerBjörn-Egil Dahlberg <[email protected]>2014-03-17 17:47:37 +0100
commitd334837dfe34cc4085d29ff50293b6c1f3b15441 (patch)
tree8455150a1062ce831f7b943581180fa57e1fb2cc
parentfdda3a16a4f37e44c496b9fef55b763afa4d77ac (diff)
downloadotp-d334837dfe34cc4085d29ff50293b6c1f3b15441.tar.gz
otp-d334837dfe34cc4085d29ff50293b6c1f3b15441.tar.bz2
otp-d334837dfe34cc4085d29ff50293b6c1f3b15441.zip
hipe: Properly identify map() type form terms
-rw-r--r--lib/hipe/cerl/erl_types.erl5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/hipe/cerl/erl_types.erl b/lib/hipe/cerl/erl_types.erl
index 32390045e3..aa69b57fa2 100644
--- a/lib/hipe/cerl/erl_types.erl
+++ b/lib/hipe/cerl/erl_types.erl
@@ -218,6 +218,10 @@
%%-define(DO_ERL_TYPES_TEST, true).
-compile({no_auto_import,[min/2,max/2]}).
+%% HiPE does not understand Maps
+%% (guard function is_map/1 in t_from_term/1)
+-compile(no_native).
+
-ifdef(DO_ERL_TYPES_TEST).
-export([test/0]).
-else.
@@ -2156,6 +2160,7 @@ t_from_term(T) when is_integer(T) -> t_integer(T);
t_from_term(T) when is_pid(T) -> t_pid();
t_from_term(T) when is_port(T) -> t_port();
t_from_term(T) when is_reference(T) -> t_reference();
+t_from_term(T) when is_map(T) -> t_map();
t_from_term(T) when is_tuple(T) ->
t_tuple([t_from_term(E) || E <- tuple_to_list(T)]).