Age | Commit message (Collapse) | Author |
|
as it does the same thing as enif_get_map_value.
Replace with placeholder to be ABI backward compatible on Windows
as long as enif_find_map_value is not called.
|
|
Maps may be encoded with keys in arbitrary order. This is fine,
as long as keys are unique.
|
|
to not continue comparing keys once it has been found.
|
|
HRelease was called with wrong arguments and left garbage on heap
when key was not found.
|
|
* erlang:term_to_binary/1
* erlang:binary_to_term/1
|
|
Maps internally uses term order to store keys in an ordered fashion.
|
|
Maps internally uses term order to store keys in an ordered fashion.
|
|
Compares terms where integer() < float().
|
|
Uses total order of types meaning int < float
|
|
|
|
- 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)
|
|
Name conforms to EEP.
|
|
|
|
|
|
The hashing a map in these functions uses the same strategy
as the other terms. The exception being a prime number with size
so we do not get erlang:phash(#{}) -> 1 which would be the same
as erlang:phash({}) and erlang:phash(<<>>). Same argument for
erlang:hash/1.
|
|
|
|
|
|
|
|
* 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.
|
|
To add a type-testing guard BIF, the following steps are needed:
* The BIF itself is added to bif.tab (note that it should be declared
using "ubif", not "bif"), and its implementation to erl_bif_op.c.
* erl_internal must be modified in 3 places: The type test must be
recognized as guard BIF, as a type test, and it must be auto-imported.
* There must be an instruction that implements the same type test as
the BIF (it will be used in guards). beam_utils:bif_to_test/3 must
be updated to recognize the new guard BIF.
|
|
|
|
|
|
|
|
|
|
To make it possible to build the entire OTP system, also define
dummys for the instructions in ops.tab.
|
|
It was not possible to preserve extra arguments in transformations.
The following (hypothetical) example will now work:
some_op Lit=c SizeArg Rest=* => move Lit x | some_op x SizeArg Rest
|
|
* vinoski/ds:
initial support for dirty schedulers and dirty NIFs
|
|
Add initial support for dirty schedulers.
There are two types of dirty schedulers: CPU schedulers and I/O
schedulers. By default, there are as many dirty CPU schedulers as there are
normal schedulers and as many dirty CPU schedulers online as normal
schedulers online. There are 10 dirty I/O schedulers (similar to the choice
of 10 as the default for async threads).
By default, dirty schedulers are disabled and conditionally compiled
out. To enable them, you must pass --enable-dirty-schedulers to the
top-level configure script when building Erlang/OTP.
Current dirty scheduler support requires the emulator to be built with SMP
support. This restriction will be lifted in the future.
You can specify the number of dirty schedulers with the command-line
options +SDcpu (for dirty CPU schedulers) and +SDio (for dirty I/O
schedulers). The +SDcpu option is similar to the +S option in that it takes
two numbers separated by a colon: C1:C2, where C1 specifies the number of
dirty schedulers available and C2 specifies the number of dirty schedulers
online. The +SDPcpu option allows numbers of dirty CPU schedulers available
and dirty CPU schedulers online to be specified as percentages, similar to
the existing +SP option for normal schedulers. The number of dirty CPU
schedulers created and dirty CPU schedulers online may not exceed the
number of normal schedulers created and normal schedulers online,
respectively. The +SDio option takes only a single number specifying the
number of dirty I/O schedulers available and online. There is no support
yet for programmatically changing at run time the number of dirty CPU
schedulers online via erlang:system_flag/2. Also, changing the number of
normal schedulers online via erlang:system_flag(schedulers_online,
NewSchedulersOnline) should ensure that there are no more dirty CPU
schedulers than normal schedulers, but this is not yet implemented. You can
retrieve the number of dirty schedulers by passing dirty_cpu_schedulers,
dirty_cpu_schedulers_online, or dirty_io_schedulers to
erlang:system_info/1.
Currently only NIFs are able to access dirty scheduler
functionality. Neither drivers nor BIFs currently support dirty
schedulers. This restriction will be addressed in the future.
If dirty scheduler support is present in the runtime, the initial status
line Erlang prints before presenting its interactive prompt will include
the indicator "[ds:C1:C2:I]" where "ds" indicates "dirty schedulers", "C1"
indicates the number of dirty CPU schedulers available, "C2" indicates the
number of dirty CPU schedulers online, and "I" indicates the number of
dirty I/O schedulers.
Document The dirty NIF API in the erl_nif man page. The API closely follows
Rickard Green's presentation slides from his talk "Future Extensions to the
Native Interface", presented at the 2011 Erlang Factory held in the San
Francisco Bay Area. Rickard's slides are available online at
http://bit.ly/1m34UHB .
Document the new erl command-line options, the additions to
erlang:system_info/1, and also add the erlang:system_flag/2 dirty scheduler
documentation even though it's not yet implemented.
To determine whether the dirty NIF API is available, native code can check
to see whether the C preprocessor macro ERL_NIF_DIRTY_SCHEDULER_SUPPORT is
defined. To check if dirty schedulers are available at run time, native
code can call the boolean enif_have_dirty_schedulers() function, and Erlang
code can call erlang:system_info(dirty_cpu_schedulers), which raises
badarg if no dirty scheduler support is available.
Add a simple dirty NIF test to the emulator NIF suite.
|
|
OTP-11628
* vinoski/rm-drv-async-cancel:
remove deprecated driver_async_cancel function
|
|
OTP-11618
* sverk/misc-bug-fixes:
erts: Fix faulty assert in match spec engine.
erts: Fix crash when comparing very large floats with integers
erts: Refactor big-float compare on HALFWORD to use C-stack
erts: Fix halfword compile errors in ESTACK
|
|
* egil/gc-increase-tenure-rate/OTP-11617:
erts: Increase gc tenure rate
|
|
* rickard/load_balance/OTP-11385:
Fix usage of non-empty run-queue flag
|
|
|
|
* rickard/load_balance/OTP-11385:
Disable scheduler utilization balancing if +scl true is passed
|
|
|
|
* rickard/load_balance/OTP-11385:
Add support for scheduler utilization balancing
|
|
* rickard/default_acul/OTP-11604:
erts: Use "+Muacul de" as default
|
|
For more information see documentation of the new command line argument +sub
|
|
* vinoski/system-flag-warn-msg:
fix system_flag deprecation warnings
OTP-11602
|
|
|
|
big_buf was one word too short on 32-bit emulators causing
memory corruption.
Seems like this did not cause a problem before the ESTACK memory layout
was changed in 172ebf11dc455e22b87f.
|
|
for the temporary conversion from float to big.
Preparation for coming bugfix of 'big_buf' array size.
|
|
Errors introduced in 172ebf11dc455e2
|
|
* sverk/term2bin-simplify:
erts: Refactor ESTACK & WSTACK to use a struct easy to "export"
erts: Fix benign ESTACK/WSTACK typo
erts: Fix compiler warnings for NO_JUMP_TABLE
erts: Run binary_SUITE:trapping even for 32bit
erts: Extend binary_SUITE:ttb_trap to also cover binary_to_term
erts: Remove the extra_root feature from the process structure
erts: Simplify term_to_binary by removing saved ESTACK from root set
|
|
OTP-11585
* sverk/bin2term-int-size-estimation-bug:
erts: Fix useless comparisons in binary_SUITE:external_size
erts: Reduce heap usage for binary_SUITE:deep
erts: Remove overestimation of heap space in binary_to_term
|
|
* egil/fix-bs_get_integer/OTP-11581:
erts: Fix bs_get_integer instruction
|
|
This is not a clean refactor. It changes the behaviour slightly
of E/WSTACK_RESTORE. The allocated stack from E/WSTACK_SAVE is used
as-is and not copied into default_stack. This will hopefully fix an
illusive memory leak that valgrind is reporting.
|
|
Passing cpu_topology or scheduler_bind_type to erlang:system_flag/2 results
in an error report warning that the argument is deprecated and is slated
for removal in erts-5.10/OTP-R16. Since we're already past that version and
no substitute approach has yet been decided for these features, keep the
deprecation warning but bump the removal version it mentions up to Erlang
18.
|
|
|
|
|