<feed xmlns='http://www.w3.org/2005/Atom'>
<title>otp.git/lib/hipe/rtl, branch maint</title>
<subtitle>Mirror of Erlang/OTP repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/'/>
<entry>
<title>HiPE: Don't fail the compilation for unimplemented instructions</title>
<updated>2019-03-20T15:19:30+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2019-03-11T12:15:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=4e0430638635083c199f81375a6c14f2ffb726fb'/>
<id>4e0430638635083c199f81375a6c14f2ffb726fb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Change "can not" into "cannot"</title>
<updated>2018-07-27T08:16:17+00:00</updated>
<author>
<name>Raimo Niskanen</name>
<email>raimo@erlang.org</email>
</author>
<published>2018-07-26T12:14:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=37c11cda19bd9067a4e094fbde53b276d6ab0d3d'/>
<id>37c11cda19bd9067a4e094fbde53b276d6ab0d3d</id>
<content type='text'>
I did not find any legitimate use of "can not", however skipped
changing e.g RFCs archived in the source tree.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I did not find any legitimate use of "can not", however skipped
changing e.g RFCs archived in the source tree.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove newline between can and not</title>
<updated>2018-07-27T08:16:17+00:00</updated>
<author>
<name>Raimo Niskanen</name>
<email>raimo@erlang.org</email>
</author>
<published>2018-07-26T08:06:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=1fd03472d3d57e57ae4ebcbf0109f82dce14b90c'/>
<id>1fd03472d3d57e57ae4ebcbf0109f82dce14b90c</id>
<content type='text'>
After this whitespace modification there should be no "can not"s
separated by a newline in the entire OTP repository, so to find
them all a simple git grep will do just fine.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After this whitespace modification there should be no "can not"s
separated by a newline in the entire OTP repository, so to find
them all a simple git grep will do just fine.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix a crash ih HoPE's lazy code motion pass</title>
<updated>2018-06-11T15:47:37+00:00</updated>
<author>
<name>Kostis Sagonas</name>
<email>kostis@it.uu.se</email>
</author>
<published>2018-06-11T15:47:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=992a1f18934f071858b5e87f32bda5b49bed637d'/>
<id>992a1f18934f071858b5e87f32bda5b49bed637d</id>
<content type='text'>
Some change in the BEAM compiler resulted in the creation of basic
blocks that differed from those previously created by the compiler.
As a result, the lazy code motion pass of RTL crashed when compiling
some of the new code.

Crashes were privately reported by @richcarl.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some change in the BEAM compiler resulted in the creation of basic
blocks that differed from those previously created by the compiler.
As a result, the lazy code motion pass of RTL crashed when compiling
some of the new code.

Crashes were privately reported by @richcarl.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge PR-1685 from sverker/sverker/hipe-verify-gcsafe OTP-14900</title>
<updated>2018-01-29T14:55:52+00:00</updated>
<author>
<name>Sverker Eriksson</name>
<email>sverker@erlang.org</email>
</author>
<published>2018-01-29T14:55:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=e584c594c167020b5db2b6c9813a6bd2a14d3589'/>
<id>e584c594c167020b5db2b6c9813a6bd2a14d3589</id>
<content type='text'>
Make hipe compile option verify_gcsafe the default</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make hipe compile option verify_gcsafe the default</pre>
</div>
</content>
</entry>
<entry>
<title>Don't build a stacktrace if it's only passed to erlang:raise/3</title>
<updated>2018-01-22T13:23:52+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2017-11-28T06:28:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=9b0122b65bdcafbae2a3cfd3299903da0948acab'/>
<id>9b0122b65bdcafbae2a3cfd3299903da0948acab</id>
<content type='text'>
Consider the following function:

    function({function,Name,Arity,CLabel,Is0}, Lc0) -&gt;
      try
        %% Optimize the code for the function.
      catch
        Class:Error:Stack -&gt;
          io:format("Function: ~w/~w\n", [Name,Arity]),
          erlang:raise(Class, Error, Stack)
      end.

