Age | Commit message (Collapse) | Author |
|
|
|
* bg/compiler:
beam_peep: Remove optimization already done by beam_dead
beam_dead: Combine is_eq_exact instructions into select_val instructions
Evaluate is_record/3 at compile-time using type information
Evaluate element/2 at compile-time using type information
erl_expand_records: Replace is_record() with matching
OTP-8668 bg/compiler
The compiler optimizes record operations better.
|
|
* am/net_kernel_catchall:
Add catch all handle_call to net_kernel
|
|
|
|
Combine a sequence of chained is_eq_exact instructions into
a select_val instruction.
|
|
|
|
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.
|
|
The compiler currently generates better code for:
f(#r1{}) -> r1;
f(#r2{}) -> r2;
f(#r3{}) -> r3.
than for:
g(X) when is_record(X, r1) -> r1;
g(X) when is_record(X, r2) -> r2;
g(X) when is_record(X, r3) -> r3.
The compiler generates good code for pattern matching (as in f/1),
but in g/1 there are no patterns to match, and the clause to be
executed must be chosen by evaluating the guards sequentially
until one succeeds.
Make the compiler generate better code by replacing calls to
is_record() with matching in the function head (basically,
g/1 will automatically be rewritten to do pattern matching
as in f/1).
Note that this rewrite will also benefit code such as:
h(X) when X#r1.a =:= 1 -> ok.
because it would have been rewritten to:
h(X) when (is_record(X, r1, 3) orelse fail) and (element(2, X) =:= 1) ->
ok.
which in turn will be rewritten to:
h({r1,_,_}=X) when (true orelse fail) and (element(2, X) =:= 1) ->
ok.
(That will be further simplified in later compiler passes.)
|
|
* rn/resolver-leaking-ports:
Resolver: make inet_dns decode ugly truncated reply
Resolver: stop inet_res leaking ports
OTP-8652 inet_res leaking ports
The kernel DNS resolver was leaking one or two ports if the DNS reply could
not be parsed or if the resolver(s) caused noconnection type errors. Bug
now fixed. A DNS specification borderline truncated reply triggering the
port leakage bug has also been fixed.
|
|
Of the core networking apps only net_kernel fails to have a catchall
for unknown gen_server:call messages causing it to exit and eventually
bring down kernal_sup and beam if it had not been manually started.
For stability and consistancy it has been altered to include a
catchall which does not reply.
|
|
* dgud/emacs-catch-improvements:
Improved indentation of old catch.
Added more type highlighting and fixed record indentation with types.
|
|
* kj/emacs-erlang-flymake:
erlang-flymake: Document in README
erlang-flymake: Make the syntax check command configurable
erlang-flymake: By default pass <app>/include and <app>/ebin to compiler
erlang-flymake: Include in Makefile
erlang-flymake: Syntax check erlang code on the fly (using flymake)
|
|
Under certain circumstances the net kernel could hang. (Thanks to Scott
Lystig Fritchie.)
|
|
* bg/dist_utils:
dist_utils: Eliminate crash when list_to_existing_atom/1 fails
|
|
An example that didn't work previously.
case Foo of
{ok, X} ->
ok;
_ ->
catch file:close(FD)
end.
|
|
Type highlighting reported by Jay Nelson
non_neg_integer() will highlight purple but pos_integer() does not.
Closing record indentation problem reported by Maxim Treskin:
-record(state, {
sequence_number = 1 :: integer()
}).
|
|
|
|
|
|
Hopefully this covers at least some of the common cases and makes the
flymake support more usable as is. The purpose of including the ebin
directory is to support things like behaviours and parse transforms.
|
|
|
|
|
|
Bugfix: a DNS reply with the truncation bit set containing
misleading section length (i.e header claimed length greater
than what was actually in the reply section) in the header
caused decode error in inet_dns.
|
|
Bugfix: when all nameservers return a reply causing decode errors
or when errors enetunreach or econnrefused occured while
contacting them, one or two UDP ports was leaked i.e
left open and forgotten.
|
|
In the following scenario list_to_existing_atom/1 may crash
during handshake:
Start a node in one window:
erl -sname adam@localhost
Start another node in another window:
erl -sname bertil
In this node, ping the first node (use the actual hostname
in the command):
net:ping(adam@hostname).
There will be an error report similar to:
=ERROR REPORT==== 27-May-2010::15:03:14 ===
Error in process <0.40.0> on node 'bertil@hostname' with exit value: {badarg,[{erlang,list_to_existing_atom,
["adam@localhost"]},{dist_util,recv_challenge,1},{dist_util,handshake_we_started,1}]}
Eliminate the crash and the error report by catching the call to
list_to_existing_atom/1 and do a clean shutdown if it fails.
|
|
|
|
|
|
The Erlang scanner has been augmented with two new tokens: .. and ....
|
|
When exchanging groups between nodes pg2 did not remove duplicated members.
This bug was introduced in R13B03 (kernel-2.13.4).
|
|
* sv/format_status-name-handling:
handle {global, term()} names in format_status/2
OTP-8656 sv/format_status-name-handling
Calling sys:get_status() for processes that have globally registered names
that were not atoms would cause a crash. Corrected. (Thanks to Steve
Vinoski.)
|
|
* ks/cleanup-leex:
leex: Clean up as suggested by tidier
OTP-8655 ks/cleanup-leex
|
|
|
|
|
|
When given the option {builtins,true} Xref now adds calls to operators.
|
|
wrong shell!
|
|
|
|
|
|
|
|
|
|
OTP-8610: Problem processing netscape cookies - date
OTP-8624: Documented debug options not handled
|
|
The gen_fsm, gen_server, and wx_object format_status implementations
fail to handle global names of the form {global, term()} where term()
is something other than an atom, pid, or list. Change these
format_status implementations to treat names that are atoms, pids, or
lists as before, but for all other terms, set the header property of
the function return value to a tuple whose first element is a string
describing the return value and whose second element is the name term.
Add unit tests for gen_server and gen_fsm to verify sys:get_status
calls work successfully for globally registered instances.
|
|
OTP-8610: Problem processing netscape cookies - date
OTP-8624: Documented debug options not handled
|
|
OTP-8610: Some netscape cookie dates are given with a 2-digit year.
|
|
|
|
it before sending the fatal alert, even though documentation suggests
the socket will be flushed on linux as an effect of setting the nodelay option.
|
|
OTP-8574: Option to allow invalid row OIDs
OTP-8594: Make snmp forward compatible with new crypto
OTP-8595: snmpc fails to compile BITS with "holes"
OTP-8646: Agent-info lookup raise condition
OTP-8648: MIB server cache gc changed to on by default
|
|
Commit 329f737c03db51918361e127560a6f700e99028e removed
some unused code, but also introduced the need for
further clean-ups.
Fix a spec so that its return corresponds to reality.
Take out code that will never match from a function.
|
|
|
|
|
|
opened in the first connection.
|
|
|