Age | Commit message (Collapse) | Author |
|
Language cleaned up by the technical writers xsipewe and tmanevik
from Combitech. Proofreading and corrections by Björn Gustavsson.
|
|
* bjorn/maps:
Document the new {badmap,Term} and {badkey,Key} exceptions
Raise more descriptive error messages for failed map operations
erl_term.h: Add is_not_map() macro
Tigthen code for the i_get_map_elements/3 instruction
Pre-compute hash values for the general get_map_elements instruction
Teach the loader to pre-compute the hash value for single-key lookups
Optimize use of i_get_map_element/4
beam_emu: Slightly optimize update_map_{assoc,exact}
v3_codegen: Don't sort map keys in map creation/update
beam_validator: No longer require strict literal term order
Sort maps keys in the loader
De-optimize the has_map_fields instructions
erts/map_SUITE.erl: Add a test case that tests has_map_fields
Fully evaluate is_map/1 for literals at load-time
map_SUITE: Add tests of is_map/1 with literal maps
Run a clone of map_SUITE without optimizations
Remove the fail label operand of the new_map instruction
Correct transformation of put_map_assoc to new_map
Remove support for put_map_exact without a source map
|
|
* sverk/crypto/rm-EVP_CIPHER_CTX_new:
crypto: Fix undefined symbol EVP_CIPHER_CTX_new
|
|
* ia/ssh/channel-gracefull-shutdown/OTP-12648:
ssh: Shutdown sftp channel gracefully
|
|
|
|
According to EEP-43 for maps, a 'badmap' exception should be
generated when an attempt is made to update non-map term such as:
<<>>#{a=>42}
That was not implemented in the OTP 17.
José Valim suggested that we should take the opportunity to
improve the errors coming from map operations:
http://erlang.org/pipermail/erlang-questions/2015-February/083588.html
This commit implement better errors from map operations similar
to his suggestion.
When a map update operation (Map#{...}) or a BIF that expects a map
is given a non-map term, the exception will be:
{badmap,Term}
This kind of exception is similar to the {badfun,Term} exception
from operations that expect a fun.
When a map operation requires a key that is not present in a map,
the following exception will be raised:
{badkey,Key}
José Valim suggested that the exception should be
{badkey,Key,Map}. We decided not to do that because the map
could potentially be huge and cause problems if the error
propagated through links to other processes.
For BIFs, it could be argued that the exceptions could be simply
'badmap' and 'badkey', because the bad map and bad key can be found in
the argument list for the BIF in the stack backtrace. However, for the
map update operation (Map#{...}), the bad map or bad key will not be
included in the stack backtrace, so that information must be included
in the exception reason itself. For consistency, the BIFs should raise
the same exceptions as update operation.
If more than one key is missing, it is undefined which of
keys that will be reported in the {badkey,Key} exception.
|
|
* egil/fix-maps-module-exceptions/OTP-12657:
stdlib: Correct maps module exceptions upon errors
|
|
* peppe/common_test/report_error_if_missing_suite:
Fix problem with suite compilation failures not being correctly reported
OTP-10816
|
|
If ssh_connection:subsystem/4 fails we do not want to crash but rather
terminate gracefully.
|
|
* ia/inets/remove-ssi/OTP-12156:
inets: Remove SSI (Server Side Includes)
|
|
fold() and map() handle elements in a well-defined order.
Thanks to Rabbe Fogelholm for pointing out the bug.
|
|
* origin/peppe/common_test/longname_problem:
Fix error in ct_logs, not handling long names correctly
OTP-12643
|
|
Also do some minor logging improvements
|
|
It is no longer necessary to sort the keys, since the loader
does the sorting.
|
|
The BEAM loader will now sort keys for maps during loading, so
beam_validator should not require the keys to be ordered any order.
However, we must still ensure that literals keys are unique (which
was implicitly guaranteed by the strict ordering requirement).
|
|
To be sure that the compiler and BEAM virtual machine correctly
handles literals maps, we must test it.
|
|
Bad input to maps module function will now yield exceptions:
* {badmap,NotMap} or,
* badarg
|
|
|
|
Conflicts:
OTP_VERSION
|
|
|
|
* bjorn/stdlib/cuddle-with-tests:
Eliminate deprecated now/0 used as timestamp
Eliminate use of now/0 for creating a unique filename
Eliminate use of deprecated now/0 for measuring time
Eliminate use of deprecated now/0 for random number generation
Speed up timer_simple_SUITE:timer_perf/1
Speed up timer_SUITE
Optimize gen_server_SUITE:hibernate/1
Optimize gen_event_SUITE:hibernate/1
Optimize gen_fsm_SUITE:hibernate/1
Optimize unicode_SUITE:ex_binaries_errors* test cases
Optimize unicode_SUITE:binaries_errors/1
binary_module_SUITE: Remove unnecessary calls to the binref module
Optimize binary_module:random_ref_comp/1
Optimize io_proto_SUITE:unicode_options_gen/1
|
|
Rewrite the code to measure and print elapsed time instead of just
printing timestamps for the start and stop of each operation.
|
|
Use erlang:unique_integer/1 instead.
|
|
Use erlang:monotonic_time/1 instead of now/0.
|
|
Use erlang:timestamp/0 instead now/0 when seeding the random
number generator.
|
|
In big_test/1, there is 9 seconds sleep before spawning any timers.
Why? Before the sleep nrev processes are started, but they are likely
to finish running before the 9 seconds have elapsed.
Since I see no reason at all for the sleep, I will remove it.
|
|
The single test case in timer_SUITE is annoyingly slow. On average,
its running time is about 4 minutes (estimated by a
back-of-the-envelope calculation).
Scale down the delay times in the main loop and the length of timers
started. The running average time should now be around 80 seconds.
|
|
The running time for gen_server_SUITE:hibernate/1 is about 12 seconds
because of 1000 ms sleeps in the test case. Introduce a helper
function to avoid sleeping more than necessary.
While we are it, also remove all ?line macros in the test case.
|
|
The running time for gen_event_SUITE:hibernate/1 is about 20 seconds
because of 1000 ms sleeps in the test case. Introduce helper
functions to avoid sleeping more than necessary.
While we are it, also remove all ?line macros in the test case.
|
|
The running time for gen_fsm_SUITE:hibernate/1 is almost 30 seconds
because of 1000 ms sleeps in the test case. Introduce helper
functions to avoid sleeping more than necessary.
While we are it, also remove all ?line macros in the test case.
|
|
Refactor the code so that the error test cases for utf16 can
share the code for big and little endian. Do the same for utf32.
The major optimization is the observation that the following code:
byte_size(unicode:characters_to_binary(List, unicode, {utf16,big})
can be replaced with:
2*length(List)
which is much faster. (That optimization is not safe in general,
but for the lists used in the error tests cases, it is.)
|
|
unicode_SUITE:binaries_errors/1 is the slowest test case in
unicode_SUITE. Its running time is about 50 seconds on my computer.
Break apart unicode_SUITE:binaries_errors/1 into several test cases
that can run in parallel.
|
|
The compile_pattern/1 function in the binref module is a dummy
function. Therefore, calling binref:match/2 once with the plain
pattern and once with a "pre-compiled" pattern will take twice as
long, but will not help us find more errors.
I shaved off one fourth of the running time for random_ref_comp/1
by eliminating the unnecessary calls to the binref module.
|
|
Use a stack allocated context and EVP_CIPHER_CTX_init/cleanup
instead of dynamic EVP_CIPHER_CTX_new/free that does not exist in older
0.9.8 versions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Change description proposed by technical writer to make better use
of technical terms. Also add some new language improvments discussed
with the technical writer.
|
|
|
|
* sverk/ets-grow-faulty-assert/OTP-12647:
erts: Fix ets bug in debug VM
|
|
Symptom: ASSERT(segtab[seg_ix] == NULL) in alloc_seg() fails.
Remedy: Make sure we set segment pointer to NULL in free_seg()
even when we switch to smaller segtab.
|
|
|
|
|
|
|
|
A channel could be opened with the 'max packet size' set to 0. The behaviour is not defined in the ssh rfc:s, and openssh does not handle that case in some special way besides looping.
The introduced solution just "keep quiet" but removes the eternal loop that caused Erlang to core dump.
|
|
|