aboutsummaryrefslogtreecommitdiffstats
path: root/erts/preloaded/src
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2015-12-08 15:15:17 +0100
committerBjörn-Egil Dahlberg <[email protected]>2015-12-08 15:15:17 +0100
commitb9a239c3a5c33819f4539380e8e8f6e8cce95072 (patch)
tree90fb90804e4dd69796188567a03a8523afe182a3 /erts/preloaded/src
parent40beec43a477062dc81c4dd29eb9dc6a1db0ee9a (diff)
parent4f3212c9a84e6feaea1bbffdc1972e4760cc7815 (diff)
downloadotp-b9a239c3a5c33819f4539380e8e8f6e8cce95072.tar.gz
otp-b9a239c3a5c33819f4539380e8e8f6e8cce95072.tar.bz2
otp-b9a239c3a5c33819f4539380e8e8f6e8cce95072.zip
Merge branch 'egil/term_type/OTP-13172'
* egil/term_type/OTP-13172: Test erts_internal:term_type/1 erts: Let term_type/1 encompass all types erts: Change erts_internal:map_type/1 into term_type/1
Diffstat (limited to 'erts/preloaded/src')
-rw-r--r--erts/preloaded/src/erts_internal.erl20
1 files changed, 13 insertions, 7 deletions
diff --git a/erts/preloaded/src/erts_internal.erl b/erts/preloaded/src/erts_internal.erl
index 7ed4efea4b..ce0a6a1d9e 100644
--- a/erts/preloaded/src/erts_internal.erl
+++ b/erts/preloaded/src/erts_internal.erl
@@ -31,7 +31,7 @@
-export([await_port_send_result/3]).
-export([cmp_term/2]).
--export([map_to_tuple_keys/1, map_type/1, map_hashmap_children/1]).
+-export([map_to_tuple_keys/1, term_type/1, map_hashmap_children/1]).
-export([port_command/3, port_connect/2, port_close/1,
port_control/3, port_call/3, port_info/1, port_info/2]).
@@ -215,12 +215,18 @@ cmp_term(_A,_B) ->
map_to_tuple_keys(_M) ->
erlang:nif_error(undefined).
-%% return the internal map type
--spec map_type(M) -> Type when
- M :: map(),
- Type :: 'flatmap' | 'hashmap' | 'hashmap_node'.
-
-map_type(_M) ->
+%% return the internal term type
+-spec term_type(T) -> Type when
+ T :: term(),
+ Type :: 'flatmap' | 'hashmap' | 'hashmap_node'
+ | 'fixnum' | 'bignum' | 'hfloat'
+ | 'list' | 'tuple' | 'export' | 'fun'
+ | 'refc_binary' | 'heap_binary' | 'sub_binary'
+ | 'reference' | 'external_reference'
+ | 'pid' | 'external_pid' | 'port' | 'external_port'
+ | 'atom' | 'catch' | 'nil'.
+
+term_type(_T) ->
erlang:nif_error(undefined).
%% return the internal hashmap sub-nodes from