Age | Commit message (Collapse) | Author |
|
* 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
|
|
|
|
|
|
for 32-bit integers (INTEGER_EXT) on 64-bit architectures.
|
|
|
|
|
|
The new inliner (cerl_inline) does not mark inlined code as compiler
generated. Therefore, when sys_core_fold is run after inlining, it
may generate spurious warnings.
The easiest way out (for now, at least) is to discard all warnings
found when running sys_core_fold after inlining.
|
|
* bjorn/compiler/fix-slow-compilation/OTP-10652:
Eliminate bottlenecks in sys_core_fold
|
|
* rickard/idoc:
Add misc internal documentation
|
|
|
|
The instruction bs_get_integer could unnecessarily trigger a garbage collection
in failure cases which is unwanted or outright dangerous.
Ex:
<<X:Sz,_/bits>> = <<"some binary">>
Previously, if Sz induced X to a bignum it would reserved memory size this on
the heap via a garbage collection before checking if the size could actually match.
It will now check the binary size before triggering a collection.
|
|
add missing './'
|
|
* sverk/re-valgrind-fix:
erts: Fix valgrind warning for re_SUITE:error_handling
|
|
OTP-11550
* florianZ/crypto/error-fixes:
crypto: Fix memory leaks and invalid deallocations
|
|
OTP-11549
* sverk/unicode-driver-paths:
erts: Support loading of drivers with unicode paths
erts: Add 'extra' argument to erts_convert_filename_to_encoding
erts: Refactor remove erts_sys_dll_open2
erts: Fix compiler warning
|
|
|
|
|
|
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
|
|
* siri/master-cuddle-with-tests:
[sasl] Fix error printout in release_handler_SUITE to handle unicode path
|
|
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.
|
|
* ta/compiler/asm-core/OTP-11547:
Officially support building core files
Officially support building assembler files
|
|
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'
|
|
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.
|
|
|
|
* 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
|
|
|
|
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
|
|
in mod_pow, mod_exp and generate_key(srp,...)
|
|
|
|
|
|
Their exporting rules were not respected.
|
|
|
|
|
|
|
|
This makes applying the pass a second time a no-op.
|
|
|
|
Any init instruction following an allocate is put in the Inits list of the
corresponding alloc tuple.
|
|
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.
|
|
The compiler shouldn't crash when fed an already-optimised BEAM assembly file.
|
|
* wmalik/httpc_spelling:
fixed a spelling mistake in httpc doc
OTP-11538
|
|
* 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
|
|
|
|
* rickard/otp-17-vsn:
Update versions of OTP, erts, kernel, and stdlib
|
|
|
|
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.
|
|
|
|
|
|
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).
|
|
|
|
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).
|