Age | Commit message (Collapse) | Author |
|
As pointed out by roowe, qlc does not handle errors in early compiler
(scanner, parser) well in OTP 18.0.
|
|
|
|
* richcarl/warnings-by-default/OTP-12781:
stdlib: Use warning channel in test qlc_SUITE:otp_6964/1
stdlib: Fix testcase for qlc_SUITE
kernel: Fix code_SUITE with respect to new logger default
Map error logger warnings to warning messages by default
|
|
|
|
|
|
As long as the Erlang Compiler and qlc do not agree on the location of
LC warnings, qlc's own warnings about patterns and filters that always
fail have been silenced.
|
|
|
|
|
|
|
|
|
|
Thanks to Sam Bobroff for reporting the bug.
|
|
|
|
|
|
|
|
|
|
Tuple funs were deprecated in R15B (in commit a4029940e309518f5500).
|
|
The run-time warning for use of tuple funs will not catch the use
of literal tuple funs, such as:
if
{erlang,'+'}(3,X) =:= 0 -> true;
true -> false
end.
Therefore, add a compile-time warning to give users some warning
before they stop working in R16.
|
|
|
|
The new file lib/stdlib/test/qlc_SUITE_data/join_info_compat.erl was
created on an R12B node.
|
|
|
|
Currently, the external fun syntax "fun M:F/A" only supports
literals. That is, "fun lists:reverse/1" is allowed but not
"fun M:F/A".
In many real-life situations, some or all of M, F, A are
not known until run-time, and one is forced to either use
the undocumented erlang:make_fun/3 BIF or to use a
"tuple fun" (which is deprecated).
EEP-23 suggests that the parser (erl_parse) should immediately
transform "fun M:F/A" to "erlang:make_fun(M, F, A)". We have
not followed that approach in this implementation, because we
want the abstract code to mirror the source code as closely
as possible, and we also consider erlang:make_fun/3 to
be an implementation detail that we might want to remove in
the future.
Instead, we will change the abstract format for "fun M:F/A" (in a way
that is not backwards compatible), and while we are at it, we will
move the translation from "fun M:F/A" to "erlang:make_fun(M, F, A)"
from sys_pre_expand down to the v3_core pass. We will also update
the debugger and xref to use the new format.
We did consider making the abstract format backward compatible if
no variables were used in the fun, but decided against it. Keeping
it backward compatible would mean that there would be different
abstract formats for the no-variable and variable case, and tools
would have to handle both formats, probably forever.
Reference: http://www.erlang.org/eeps/eep-0023.html
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The erl_expand_records compiler pass translates the
following code:
h(X) when X#r1.a =:= 1 -> ok.
to (essentially):
h({r1,V1,V2}=X) when element(2, X) =:= 1 -> ok.
Since the guard can only be executed when the pattern matching
has succeeded, we know that the second element in the tuple X
must have been bound to V2. Thus we can eliminate the call
to element/2 like this:
h({r1,V1,V2}=X) when V1 =:= 1 -> ok.
|
|
* bg/opt-receive:
Test that gen_server:call/2,3 are fast even with a huge message queue
erts: Add tests for the receive optimization
Update primary bootstrap
erts: Implement recv_mark/1 and recv_set/1 for real
compiler tests: Cover the error handling code in beam_receive
compiler test: Test optimization of receive statements
Optimize selective receives in the presence of a large message queue
Introduce the new recv_mark/1 and recv_mark/1 instructions
Compile tests that communicate with R12 nodes with the r12 option
Move p_run/2 to test_lib
gen: Inline wait_resp_mon/2 to help the compiler optimize
OTP-8623 bg/opt-receive
reveive statements that can only read out a newly created reference are now
specially optimized so that it will execute in constant time regardless of
the number of messages in the receive queue for the process. That
optimization will benefit calls to gen_server:call(). (See gen:do_call/4
for an example of a receive statement that will be optimized.)
|
|
R12 nodes cannot load code that use the optimized receive that
we are about to implement.
|
|
|