<feed xmlns='http://www.w3.org/2005/Atom'>
<title>otp.git/lib/compiler/doc/src, branch OTP-20.1.3</title>
<subtitle>Mirror of Erlang/OTP repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/'/>
<entry>
<title>Prepare release</title>
<updated>2017-10-02T13:55:32+00:00</updated>
<author>
<name>Erlang/OTP</name>
<email>otp@erlang.org</email>
</author>
<published>2017-10-02T13:55:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=b584195a6befac314eef75ac3f1ae2ac4f448a61'/>
<id>b584195a6befac314eef75ac3f1ae2ac4f448a61</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Update release notes</title>
<updated>2017-09-22T13:21:49+00:00</updated>
<author>
<name>Erlang/OTP</name>
<email>otp@erlang.org</email>
</author>
<published>2017-09-22T13:21:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=af2073640c4b7c67c9b978ebc203d57ac43e96dc'/>
<id>af2073640c4b7c67c9b978ebc203d57ac43e96dc</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Prepare release</title>
<updated>2017-08-23T08:39:49+00:00</updated>
<author>
<name>Erlang/OTP</name>
<email>otp@erlang.org</email>
</author>
<published>2017-08-23T08:39:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=e769d2c06eddfca16b1d4b5f7a3a7d1ed0218777'/>
<id>e769d2c06eddfca16b1d4b5f7a3a7d1ed0218777</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Prepare release</title>
<updated>2017-06-21T08:53:19+00:00</updated>
<author>
<name>Erlang/OTP</name>
<email>otp@erlang.org</email>
</author>
<published>2017-06-21T08:53:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=c18b13d4c8aa31b145703bbbf228fb07d6b2a0a5'/>
<id>c18b13d4c8aa31b145703bbbf228fb07d6b2a0a5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Prepare release"</title>
<updated>2017-05-31T14:21:00+00:00</updated>
<author>
<name>Hans Nilsson</name>
<email>hans@erlang.org</email>
</author>
<published>2017-05-31T14:21:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=32275a2fc0b86d1f1b124706afc80f3ff92216eb'/>
<id>32275a2fc0b86d1f1b124706afc80f3ff92216eb</id>
<content type='text'>
This reverts commit eaf8ca41dfa4850437ad270d3897399c9358ced0.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit eaf8ca41dfa4850437ad270d3897399c9358ced0.
</pre>
</div>
</content>
</entry>
<entry>
<title>Prepare release</title>
<updated>2017-05-30T14:15:30+00:00</updated>
<author>
<name>Erlang/OTP</name>
<email>otp@erlang.org</email>
</author>
<published>2017-05-30T14:15:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=eaf8ca41dfa4850437ad270d3897399c9358ced0'/>
<id>eaf8ca41dfa4850437ad270d3897399c9358ced0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Warn for potentially unsafe use of get_stacktrace/0</title>
<updated>2017-05-12T08:32:03+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2017-05-02T03:41:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=7b169140b2d37f43996b9d1a94877926a471d97d'/>
<id>7b169140b2d37f43996b9d1a94877926a471d97d</id>
<content type='text'>
erlang:get_stacktrace/0 returns the stacktrace for the latest
exception.  The problem is that the stacktrace is kept until the next
exception occurs. If the last exception was a 'function_clause' or a
'badarg', the arguments for the call are also kept forever. The
arguments can be terms of any size (potentially huge).

In a future release, we would like to only allow
erlang:get_stacktrace/0 from within a 'try' expression. That would
make it possible to clear the stacktrace when the 'try' expression is
exited.

The 'catch' expression has no natural end where the stacktrace could
be cleared. The stacktrace could be cleared at the end of the function
that the 'catch' occurs in, but that would cause problems in the
following scenario (from real life, but simplified):

try
  ...
catch _:_ -&gt;
  io:format(...),
  io:format("~p\n", [erlang:get_stacktrace()])
end.

%% In io.erl.
format(Fmt, Args) -&gt;
  Res = case ... of
     SomePattern -&gt;
       catch...
       ...;
     SomeOtherPattern -&gt;
       %% Output the formatted string here
       ...
  end,
  clear_stacktrace(),  %% Inserted by compiler.
  Res.