The stacktrace is retrieved, but it is only used in the call
to erlang:raise/3. There is no need to build a stacktrace
in this function. We can avoid the building if we introduce
an instruction called raw_raise/3 that works exactly like
the erlang:raise/3 BIF except that its third argument must
be a raw stacktrace.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Consider the following function:

    function({function,Name,Arity,CLabel,Is0}, Lc0) -&gt;
      try
        %% Optimize the code for the function.
      catch
        Class:Error:Stack -&gt;
          io:format("Function: ~w/~w\n", [Name,Arity]),
          erlang:raise(Class, Error, Stack)
      end.

The stacktrace is retrieved, but it is only used in the call
to erlang:raise/3. There is no need to build a stacktrace
in this function. We can avoid the building if we introduce
an instruction called raw_raise/3 that works exactly like
the erlang:raise/3 BIF except that its third argument must
be a raw stacktrace.
</pre>
</div>
</content>
</entry>
<entry>
<title>hipe: Mark primop 'bs_put_utf8' as gcsafe</title>
<updated>2018-01-16T20:38:36+00:00</updated>
<author>
<name>Sverker Eriksson</name>
<email>sverker@erlang.org</email>
</author>
<published>2018-01-16T20:36:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=553f4fdb6893289cd9c7f07bbb3e599c55cf3498'/>
<id>553f4fdb6893289cd9c7f07bbb3e599c55cf3498</id>
<content type='text'>
which is has been since 3d21f793538927ae88f78504a11dd898e8ca1a7a
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
which is has been since 3d21f793538927ae88f78504a11dd898e8ca1a7a
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'maint'</title>
<updated>2018-01-03T16:11:49+00:00</updated>
<author>
<name>Sverker Eriksson</name>
<email>sverker@erlang.org</email>
</author>
<published>2018-01-03T16:11:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=f9a0bac8f708a5cf769860ef2ee8af0591c5dbaf'/>
<id>f9a0bac8f708a5cf769860ef2ee8af0591c5dbaf</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix bug in hipe primop bs_put_utf8</title>
<updated>2018-01-03T15:43:31+00:00</updated>
<author>
<name>Sverker Eriksson</name>
<email>sverker@erlang.org</email>
</author>
<published>2017-12-20T16:18:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=3d21f793538927ae88f78504a11dd898e8ca1a7a'/>
<id>3d21f793538927ae88f78504a11dd898e8ca1a7a</id>
<content type='text'>
by preventing it from doing GC, which generated code relies on.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
by preventing it from doing GC, which generated code relies on.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add syntax in try/catch to retrieve the stacktrace directly</title>
<updated>2017-11-30T11:46:51+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2017-11-14T08:05:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=ef2e55c707a6c3d1f54f2acb9c8bfbe3fb7a8659'/>
<id>ef2e55c707a6c3d1f54f2acb9c8bfbe3fb7a8659</id>
<content type='text'>
This commit adds a new syntax for retrieving the stacktrace
without calling erlang:get_stacktrace/0. That allow us to
deprecate erlang:get_stacktrace/0 and ultimately remove it.

The problem with erlang:get_stacktrace/0 is that it can keep huge
terms in a process for an indefinite time after an exception. The
stacktrace can be huge after a 'function_clause' exception or a failed
call to a BIF or operator, because the arguments for the call will be
included in the stacktrace. For example:

1&gt; catch abs(lists:seq(1, 1000)).
{'EXIT',{badarg,[{erlang,abs,
                         [[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20|...]],
                         []},
                 {erl_eval,do_apply,6,[{file,"erl_eval.erl"},{line,674}]},
                 {erl_eval,expr,5,[{file,"erl_eval.erl"},{line,431}]},
                 {shell,exprs,7,[{file,"shell.erl"},{line,687}]},
                 {shell,eval_exprs,7,[{file,"shell.erl"},{line,642}]},
                 {shell,eval_loop,3,[{file,"shell.erl"},{line,627}]}]}}
