aboutsummaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)Author
2014-01-16Add the 'rle' zstrategyBjörn Gustavsson
2014-01-14Update zlib to 1.2.8Björn Gustavsson
2014-01-09Merge branch 'sv/faster-orddict-from_list/OTP-11552'Björn Gustavsson
* sv/faster-orddict-from_list/OTP-11552: improve performance for orddict:from_list/1
2014-01-09Merge branch 'nox/fix-dbg_ieval-exporting-rules/OTP-11553'Björn Gustavsson
* nox/fix-dbg_ieval-exporting-rules/OTP-11553: compiler tests: Test exporting rules for andalso/orelse Fix evaluation of andalso and orelse in the debugger
2014-01-08compiler tests: Test exporting rules for andalso/orelseBjörn Gustavsson
2014-01-08Merge branch 'bjorn/compiler/fix-slow-compilation/OTP-10652'Björn Gustavsson
* bjorn/compiler/fix-slow-compilation/OTP-10652: Eliminate bottlenecks in sys_core_fold
2013-12-20Merge branch 'florianZ/crypto/error-fixes'Sverker Eriksson
OTP-11550 * florianZ/crypto/error-fixes: crypto: Fix memory leaks and invalid deallocations
2013-12-20Merge branch 'dgud/remove-gs-apps/OTP-10915'Dan Gudmundsson
2013-12-20Merge remote-tracking branch 'origin/kostis/dialyzer_hipe-remove-gs'Dan Gudmundsson
2013-12-19improve performance for orddict:from_list/1Steve Vinoski
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
2013-12-19Merge branch 'siri/master-cuddle-with-tests'Siri Hansen
* siri/master-cuddle-with-tests: [sasl] Fix error printout in release_handler_SUITE to handle unicode path
2013-12-19Eliminate bottlenecks in sys_core_foldBjörn Gustavsson
Compiling programs with very many uses of the "dot notation" for extracting a record element could be very slow. The reason is that each extraction of a record element (R#r.a) would first be transformed to code like this: case R of {r,rec0,_,_} -> rec0; _ -> error({badrecord,r}) end In Core Erlang, each '_' would be become a new variable. The resulting code would be optimized by sys_core_fold, but the optimization process could be very slow. Profiling shows that sub_del_var/2 was the worst bottleneck, and the sub_is_val/2 the second worst bottleneck. In both cases, the culprit is the linear traversal of a very long list (the list of variable substitutions). Fortunately, there already is a gb_set (the scope) which contains all variables that are currently live. If a variable is not known to be live, it is no point in doing the linear operation on the list.
2013-12-18Officially support building core filesTuncer Ayaz
erlc is wired to treat *.core files as core and build them as compile:file(File, [from_core]), but this is not documented. There's also an udocumented compile:file/2 option called 'from_core'. This has been in place and in use for a long time. Therefore, it should be supported officially. To fix that, make the following changes: * document erlc handling of *.core files * document 'from_core'
2013-12-18Officially support building assembler filesTuncer Ayaz
erlc is wired to treat *.S files as assembler and build them as compile:file(File, [from_asm]), but this is not documented. There's also a documented compile:file/2 option called 'asm' (mapping to 'from_asm'), but the wording discourages its use. All of this has been in place and in use for a long time. Therefore, it should be supported officially. To fix that, make the following changes: * document erlc handling of *.core files * un-document 'asm' and document 'from_asm' instead * deprecate 'asm' While at it, fix a minor typo in the test suite.
2013-12-18Merge branch 'nox/asm-reentrant/OTP-11544'Björn Gustavsson
* nox/asm-reentrant/OTP-11544: Test compilation of BEAM assembly with optimisations on Keep exit blocks in order when moving them in beam_jump Add missing recv_set, recv_mark and '%' to BEAM live annotation Collect all optimised allocate instructions in beam_block Properly collect allocate_zero instructions in beam_block Properly let floating-point instructions through in the BEAM compiler
2013-12-17[sasl] Fix error printout in release_handler_SUITE to handle unicode pathSiri Hansen
2013-12-17Merge tag 'OTP_R16B03_yielding_binary_to_term'Sverker Eriksson
Yielding binary_to_term. OTP-11535 * tag 'OTP_R16B03_yielding_binary_to_term': Increase versions for OTP_R16B03_yielding_binary_to_term erts: Adjust term_to_binary reduction factors erts: Yield after trapping term_to_binary if gc has been ordered erts: Let term_to_binary disable gc while trapping erts: Improve stress of binary_to_term in binary_SUITE erts: Fix bug in binary_to_term for compressed on halfword erts: Fix crash when binary_to_term throws badarg erts: Trapping memcpy in binary_to_term erts: Cleanup code for trapping binary_to_term erts: Add erlang wrappers to binary_to_term trapping uncompress trapping size calculation trapping binary_to_term/2 trapping STRING_EXT trapping lists and tuples trapping binary_to_term passing binary_SUITE Conflicts: erts/preloaded/ebin/erlang.beam erts/preloaded/ebin/erts_internal.beam erts/vsn.mk lib/kernel/vsn.mk lib/stdlib/vsn.mk
2013-12-16crypto: Fix memory leaks and invalid deallocationsSverker Eriksson
in mod_pow, mod_exp and generate_key(srp,...)
2013-12-15Fix evaluation of andalso and orelse in the debuggerAnthony Ramine
Their exporting rules were not respected.
2013-12-13Test compilation of BEAM assembly with optimisations onAnthony Ramine
2013-12-13Keep exit blocks in order when moving them in beam_jumpAnthony Ramine
This makes applying the pass a second time a no-op.
2013-12-13Add missing recv_set, recv_mark and '%' to BEAM live annotationAnthony Ramine
2013-12-13Collect all optimised allocate instructions in beam_blockAnthony Ramine
Any init instruction following an allocate is put in the Inits list of the corresponding alloc tuple.
2013-12-13Properly collect allocate_zero instructions in beam_blockAnthony Ramine
If an allocate_zero instruction is fed to beam_block and the beam_type pass is not used afterwards (e.g. with erlc +no_topt), the 'no_opt' atom will be rejected by beam_flatten.
2013-12-13Properly let floating-point instructions through in the BEAM compilerAnthony Ramine
The compiler shouldn't crash when fed an already-optimised BEAM assembly file.
2013-12-13Merge branch 'wmalik/httpc_spelling'Henrik Nord
* wmalik/httpc_spelling: fixed a spelling mistake in httpc doc OTP-11538
2013-12-13Merge branch 'nox/eep37/OTP-11537'Björn Gustavsson
* nox/eep37/OTP-11537: Support EEP37 named funs in emacs erlang-mode Document named fun expressions Test named funs Support named funs in the debugger interpreter Update primary bootstrap for named funs in the shell Support named funs in the shell Update primary bootstrap for named funs EEP 37: Funs with names Support non top level letrecs in dialyzer
2013-12-13Merge branch 'rickard/otp-17-vsn'Rickard Green
* rickard/otp-17-vsn: Update versions of OTP, erts, kernel, and stdlib
2013-12-12Increase versions for OTP_R16B03_yielding_binary_to_termOTP_R16B03_yielding_binary_to_termSverker Eriksson
2013-12-12Support EEP37 named funs in emacs erlang-modeSteve Vinoski
Change emacs erlang-mode to recognize EEP37 named funs so they're indented properly. Specifically, modify erlang-partial-parse to allow for an optional Erlang variable name to appear between the "fun" keyword and the opening parenthesis of its argument list.
2013-12-12Test named funsAnthony Ramine
2013-12-12Support named funs in the debugger interpreterAnthony Ramine
The current code for the evaluation of ordinary funs is dependent on the order on variables in the fun environment as returned by erlang:fun_info(Fun, env). As it happened, adding the code for named funs changed the order in the environment for ordinary funs. To avoid the problem in the future, make sure that we only have one free variable in the funs that we will need to inspect using erlang:fun_info(Fun, env).
2013-12-12Support named funs in the shellAnthony Ramine
The current code for the evaluation of ordinary funs is dependent on the order on variables in the fun environment as returned by erlang:fun_info(Fun, env). To avoid the problem in the future, make sure that we only have one free variable in the funs that we will need to inspect using erlang:fun_info(Fun, env).
2013-12-12Merge branch 'sverk/trapping-bin2term' into OTP_R16B03Sverker Eriksson
* sverk/trapping-bin2term: erts: Adjust term_to_binary reduction factors erts: Yield after trapping term_to_binary if gc has been ordered erts: Let term_to_binary disable gc while trapping erts: Improve stress of binary_to_term in binary_SUITE erts: Fix bug in binary_to_term for compressed on halfword erts: Fix crash when binary_to_term throws badarg erts: Trapping memcpy in binary_to_term erts: Cleanup code for trapping binary_to_term erts: Add erlang wrappers to binary_to_term trapping uncompress trapping size calculation trapping binary_to_term/2 trapping STRING_EXT trapping lists and tuples trapping binary_to_term passing binary_SUITE Parallel check_process_code when code_server purge a module Functionality for disabling garbage collection Use asynchronous check_process_code in code_parallel_SUITE Execution of system tasks in context of another process Conflicts: erts/emulator/beam/external.c erts/emulator/beam/sys.h erts/emulator/test/binary_SUITE.erl erts/preloaded/ebin/erlang.beam erts/preloaded/ebin/erts_internal.beam
2013-12-12EEP 37: Funs with namesAnthony Ramine
This adds optional names to fun expressions. A named fun expression is parsed as a tuple `{named_fun,Loc,Name,Clauses}` in erl_parse. If a fun expression has a name, it must be present and be the same in every of its clauses. The function name shadows the environment of the expression shadowing the environment and it is shadowed by the environment of the clauses' arguments. An unused function name triggers a warning unless it is prefixed by _, just as every variable. Variable _ is allowed as a function name. It is not an error to put a named function in a record field default value. When transforming to Core Erlang, the named fun Fun is changed into the following expression: letrec 'Fun'/Arity = fun (Args) -> let <Fun> = 'Fun'/Arity in Case in 'Fun'/Arity where Args is the list of arguments of 'Fun'/Arity and Case the Core Erlang expression corresponding to the clauses of Fun. This transformation allows us to entirely skip any k_var to k_local transformation in the fun's clauses bodies.
2013-12-12Support non top level letrecs in dialyzerJosé Valim
Dialyzer so far only supported letrecs at the top-level and comprehension-like letrecs (i.e. that were directly applied) in their body. This commit address this issue by storing in the callgraph bound letrec labels pointing to their functions. This information is then used by the dataflow to properly lookup recursive definitions.
2013-12-10fixed a spelling mistake in httpc docWasif Malik
2013-12-10Merge tag 'OTP_R16B03'Magnus Lidén
The R16B03 release Conflicts: lib/sasl/vsn.mk
2013-12-10Update versions of OTP, erts, kernel, and stdlibRickard Green
Update versions of OTP, erts, kernel, and stdlib to comply with the new version scheme decided by the OTP technical board.
2013-12-09Prepare releaseOTP_R16B03Erlang/OTP
2013-12-09Update preloaded modulesMagnus Lidén
2013-12-09[sasl] Test bugfix in branch 'schlagert/fix_emulator_upgrades'Siri Hansen
OTP-11529
2013-12-07Merge branch 'rickard/garbage_collect/OTP-11388'Rickard Green
* rickard/garbage_collect/OTP-11388: Parallel check_process_code when code_server purge a module Functionality for disabling garbage collection Use asynchronous check_process_code in code_parallel_SUITE Execution of system tasks in context of another process Conflicts: bootstrap/lib/kernel/ebin/hipe_unified_loader.beam erts/preloaded/ebin/erlang.beam erts/preloaded/ebin/erts_internal.beam
2013-12-05Merge branch 'maint'Raimo Niskanen
2013-12-05Merge branch 'schlagert/fix_emulator_upgrades' into maintRaimo Niskanen
* schlagert/fix_emulator_upgrades: Fix boot file generation for intermediate releases.
2013-12-05Merge branch 'maint'Hans Nilsson
2013-12-05inets: Restore ftp test files for the inets_{,sup_}SUITE to not failHans Nilsson
2013-12-05Merge remote-tracking branch 'upstream/maint'Ingela Anderton Andin
2013-12-05Merge branch 'ia/inets/cuddle-with-tests' into maintIngela Anderton Andin
* ia/inets/cuddle-with-tests: inets: Add crypto start check to ssl test cases
2013-12-04Merge branch 'maint'Peter Andersson