The call to io:format() would always clear the stacktrace before
it could be retrieved.

That problem could be solved by tightning the scope in which the
stacktrace is kept, but the rules for how long erlang:get_stacktrace/0
would work would become complicated.

Therefore, the solution we suggest for a future major release of
OTP is that erlang:get_stacktrace/0 will return [] if it is called
outside the 'catch' part of a 'try' expression.

To help users prepare, introduce a warning when it is likely that
erlang:get_stacktrace/0 will always return an empty list, for example
in this code:

  catch error(foo),
  Stk = erlang:get_stacktrace()

or in this code:

  try Expr
  catch _:_ -&gt; ok end,
  Stk = erlang:get_stacktrace()
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
erlang:get_stacktrace/0 returns the stacktrace for the latest
exception.  The problem is that the stacktrace is kept until the next
exception occurs. If the last exception was a 'function_clause' or a
'badarg', the arguments for the call are also kept forever. The
arguments can be terms of any size (potentially huge).

In a future release, we would like to only allow
erlang:get_stacktrace/0 from within a 'try' expression. That would
make it possible to clear the stacktrace when the 'try' expression is
exited.

The 'catch' expression has no natural end where the stacktrace could
be cleared. The stacktrace could be cleared at the end of the function
that the 'catch' occurs in, but that would cause problems in the
following scenario (from real life, but simplified):

try
  ...
catch _:_ -&gt;
  io:format(...),
  io:format("~p\n", [erlang:get_stacktrace()])
end.

%% In io.erl.
format(Fmt, Args) -&gt;
  Res = case ... of
     SomePattern -&gt;
       catch...
       ...;
     SomeOtherPattern -&gt;
       %% Output the formatted string here
       ...
  end,
  clear_stacktrace(),  %% Inserted by compiler.
  Res.

The call to io:format() would always clear the stacktrace before
it could be retrieved.

That problem could be solved by tightning the scope in which the
stacktrace is kept, but the rules for how long erlang:get_stacktrace/0
would work would become complicated.

Therefore, the solution we suggest for a future major release of
OTP is that erlang:get_stacktrace/0 will return [] if it is called
outside the 'catch' part of a 'try' expression.

To help users prepare, introduce a warning when it is likely that
erlang:get_stacktrace/0 will always return an empty list, for example
in this code:

  catch error(foo),
  Stk = erlang:get_stacktrace()

or in this code:

  try Expr
  catch _:_ -&gt; ok end,
  Stk = erlang:get_stacktrace()
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #1451 from bjorng/bjorn/compiler/nowarn_obsolete_guard</title>
<updated>2017-05-11T08:18:01+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bgustavsson@gmail.com</email>
</author>
<published>2017-05-11T08:18:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=57faf8743b693f02eda2ba0a379e234f554d5e96'/>
<id>57faf8743b693f02eda2ba0a379e234f554d5e96</id>
<content type='text'>
Correct description of nowarn_obsolete_guard

By default, warnings for obsolete guards are turned on. Correct the description to make that clear.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Correct description of nowarn_obsolete_guard

By default, warnings for obsolete guards are turned on. Correct the description to make that clear.</pre>
</div>
</content>
</entry>
<entry>
<title>Update compile.xml</title>
<updated>2017-05-11T05:04:32+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bgustavsson@gmail.com</email>
</author>
<published>2017-05-11T05:04:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=d55c8e08714a8badd4a0af2bd14965b4672958fc'/>
<id>d55c8e08714a8badd4a0af2bd14965b4672958fc</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Prepare release"</title>
<updated>2017-05-05T11:15:42+00:00</updated>
<author>
<name>Raimo Niskanen</name>
<email>raimo@erlang.org</email>
</author>
<published>2017-05-05T11:15:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=eace29905be436d77245656b2511c9a9c2c67c90'/>
<id>eace29905be436d77245656b2511c9a9c2c67c90</id>
<content type='text'>
This reverts commit dc57404252c47520f352834ad9be45ad684f96c9.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit dc57404252c47520f352834ad9be45ad684f96c9.
</pre>
</div>
</content>
</entry>
</feed>