2&gt; erlang:get_stacktrace().
[{erlang,abs,
         [[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,
           23,24|...]],
         []},
 {erl_eval,do_apply,6,[{file,"erl_eval.erl"},{line,674}]},
 {erl_eval,expr,5,[{file,"erl_eval.erl"},{line,431}]},
 {shell,exprs,7,[{file,"shell.erl"},{line,687}]},
 {shell,eval_exprs,7,[{file,"shell.erl"},{line,642}]},
 {shell,eval_loop,3,[{file,"shell.erl"},{line,627}]}]
3&gt;

We can extend the syntax for clauses in try/catch to optionally bind
the stacktrace to a variable.

Here is an example using the current syntax:

    try
      Expr
    catch C:E -&gt;
      Stk = erlang:get_stacktrace(),
      .
      .
      .

In the new syntax, it would look like:

    try
      Expr
    catch
      C:E:Stk -&gt;
       .
       .
       .

Only a variable (not a pattern) is allowed in the stacktrace position,
to discourage matching of the stacktrace. (Matching would also be
expensive, because the raw format of the stacktrace would have to be
converted to the cooked form before matching.)

Note that:

    try
      Expr
    catch E -&gt;
      .
      .
      .

is a shorthand for:

    try
      Expr
    catch throw:E -&gt;
      .
      .
      .

If the stacktrace is to be retrieved for a throw, the 'throw:'
prefix must be explicitly included:

    try
      Expr
    catch throw:E:Stk -&gt;
      .
      .
      .
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit adds a new syntax for retrieving the stacktrace
without calling erlang:get_stacktrace/0. That allow us to
deprecate erlang:get_stacktrace/0 and ultimately remove it.

The problem with erlang:get_stacktrace/0 is that it can keep huge
terms in a process for an indefinite time after an exception. The
stacktrace can be huge after a 'function_clause' exception or a failed
call to a BIF or operator, because the arguments for the call will be
included in the stacktrace. For example:

1&gt; catch abs(lists:seq(1, 1000)).
{'EXIT',{badarg,[{erlang,abs,
                         [[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20|...]],
                         []},
                 {erl_eval,do_apply,6,[{file,"erl_eval.erl"},{line,674}]},
                 {erl_eval,expr,5,[{file,"erl_eval.erl"},{line,431}]},
                 {shell,exprs,7,[{file,"shell.erl"},{line,687}]},
                 {shell,eval_exprs,7,[{file,"shell.erl"},{line,642}]},
                 {shell,eval_loop,3,[{file,"shell.erl"},{line,627}]}]}}
2&gt; erlang:get_stacktrace().
[{erlang,abs,
         [[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,
           23,24|...]],
         []},
 {erl_eval,do_apply,6,[{file,"erl_eval.erl"},{line,674}]},
 {erl_eval,expr,5,[{file,"erl_eval.erl"},{line,431}]},
 {shell,exprs,7,[{file,"shell.erl"},{line,687}]},
 {shell,eval_exprs,7,[{file,"shell.erl"},{line,642}]},
 {shell,eval_loop,3,[{file,"shell.erl"},{line,627}]}]
3&gt;

We can extend the syntax for clauses in try/catch to optionally bind
the stacktrace to a variable.

Here is an example using the current syntax:

    try
      Expr
    catch C:E -&gt;
      Stk = erlang:get_stacktrace(),
      .
      .
      .

In the new syntax, it would look like:

    try
      Expr
    catch
      C:E:Stk -&gt;
       .
       .
       .

Only a variable (not a pattern) is allowed in the stacktrace position,
to discourage matching of the stacktrace. (Matching would also be
expensive, because the raw format of the stacktrace would have to be
converted to the cooked form before matching.)

Note that:

    try
      Expr
    catch E -&gt;
      .
      .
      .

is a shorthand for:

    try
      Expr
    catch throw:E -&gt;
      .
      .
      .

If the stacktrace is to be retrieved for a throw, the 'throw:'
prefix must be explicitly included:

    try
      Expr
    catch throw:E:Stk -&gt;
      .
      .
      .
</pre>
</div>
</content>
</entry>
</feed>
