aboutsummaryrefslogtreecommitdiffstats
path: root/erts/preloaded/src
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2017-11-20 10:06:29 +0100
committerLukas Larsson <[email protected]>2017-11-20 10:06:29 +0100
commit7de66cbf895db8650e2b3253d910869c67989b35 (patch)
tree75dce536cf3f69215fcf7311af831c0efef57bc2 /erts/preloaded/src
parentd99803e7625e474dee40f0dfebf2b8092add0336 (diff)
parent10912210641fe7d784c4ba6398c24504200ed339 (diff)
downloadotp-7de66cbf895db8650e2b3253d910869c67989b35.tar.gz
otp-7de66cbf895db8650e2b3253d910869c67989b35.tar.bz2
otp-7de66cbf895db8650e2b3253d910869c67989b35.zip
Merge branch 'lukas/stdlib/maps_iterators/OTP-14012'
* lukas/stdlib/maps_iterators/OTP-14012: erts: Limit size of first iterator for hashmaps Update primary bootstrap Update preloaded modules erts: Remove erts_internal:maps_to_list/2 stdlib: Make io_lib and io_lib_pretty use maps iterator erts: Implement batching maps:iterator erts: Implement maps path iterator erts: Implement map iterator using a stack stdlib: Introduce maps iterator API Conflicts: bootstrap/lib/stdlib/ebin/io_lib.beam bootstrap/lib/stdlib/ebin/io_lib_pretty.beam erts/emulator/beam/bif.tab erts/preloaded/ebin/erlang.beam erts/preloaded/ebin/erts_internal.beam erts/preloaded/ebin/zlib.beam
Diffstat (limited to 'erts/preloaded/src')
-rw-r--r--erts/preloaded/src/erts_internal.erl23
1 files changed, 13 insertions, 10 deletions
diff --git a/erts/preloaded/src/erts_internal.erl b/erts/preloaded/src/erts_internal.erl
index 1f5c88c4b9..ffa9217c4d 100644
--- a/erts/preloaded/src/erts_internal.erl
+++ b/erts/preloaded/src/erts_internal.erl
@@ -32,7 +32,7 @@
-export([await_port_send_result/3]).
-export([cmp_term/2]).
-export([map_to_tuple_keys/1, term_type/1, map_hashmap_children/1,
- maps_to_list/2]).
+ map_next/3]).
-export([open_port/2, port_command/3, port_connect/2, port_close/1,
port_control/3, port_call/3, port_info/1, port_info/2]).
@@ -370,20 +370,23 @@ term_type(_T) ->
map_hashmap_children(_M) ->
erlang:nif_error(undefined).
+%% return the next assoc in the iterator and a new iterator
+-spec map_next(I, M, A) -> {K,V,NI} | list() when
+ I :: non_neg_integer(),
+ M :: map(),
+ K :: term(),
+ V :: term(),
+ A :: iterator | list(),
+ NI :: maps:iterator().
+
+map_next(_I, _M, _A) ->
+ erlang:nif_error(undefined).
+
-spec erts_internal:flush_monitor_messages(Ref, Multi, Res) -> term() when
Ref :: reference(),
Multi :: boolean(),
Res :: term().
-%% return a list of key value pairs, at most of length N
--spec maps_to_list(M,N) -> Pairs when
- M :: map(),
- N :: integer(),
- Pairs :: list().
-
-maps_to_list(_M, _N) ->
- erlang:nif_error(undefined).
-
%% erlang:demonitor(Ref, [flush]) traps to
%% erts_internal:flush_monitor_messages(Ref, Res) when
%% it needs to flush monitor messages.