aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test
AgeCommit message (Collapse)Author
2018-09-13Prototype crypto_aes PRNGRaimo Niskanen
Conflicts: lib/crypto/src/crypto.erl
2018-09-13Improve seeding methodsRaimo Niskanen
2018-09-13Implement Xoroshiro928**Raimo Niskanen
2018-09-13Improve handling of ref valsRaimo Niskanen
2018-09-06Merge branch 'maint'Rickard Green
* maint: Update PCRE from version 8.41 to version 8.42
2018-09-06Merge branch 'rickard/pcre-8.42/OTP-15217' into maintRickard Green
* rickard/pcre-8.42/OTP-15217: Update PCRE from version 8.41 to version 8.42
2018-09-05Merge branch 'maint'Sverker Eriksson
2018-09-03erts: Fix ets memstat false leak of FixedDeletionSverker Eriksson
causing erlang:memory to report too much ets memory.
2018-08-28Merge branch 'maint'Péter Dimitrov
* maint: Updated OTP version Update release notes stdlib: Let dets:open_file() crash when given raw file name Fix kernel_app doc logger_level default from info to notice Change-Id: I581946ac5cec6574ed79017e2987039c1fdcf80a
2018-08-28Merge pull request #1940 from ↵Hans Bolinder
uabboli/hb/stdlib/fix_dets_file_name/OTP-15253/ERL-555 stdlib: Let dets:open_file() crash when given raw file name
2018-08-21Merge branch 'maint'Hans Bolinder
* maint: stdlib: Correct contracts in module io_lib_format stdlib: Improve error handling in module io_lib
2018-08-21stdlib: Let dets:open_file() crash when given raw file nameHans Bolinder
See also ERL-55 and OTP-13229.
2018-08-20stdlib: Improve error handling in module io_libHans Bolinder
2018-08-16Merge branch 'josevalim/jv-sb/PR-1803/OTP-15238' into masterLukas Larsson
Optimize binary match from 10% up to 70x
2018-08-08Update PCRE from version 8.41 to version 8.42Rickard Green
2018-08-07Optimize binary matchJosé Valim
The idea is to use memchr on the first lookup for binary:match/2 and also after every match on binary:matches/2. We only use memchr in case of matches because benchmarks showed that using memchr even when we had false positives could negatively affect performance. This speeds up binary matching and binary splitting by 4x in some cases and by 70x in other scenarios (when the last character in the needle does not occur in the subject). The reason to use memchr is that it is highly specialized in most modern operating systems, often defaulting to SIMD operations. The implementation uses the reduction count to figure out how many bytes should be read with memchr. We could increase those numbers but they do not seem to make a large difference.
2018-07-27Change "can not" into "cannot"Raimo Niskanen
I did not find any legitimate use of "can not", however skipped changing e.g RFCs archived in the source tree.
2018-07-18Merge pull request #1812 from michalmuskala/mm/make-fun-loaderJohn Högberg
Optimise creation of anonymous functions
2018-07-17Optimise creation of anonymous functionsMichał Muskała
This introduces a similar optimisation for normal funs to what was introduced for external funs in #1725. It is possible to allocate the fun as a literal, if it does not capture the environment (i.e. it does not close over any variables). Unfortunately it's not possible to do this in the compiler due to problems with representation of such functions in the `.beam` files. Fortunately, we can do this in the loader. Simple evaluation shows that functions that don't capture the enviornment consistute over 60% of all funs in the source code of Erlang/OTP itself. The only downside is that we lose a meningful value in the `pid` field of the fun. The goal of this field, beyond debugging, was to be able to identify the original node of a function. To be able to still do this, the functions that are created in the loader are assigned the init pid as the creator. To solve issues with staryp, initially set the `erts_init_process_id` to `ERTS_INVALID_PID` and skip the described optimisation if the value is still uninitialised.
2018-07-04Merge branch 'maint'John Högberg
* maint: Updated OTP version Update release notes Update version numbers Eliminate a crash in the beam_jump pass stdlib: Fix a 'chars_limit' bug Fix a race condition when generating async operation ids Fix internal compiler error for map_get/2 beam_type: Fix unsafe optimization public_key: Remove moduli 5121 and 7167 Thoose were added by 598629aeba9de98e8cdf5637043eb34e5d407751 but are not universaly supported.
2018-07-04Merge branch 'maint-21' into maintJohn Högberg
* maint-21: Updated OTP version Update release notes Update version numbers Eliminate a crash in the beam_jump pass stdlib: Fix a 'chars_limit' bug Fix a race condition when generating async operation ids Fix internal compiler error for map_get/2 beam_type: Fix unsafe optimization public_key: Remove moduli 5121 and 7167 Thoose were added by 598629aeba9de98e8cdf5637043eb34e5d407751 but are not universaly supported.
2018-07-03Merge pull request #1854 from ↵John Högberg
jhogberg/john/erts/cross-type-carrier-migration/OTP-15063 Allow carrier migration between different allocator types
2018-06-28Merge branch 'maint'Sverker Eriksson
2018-06-28stdlib: Fix a 'chars_limit' bugHans Bolinder
2018-06-28Remove ad-hoc memory use calculations in testsJohn Högberg
2018-06-27Merge pull request #1840 from tsloughter/qs-dissectPéter Dimitrov
uri_string: support key without value in query string
2018-06-20Use bif for other ets tables countingArtur Cygan
2018-06-18Update copyright yearHenrik Nord
2018-06-15support key without value in query stringTristan Sloughter
2018-06-12Merge pull request #1835 from sirihansen/siri/logger-fixSiri Hansen
2018-06-12Merge branch 'peterdmv/stdlib/fix_uri_string_normalize/ERL-636/OTP-15112'Péter Dimitrov
* peterdmv/stdlib/fix_uri_string_normalize/ERL-636/OTP-15112: stdlib: Fix release_tests target in Makefile stdlib: Fix normalization function in uri_string Change-Id: I656a583befd8950d4326d15e60145c617acd41c3
2018-06-11stdlib: Fix release_tests target in MakefilePéter Dimitrov
'make release_tests' copies the property_test directory. Change-Id: Ife75711aec1ef6e85ef091b1ba28a221be3d1110
2018-06-11Merge branch 'jl/sharpen-maps-tests/OTP-14012'Lukas Larsson
* jl/sharpen-maps-tests/OTP-14012: stdlib: Fix error reason for maps:with/without Check for the overlap between maps and iterators
2018-06-11stdlib: Fix normalization function in uri_stringPéter Dimitrov
- Fix parsing of hostnames that start with a number. - Update uri_string:parse/1 to be only responsible for parsing input URIs into URI components. Implicit percent-encoding normalization has been removed. - Implement percent-encoding normalization. - Update uri_string:normalize/{1,2} to include percent-encoding normalization. - Update test suites according to the new semantics. - Add new property test: normalize Change-Id: I6f37dcae2b3fcb4b29d286dbb0dfc563e8f211ae
2018-06-08[logger] Update return values from get_handler_config/0,1 and get_config/0Siri Hansen
Module and Id are now always included as fields in Config, so these are no longer returned as separate elements.
2018-06-08[logger] Change name of handler specific config field from ?MODULE to 'config'Siri Hansen
And add field 'module' in handler config.
2018-06-07stdlib: Make pP insert no line breaks with field width zeroHans Bolinder
See also https://bugs.erlang.org/browse/ERL-607. A zero field width used to insert line breaks "everywhere", but with this patch no line breaks are inserted.
2018-06-05Merge branch 'dgud/stdlib/string-case-bin-bug'Dan Gudmundsson
* dgud/stdlib/string-case-bin-bug: Fix *case bugs for binaries
2018-06-04erts: Reduce test log noise from ets_SUITESverker Eriksson
2018-06-04Fix *case bugs for binariesDan Gudmundsson
Bad optimizing code introduced in 5c51e87bee9d
2018-05-18Merge branch 'sverker/ets-delete_all_objects-trap/OTP-15078'Sverker Eriksson
* sverker/ets-delete_all_objects-trap/OTP-15078: erts: Rename untrapping db_free_*empty*_table erts: Make ets:delete_all_objects yield on fixed table erts: Optimize ets delete all in fixed table erts: Refactor ets select iteration code erts: Cleanup ets code erts: Optimize ets hash object deallocactions erts: Refactor pseudo deleted ets objects erts: Make atomic ets:delete_all_objects yield erts: Fix reduction bump for ets:delete/1
2018-05-17Merge pull request #1810 from tomas-abrahamsson/bjorn/preprocessor-extensionsBjörn Gustavsson
Add ?OTP_RELEASE, -if and -elif to the preprocessor OTP-15087
2018-05-17Merge pull request #1817 from dgud/dgud/stdlib/string-opt-caseDan Gudmundsson
OTP-14988
2018-05-14Optimize string lowercase, uppercase and casefold for ASCII charactersDan Gudmundsson
2018-05-13Check for the overlap between maps and iteratorsJesper Louis Andersen
Add tests which passes on Erlang release 20.0, but have changed since then in later branches. The tests works in a "gap" between the old test cases and the new test cases in order to make it stricter what to return in this case.
2018-05-09epp: Implement the -if and -elif preprocessor directivesBjörn Gustavsson
Libraries or applications that support more than one major release of OTP may need to use conditional compilation of Erlang source code. Here are few examples where it would be necessary or desirable: * To support a new data type or language feature only available in the latest major release (real-world examples: maps and the stacktrace syntax). * To avoid warnings for deprecated functions. * To avoid dialyzer warnings. Previously, to do conditional compilation, one would have to use a parse transform or some external tool such as 'autoconf'. To simplify conditional compilation, introduce the -if and -elif preprocessor directives, to allow code like this to be written: -if(?OTP_RELEASE =:= 21). %% Code that will only work in OTP 21. -else. %% Fallback code. -endif. What kind of expressions should be allowed after an -if? We certainly don't want to allow anything with a side effect, such as a '!' or a 'receive'. We also don't want it to be possible to call erlang:system_info/1, as that could make the code depedent on features of the run-time system that could change very easily (such as the number of schedulers). Requiring the expression to be a guard expression makes most sense. It is to explain in the documentation and easy for users to understand. For simplicity of implementation, only a single guard expression will be supported; that is, the ',' and ';' syntax for guards is not supported. To allow some useful conditions to be written, there is a special built-in function: defined(Symbol) tests whether the preprocessor symbol is defined, just like -ifdef. The reason for having this defined/1 is that the defined test can be combined with other tests, for example: 'defined(SOME_NAME) andalso ?OTP_RELEASE > 21'.
2018-05-08erts: Make atomic ets:delete_all_objects yieldSverker Eriksson
by using a cooperative strategy that will make any process accessing the table execute delelete_all_objects_continue until the table is empty. This is not an optimal solution as concurrent threads will still block on the table lock, but at least thread progress is made.
2018-05-06epp: Add the pre-defined macro OTP_RELEASEBjörn Gustavsson
Add a new pre-defined macro called OTP_RELEASE that will expand to an integer being the OTP version. Thus, in OTP 19 the value will be the integer 19. The OTP_RELEASE macro is particularly useful in order to have different source code depending on new language features or new features in the type specification syntax. Those features are only introduced in major versions of OTP. To be truly useful, the -if preprocessor directive need to be implemented. That is the purpose of the next commit. Code that will need to work in both OTP 18 and OTP 19 can be structured in the following way: -ifdef(OTP_RELEASE). %% Code that only works in OTP 19 and later. -else. %% Code that will work in OTP 18. -endif.
2018-05-04Move error formatting to erl_error.erl and delete lib.erlRichard Carlsson
2018-05-04Move extended parse functions in lib.erl to erl_eval.erlRichard Carlsson