aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_map.h
AgeCommit message (Collapse)Author
2017-10-13erts: Implement maps path iteratorLukas Larsson
2017-10-13erts: Implement map iterator using a stackLukas Larsson
This version does not work great as the subtrees created are not proper hash maps. Also it is not all that performant as the extra allocations to keep the stack there is expensive.
2017-05-04Update copyright yearRaimo Niskanen
2017-04-22erts: Support custom salt in enif_hashGuilherme Andrade
2016-07-14erts: Add erts_map_from_ks_and_vsLukas Larsson
2016-04-22erts: Add BIF maps:take/2Björn-Egil Dahlberg
2016-04-15erts: Calculate flatmap value offsetLukas Larsson
2016-03-15update copyright-yearHenrik Nord
2015-12-08Merge branch 'sverk/dist-ctrl-msg-overflow' into ↵Sverker Eriksson
sverk/dist-ctrl-msg-overflow-master
2015-12-07erts: Tweak hashmap heap size estimationSverker Eriksson
1. Change order between mul and div to not lose too much in integer divisions. 2. Fix estimation in DEBUG to really be an *under* estimation.
2015-06-24erts: Remove halfword basic relative heap operationsBjörn-Egil Dahlberg
2015-06-24erts: Remove HALFWORD_HEAP definitionBjörn-Egil Dahlberg
2015-06-18Change license text to APLv2Bruce Yinhe
2015-06-15erts: Remove hashmap probabilistic heap overestimationSverker Eriksson
by adding a dynamic heap factory. "binary_to_term" is now a hybrid solution with both a call to decoded_size() to calculate needed heap space AND possible dynamic allocation of more heap space if needed for big maps. The heap size returned from decoded_size() is guaranteed to be sufficient for all term heap data except for hashmap nodes. All hashmap nodes are created at the end of dec_term() by invoking the heap factory interface that may allocate more heap space on process heap or in fragments. With this commit it is no longer guaranteed that a message is confined to only one heap fragment.
2015-03-25erts: Combine flat and hash maps under one unifying tagBjörn-Egil Dahlberg
2015-03-24erts: Remove HAMT_SUBTAG_NODE_ARRAYSverker Eriksson
This will also fix a bug in term_to_binary treating full nodes as tuples and emiting LIST_EXT for leafs.
2015-03-19erts: Ensure maps uses _rel functions in halfwordBjörn-Egil Dahlberg
2015-03-13erts: Restrict GCC intrinsics by compiler versionBjörn-Egil Dahlberg
Intrinsics __builtin_clz and __builtin_popcount are only valid on GCC version 3.4 and above.
2015-03-12erts: Set Maps small limit to 32 itemsBjörn-Egil Dahlberg
Use small limit 3 in debug case
2015-03-12erts: Make hashmap iterator more flexibleSverker Eriksson
to allow mixing of 'next' and 'prev' operations.
2015-03-12erts: Refactor maps naming conventionSverker Eriksson
flatmap: Small map hashmap: Large map map: flatmap or hashmap
2015-03-12erts: Add hashmap_iterator_prev to mapsBjörn-Egil Dahlberg
2015-03-12erts: Tweak over estimation of hashmap size for binary_to_termSverker Eriksson
Strategy: Calculate an over estimation of heap size that will give such a low probability for overflow, that "it will not happen". Scary assumption 1: Uniformly distributed hash values. Scary assumption 2: Tree size is normally distributed (right?)
2015-03-12erts: Reject duplicate keys for hamt in binary_to_termSverker Eriksson
2015-03-12First stab at binary_to_term for hamtSverker Eriksson
with over estimation of heap size.
2015-03-12erts: Refactor hashmap_from_ks_and_vsBjörn-Egil Dahlberg
Use extra key and value if needed.
2015-03-12erts: Fix update_map_assoc instructionBjörn-Egil Dahlberg
Did not build a hashmap once the small limit was exceeded.
2015-03-12erts: Add make_internal_hashSverker Eriksson
2015-03-12erts: Split hashmap_insert to down and upBjörn-Egil Dahlberg
2015-03-12erts: Handle hashmap in get_map_element(s) instructionsBjörn-Egil Dahlberg
2015-03-12erts: Remove erl_hashmap.[ch] filesBjörn-Egil Dahlberg
2015-03-12erts: Move hashmap:from_list/1 to mapsBjörn-Egil Dahlberg
2015-03-12erts: Move hashmap:get/2, find/2 and is_key/2 to mapsBjörn-Egil Dahlberg
2015-03-12erts: Move hashmap:to_list/1, keys/1 and values/1 to mapsBjörn-Egil Dahlberg
2014-08-20Return pointer to value in erts_maps_get()Anthony Ramine
While at it, implement erts_maps_get_rel() for halfword support.
2014-01-29erts: Add map construction to driver APISverker Eriksson
erl_drv_output_term() and erl_drv_send_term() can send messages containing maps with the use of the new ERL_DRV_MAP. The driver API minor version is updated as new functionality is added.
2014-01-29erts: Add NIFs for MapsBjörn-Egil Dahlberg
- int enif_is_map(ErlNifEnv* env, ERL_NIF_TERM map) - int enif_get_map_size(ErlNifEnv *env, ERL_NIF_TERM, int*) - ERL_NIF_TERM enif_make_new_map(ErlNifEnv *env) - int enif_make_map_put(ErlNifEnv *env, ERL_NIF_TERM map_in, ERL_NIF_TERM key, ERL_NIF_TERM value, ERL_NIF_TERM* map_out) - int enif_get_map_value(ErlNifEnv *env, ERL_NIF_TERM map, ERL_NIF_TERM key, ERL_NIF_TERM* value) - int enif_find_map_value(ErlNifEnv *env, ERL_NIF_TERM map, ERL_NIF_TERM key, ERL_NIF_TERM* value) - int enif_make_map_update(ErlNifEnv *env, ERL_NIF_TERM map_in, ERL_NIF_TERM key, ERL_NIF_TERM value, ERL_NIF_TERM* map_out) - int enif_make_map_remove(ErlNifEnv *env, ERL_NIF_TERM map_in, ERL_NIF_TERM key, ERL_NIF_TERM* map_out) - int enif_map_iterator_create(ErlNifEnv *env, ERL_NIF_TERM map, ErlNifMapIterator *iter) - void enif_map_iterator_destroy(ErlNifEnv *env, ErlNifMapIterator *iter) - int enif_map_iterator_next(ErlNifEnv *env, ErlNifMapIterator *iter) - int enif_map_iterator_get_pair(ErlNifEnv *env, ErlNifMapIterator *iter, ERL_NIF_TERM *key, ERL_NIF_TERM *value)
2014-01-28erts: Introduce more Maps BIFsBjörn-Egil Dahlberg
* map:remove/2 * map:keys/1 * map:values/1 * map:is_key/2 * map:update/3 - Equivalent to ':=' operator in #{ K := V } maps. * map:from_list/1 - map:from_list/1 takes any unsorted key/value list, [{K,V}], and produces a map. Duplicate keys are removed. The latest key is kept. * map:find/2 - Searches for a pair that *equals* input key. * map:merge/2 - Merge two maps to one map.
2014-01-28erts: Initial Map instructions, type and structureBjörn-Egil Dahlberg