Age | Commit message (Collapse) | Author |
|
* bjorn/compiler/map-pattern/OTP-12414:
core_lib: Handle patterns in map values
|
|
core_lib:is_var_used/2 would not consider a variable used in the
value of a map pattern such as:
case Map of
#{key := <<42:N>>} -> ok
end
Here the variable 'N' would not be considered used.
It was assumed that there was no need to check map patterns at
all, since maps currently don't support variables in keys.
|
|
* mikpe/hipe-fconv-fmove-fixes/OTP-12413:
hipe: rtl: fix phi_remove_pred/2 FP moves
hipe: backends: correct #fconv{} translation
|
|
* bjorn/compiler/map-in-record-bug/OTP-12402:
sys_core_fold: Correct optimization of 'case'
|
|
* bjorn/compiler/beam_bool/OTP-12410:
beam_bool: Correct live calculation for GC BIFs
beam_bool: Correct indentation for try...catch
|
|
OTP-12406
* richcarl/syntax_tools-fix-bad-error-format:
fix bad format of error in epp_dodger:parse_file/3
|
|
* arekinath/openbsd-build/OTP-12404:
Fix compile breakage on OpenBSD
|
|
When optimizing boolean expressions, it is not always possible
to find a number of live registers for a GC BIF that both preserves
all source registers that will be tested and at the same time
does not include registers that are not initialized.
As currently implemented, we have incomplete information about
the register calculated from the free variables. Some registers
are marked as "reserved". Reserved registers means that we don't
know anything about them; they may or may not be initialized.
As a conservative correction (suitable for a maintenance release), we
will abort the optimization if we find any reserved registers when
calculating the number of live registers. We will not attempt to
improve the information about the registers in this commit.
By examining the coverage when running the existing compiler test
suite we find that the optimization is aborted 15 times (before
adding any new test cases). To put that in perspective, the
optimization is successfully applied 4927 times, and aborted for
other reasons 547 times.
Reported-by: Ulf Norell
Reported-by: Anthony Ramine
|
|
Old versions of the Erlang mode for Emacs used to indent try...catch
strangely - the first clause following the 'catch' would be indented
with one space less than the following clauses.
If we are to use the new Erlang mode when we add more clauses, they
would be indented with one space less than the preceding clauses.
That would look silly.
|
|
The optimization of a 'case' statement could lead to incorrect
code that would cause an exception at run-time.
Here is an example to show how the optimization went wrong. Start
with the following code:
f({r,#{key:=Val},X}=S) ->
case S of
{r,_,_} ->
setelement(3, Val, S)
end.
(The record operations have already been translated to the
corresponding tuple operations.) The first step in case_opt/3 is
to substitute S to obtain:
f({r,#{key:=Val},X}=S) ->
case {r,#{key:=Val},X} of
{r,_,_} ->
setelement(3, Val, S)
end.
After that substitution the 'case' can be simplified to:
f({r,#{key:=Val},_}=S) ->
case #{key:=Val} of
NewVar ->
setelement(3, Val, S)
end.
That is the result from case_opt/3. Now eval_case/2 notices
that since there is only one clause left in the 'case', the
'case' can eliminated:
f({r,#{key:=Val},_}=S) ->
NewVar = #{key:=Val},
setelement(3, Val, S).
Since the map construction may have a side effect, it was not
eliminated, but assigned to a variable that is never used.
The problem is that '#{key:=Val}' is fine as a pattern, but in a
construction of a new map, the '=>' operator must be used. So the
map construction will fail, generating an exception.
As a conservative correction for a maintenance release, we will
abort the 'case' optimization if the substitution into the 'case'
expression is anything but data items (tuples, conses, or
literals) or variables.
Reported-by: Dmitry Aleksandrov
|
|
* marcus/rabbe-doc-typos/OTP-12399:
fix doc typos found by Rabbe Fogelholm
|
|
* dotsimon/sctp_paddrinfo_state:
Fix inet:getopts involving #sctp_paddrinfo{}
|
|
* nox/http_uri-fragment/OTP-12398:
Properly parse URI fragments
|
|
The ddbe8a821ad commit was embarrassingly broken.
|
|
* dgud/debugger/save-state-mac/OTP-12378:
debugger: Fix debugger save options on mac
|
|
* dgud/wx/connect-when-terminating/OTP-12374:
wx: Do not crash server when going down
|
|
|
|
hipe_rtl:phi_remove_pred/2 can produce a #move{} instruction with
floating-point temporaries as operands, even though such moves MUST
be #fmove{} instructions.
Added type checks to the #move{} and #fmove{} constructor and setter
functions to ensure that similar mishaps cannot happen again.
|
|
RTL can produce an #fconv{} instruction with an immediate operand, but
the backends unconditionally access the operand as a temporary. This
results in broken representation in the backends and eventually they
crash.
|
|
This fixes a bug in httpc where redirection URIs could lead to bad requests if they
contained fragments.
|
|
|
|
|
|
* mikpe/fix-eacces-spelling:
fix eacces spelling
|
|
wxFileDialog:getPaths(FD) always return the empty list
on mac when using file dialog.
|
|
* hans/eldap/bad_return_close/OTP-12349:
eldap: Remove trailing white space.
eldap: Test cases for a few return values (open, close)
eldap: updated eldap:close in tests
eldap: Makes close/1 return as documented.
|
|
* hans/eldap/test_improvents/OTP-12355:
eldap: Corrects SSL over IPv6 test.
eldap: Removes eldap_misc_SUITE that is now included in eldap_basic_SUITE.
eldap: Add encode/decode tests.
eldap: Merge eldap_connections_SUITE into eldab_basic_SUITE
eldap: Adds ssl to connections test suite
eldap: Updates basic test suite - Splits one large testcase into smaller ones. - Makes tests independent - Adds some tests.
|
|
If a connect request was made during the takedown of wx it would crash.
|
|
* haguenau/fix-endianness-speling:
Replaced "Endianess" with "Endianness" everywhere
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Splits one large testcase into smaller ones.
- Makes tests independent
- Adds some tests.
|
|
If a channel is closed by the peer while using a function with call semantics
in ssh_connection.erl return {error, closed}. Document that the functions
can return {error, timeout | closed} and not only ssh_request_status()
|
|
* marcus/revert-ssh-testcase2/OTP-12004:
fix failed conflict resolution
|
|
|
|
|
|
Some of the structs and functions needed by memsup.c are in
vmmeter.h on OpenBSD, too.
|
|
|
|
|
|
|
|
|
|
|
|
* dgud/debugger/still-invoked-gs-functions/OTP-12357:
debugger: Do not use the old removed gs functionality
|
|
Handle peer addresses that are unconfirmed (i.e. in state SCTP_UNCONFIRMED).
Handle unknown states instead of using ASSERT
|