aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2015-03-16 14:45:17 +0100
committerBjörn-Egil Dahlberg <[email protected]>2015-03-19 14:57:55 +0100
commit7a9b4fe58c17c95c9be0ad13d33fce5042db24b2 (patch)
tree915669ea4a6a82376a2bc6a118786d84dc951f82 /erts
parent401e2544564526039ac87b3ffe79eb8af30b37b4 (diff)
downloadotp-7a9b4fe58c17c95c9be0ad13d33fce5042db24b2.tar.gz
otp-7a9b4fe58c17c95c9be0ad13d33fce5042db24b2.tar.bz2
otp-7a9b4fe58c17c95c9be0ad13d33fce5042db24b2.zip
erts: Add map decomposition wrappers
* erts_internal:map_type/1 * erts_internal:map_hashmap_children/1
Diffstat (limited to 'erts')
-rw-r--r--erts/preloaded/src/erts_internal.erl19
1 files changed, 18 insertions, 1 deletions
diff --git a/erts/preloaded/src/erts_internal.erl b/erts/preloaded/src/erts_internal.erl
index 2c5bd82cf0..5756d80424 100644
--- a/erts/preloaded/src/erts_internal.erl
+++ b/erts/preloaded/src/erts_internal.erl
@@ -30,7 +30,7 @@
-export([await_port_send_result/3]).
-export([cmp_term/2]).
--export([map_to_tuple_keys/1]).
+-export([map_to_tuple_keys/1, map_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]).
@@ -178,3 +178,20 @@ 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) ->
+ erlang:nif_error(undefined).
+
+%% return the internal hashmap sub-nodes from
+%% a hashmap node
+-spec map_hashmap_children(M) -> Children when
+ M :: map(), %% hashmap node
+ Children :: [map() | nonempty_improper_list(term(),term())].
+
+map_hashmap_children(_M) ->
+ erlang:nif_error(undefined).