Age | Commit message (Collapse) | Author |
|
The line
%-opaque mp() :: {re_pattern, _, _, _, _}.
has been removed.
The mp() tuple is called 'opaque' in re(3), but it is not an opaque
type. The out-commented -opaque declaration was confusing.
|
|
* nox/maps-erl_prettypr:
stdlib: Add tests for Maps in erl_prettypr
Support maps in erl_prettypr
|
|
* nox/maps-improve-erl_eval:
Handle map fields in their own function in erl_eval
|
|
* fenollp/shell-expand-0arity-completely:
Shell: expand 0-arity functions all the way to closing parenthesis
OTP-11684
|
|
* josevalim/suppress-all-auto-imports:
Allow all auto imports to be suppressed at once
OTP-11682
|
|
* hsv/add_droplast_to_lists:
Added documentation of lists:droplast/1
Added tests for lists:droplast/1 to stdlib/lists_SUITE
stdlib/lists: Add function droplast/1 This functions drops the last element of a non-empty list.
|
|
|
|
|
|
|
|
Map fields (K := V, K => V) are not expressions and shouldn't be clauses of
erl_eval:expr/5.
|
|
The HiPE compiler crashes when trying to compile these files because
it does not currently support maps. So, add a -compile(no_native)
attribute to these files to allow the system to be made even when
configured with --enable-native-libs.
This is a temporary fix and will be removed when the HiPE compiler
gets proper support for maps.
|
|
* egil/maps/OTP-11616: (112 commits)
compiler: Add core compile test for maps
compiler: Fix core parse for Maps
compiler: Fixup #map_pair{} spec
erts: Strengthen map_SUITE tests
erts: Update maps_fold test to respect maps:fold/3
stdlib: Make maps:fold/3 order-independent
erts: Fixup enif_make_map_put on windows
erts: Update preloaded erts_internal.beam
hipe: Fixup update cerl pretty printer
erts: Add map construction to driver API
dialyzer: Add maps tests
dialyzer: Remove dead code
dialyzer: Reflect map_pair core changes in dialyzer
hipe: Update cerl pretty printer
compiler: Update inliner tests
compiler: Squash #c_map_pair_*{} to #c_map_pair{}
compiler: Squash #k_map_pair_*{} to #k_map_pair{}
preloaded: Fixup export cmp_term in erts_internal
erts: Change 'size' argument of enif_get_map_size from int* to size_t*
erts: Fix compile error for halfword emulator
...
|
|
This means replacing maps:foldl/3 and maps:foldr/3 with maps:fold/3.
|
|
* bjorn/fna-default/OTP-11612:
Change the default file name encoding mode to +fnaw
|
|
This commit requires Map enabled bootstrap compiler.
|
|
Pretty printing behaviour mimic records.
This commit requires Map enabled bootstrap compiler.
|
|
|
|
Name conforms to EEP.
|
|
|
|
|
|
|
|
|
|
* siri/appup_tests_17/OTP-11534:
Update sasl appup test to work for OTP release 17
Update stdlib appup test to work for OTP release 17
Update kernel appup test to work for OTP release 17
|
|
The map type is set to term.
|
|
|
|
In the current iteration of Maps we should deny *any* variables in
Map keys.
|
|
|
|
Update erlang lint and syntax expand for #{ K := V }
|
|
Did not handle Maps.
|
|
Example how to construct:
#{ K1 => V1, K2 => V2 }
How to update:
M#{ K1 => V1, K2 := V2 }
How to match:
#{ K1 := V1, K2 := V2 } = M
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
Example how to match or construct:
#{ K1 => V1, K2 => V2 }
How to update:
M#{ K => V }
|
|
|
|
|
|
|
|
|
|
This functions drops the last element of a non-empty list.
lists:last/1 and lists:droplast/1 are the dual of hd/1 and tl/1 but
for the end of a list.
|
|
Reported-by: Michele Miron
|
|
* dgud/test_unicode/OTP-10877:
sasl test: Quote executable paths (can contain spaces)
rt_tools: Handle unicode chars in printouts
kernel: code_SUITE fix unicode option
Fix (unicode) debug info in test cases
stdlib: Fix format if module resides in a unicode directory
Fix testing with unicode paths
test_server: Fix ts write unicode in config files
|
|
|
|
re needs unicode option
|
|
The standard_input may be set to binary mode via io:getopts/2
and in case such cases the "i/0" console helper got stuck as
it was unable to match new lines in binaries.
|
|
`erl` has tab completion for modules' exported functions but expands
only up to the opening paren. This commit closes that opening paren
in case the function is of arity zero and there is no other function with
the same name. It browses the lists of matches (a 2nd time) for Arity,
on complete match and then decides what to append.
|
|
* sv/faster-orddict-from_list/OTP-11552:
improve performance for orddict:from_list/1
|
|
Improve the performance of orddict:from_list/1 by reimplementing it using
the lists module in a way that preserves backward compatibility.
The QuickCheck programs linked below were used to verify backward
compatibility:
* https://gist.github.com/vinoski/3bd216efa421c581174a
* https://gist.github.com/vinoski/c6db70e8dc725083843d
Both tests, which were run on R16B03, require the original orddict module
to be renamed to olddict, and that code:unstick_mod/1 be applied to orddict
in order to allow it to be replaced with the revised orddict.
The first QuickCheck test first generates a list of pairs of terms, then
uses the list to create both an original and revised orddict using
from_list/1, then verifies that the results of the operation are the same
for both instances. The second QuickCheck test is similar except that it
first creates an instance of the original and revised orddicts and then
folds over a randomly-generated list of orddict functions, applying each
function to each orddict instance and verifying that the results match.
The revised orddict:from_list/1 function was also tested to assess
performance against the original orddict implementation. The test program
used is available here:
* https://gist.github.com/vinoski/61772a052f3501e1e128
Since an orddict instance is implemented as a list, the test program
creates ordicts of length 1, 10, 100, and 1000 and uses them to assess
performance at each length. Performance was measured using timer:tc/3 to
time a number of iterations of various tests against the original orddict
and against the revised orddict. To test from_list/1, orddicts of lengths
1, 10, 100, and 1000 are created from a list of random pairs with integer
keys. For lengths greater than 1, two different tests are performed: one
passing a list of pairs in sorted key order, and the other passing a list
of pairs in reverse sorted key order. Since orddicts are ordered, these
orderings effect worst-case and best-case behavior of the original
orddict:from_list/2 implementation respectively.
These tests were performed against R16B02 on a Macbook Pro with an Intel
Core i7 processor running at 2.7GHz and 16GB of RAM running OS X 10.8.5,
and on a Dell system with a 3.4GHz Intel Core i7 and 16GB of RAM running
Ubuntu Linux 12.04.
The tables below show results for OS X and Linux respectively. Each table
lists the name of each test followed by two numbers, each a time in
microseconds of the average of 10 runs of the test. The first number is the
result for the original orddict, the second for the revised orddict.
As the numbers for both platforms show, the revised from_list/1 function is
always faster than the original version, in some cases quite a bit faster.
Results from OS X:
------------------
from_list length 1: 1.789 0.116
from_list length 10 ordered: 10.082 3.040
from_list length 10 reverse ordered: 4.853 3.604
from_list length 100 ordered: 397.213 20.134
from_list length 100 reverse ordered: 25.473 20.745
from_list length 1000 ordered: 37490.26 251.46
from_list length 1000 reverse ordered: 307.94 215.96
Results from Linux:
-------------------
from_list length 1: 0.146 0.025
from_list length 10 ordered: 4.729 0.815
from_list length 10 reverse ordered: 1.687 0.956
from_list length 100 ordered: 144.467 5.896
from_list length 100 reverse ordered: 6.694 5.816
from_list length 1000 ordered: 13755.19 79.413
from_list length 1000 reverse ordered: 91.54 64.308
|