<feed xmlns='http://www.w3.org/2005/Atom'>
<title>otp.git/lib/compiler/src, branch OTP-20.0.1</title>
<subtitle>Mirror of Erlang/OTP repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/'/>
<entry>
<title>Update copyright year</title>
<updated>2017-06-14T13:36:21+00:00</updated>
<author>
<name>Hans Nilsson</name>
<email>hans@erlang.org</email>
</author>
<published>2017-06-14T13:36:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=43718d3b81d7f3d08e25047e22d579801bbe5044'/>
<id>43718d3b81d7f3d08e25047e22d579801bbe5044</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>v3_kernel: Keep orddicts sorted</title>
<updated>2017-06-13T11:07:02+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2017-06-13T11:07:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=4179fda36587ea42d79a7222eb358e4ca3fbcfab'/>
<id>4179fda36587ea42d79a7222eb358e4ca3fbcfab</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>sys_core_fold: Ensure that orddict keys are unique</title>
<updated>2017-06-13T10:58:19+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2017-06-13T10:52:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=2820003c58097805f5ec8d2c82c3006e20662fcb'/>
<id>2820003c58097805f5ec8d2c82c3006e20662fcb</id>
<content type='text'>
All keys in an orddict must be unique. sys_core_fold:sub_sub_scope/1
broke that rule. It was probably harmless, but it is better to
avoid such rule violations.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
All keys in an orddict must be unique. sys_core_fold:sub_sub_scope/1
broke that rule. It was probably harmless, but it is better to
avoid such rule violations.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'hasse/unicode_atoms/OTP-14285'</title>
<updated>2017-06-12T10:23:48+00:00</updated>
<author>
<name>Hans Bolinder</name>
<email>hasse@erlang.org</email>
</author>
<published>2017-06-12T10:23:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=dd9e39dc2b97e30c03b24a00eb757be7d2c2bdc2'/>
<id>dd9e39dc2b97e30c03b24a00eb757be7d2c2bdc2</id>
<content type='text'>
* hasse/unicode_atoms/OTP-14285:
  compiler: Handle (bad) Unicode parse transform module names
  kernel: Improve handling of Unicode filenames
  stdlib: Handle Unicode atoms in ms_transform
  stdlib: Improve Unicode handling of the Erlang parser
  stdlib: Handle unknown compiler options with Unicode
  stdlib: Handle Unicode macro names
  stdlib: Correct Unicode handling in escript
  dialyzer: Improve handling of Unicode
  parsetools: Improve handling of Unicode atoms
  stdlib: Handle Unicode atoms when formatting stacktraces
  stdlib: Add more checks of module names to the linter
  stdlib: Handle Unicode atoms better in io_lib_format
  stdlib: Handle Unicode atoms in c.erl
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* hasse/unicode_atoms/OTP-14285:
  compiler: Handle (bad) Unicode parse transform module names
  kernel: Improve handling of Unicode filenames
  stdlib: Handle Unicode atoms in ms_transform
  stdlib: Improve Unicode handling of the Erlang parser
  stdlib: Handle unknown compiler options with Unicode
  stdlib: Handle Unicode macro names
  stdlib: Correct Unicode handling in escript
  dialyzer: Improve handling of Unicode
  parsetools: Improve handling of Unicode atoms
  stdlib: Handle Unicode atoms when formatting stacktraces
  stdlib: Add more checks of module names to the linter
  stdlib: Handle Unicode atoms better in io_lib_format
  stdlib: Handle Unicode atoms in c.erl
</pre>
</div>
</content>
</entry>
<entry>
<title>compiler: Handle (bad) Unicode parse transform module names</title>
<updated>2017-06-12T10:04:58+00:00</updated>
<author>
<name>Hans Bolinder</name>
<email>hasse@erlang.org</email>
</author>
<published>2017-06-12T10:04:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=3ddf2b343c62d2dcd1678ded3f20639ae5c00812'/>
<id>3ddf2b343c62d2dcd1678ded3f20639ae5c00812</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix unsafe bit syntax matching optimization</title>
<updated>2017-06-07T14:32:35+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2017-06-07T12:27:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=09112806c15a81be86730503af36e304ac11d1ed'/>
<id>09112806c15a81be86730503af36e304ac11d1ed</id>
<content type='text'>
As part of sys_core_fold, variables involved in bit syntax
matching would be annotated when it would be safe for a later
pass to do the delayed sub-binary creation optimization.

An implicit assumption regarding the annotation was that the
code must not be further optimized. That assumption was broken
in 05130e48555891, which introduced a fixpoint iteration
(applying the optimizations until there were no more changes).
That means that a variable could be annotated as safe for
reusing the match context in one iteration, but a later iteration
could rewrite the code in a way that would make the optimization
unsafe.

One way to fix this would be to clear all reuse_for_context
annotations before each iteration. But that would be wasteful.

Instead I chose to fix the problem by moving out the annotation
code to a separate pass (sys_core_bsm) that is run later after
all major optimizations of Core Erlang has been done.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As part of sys_core_fold, variables involved in bit syntax
matching would be annotated when it would be safe for a later
pass to do the delayed sub-binary creation optimization.

An implicit assumption regarding the annotation was that the
code must not be further optimized. That assumption was broken
in 05130e48555891, which introduced a fixpoint iteration
(applying the optimizations until there were no more changes).
That means that a variable could be annotated as safe for
reusing the match context in one iteration, but a later iteration
could rewrite the code in a way that would make the optimization
unsafe.

One way to fix this would be to clear all reuse_for_context
annotations before each iteration. But that would be wasteful.

Instead I chose to fix the problem by moving out the annotation
code to a separate pass (sys_core_bsm) that is run later after
all major optimizations of Core Erlang has been done.
</pre>
</div>
</content>
</entry>
<entry>
<title>Correct handling of module name in compile:forms/1,2</title>
<updated>2017-05-23T08:35:31+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2017-05-23T07:38:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=7336c17119f424b6356f2ec2b670994cb462570e'/>
<id>7336c17119f424b6356f2ec2b670994cb462570e</id>
<content type='text'>
compile:forms/1,2 is documented to return:

  {ok,ModuleName,BinaryOrCode}

However, if one of the options 'from_core', 'from_asm', or
'from_beam' is given, ModuleName will be returned as [].
A worse problem is that is that if one those options are
combined with the 'native' option, compilation will crash.

Correct compile:forms/1,2 to pick up the module name from
the forms provided (either Core Erlang, Beam assembly code,
or a Beam file).

Reported here: https://bugs.erlang.org/browse/ERL-417
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
compile:forms/1,2 is documented to return:

  {ok,ModuleName,BinaryOrCode}

However, if one of the options 'from_core', 'from_asm', or
'from_beam' is given, ModuleName will be returned as [].
A worse problem is that is that if one those options are
combined with the 'native' option, compilation will crash.

Correct compile:forms/1,2 to pick up the module name from
the forms provided (either Core Erlang, Beam assembly code,
or a Beam file).

Reported here: https://bugs.erlang.org/browse/ERL-417
</pre>
</div>
</content>
</entry>
<entry>
<title>genop.tab: Add an OTP 20 comment</title>
<updated>2017-05-19T10:25:14+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2017-05-19T10:25:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=8d05453123fdc45bbb6f77a20aaa270ae443014b'/>
<id>8d05453123fdc45bbb6f77a20aaa270ae443014b</id>
<content type='text'>
Make it clear that is_tagged_tuple/4 was added in OTP 20 (not R17).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make it clear that is_tagged_tuple/4 was added in OTP 20 (not R17).
</pre>
</div>
</content>
</entry>
<entry>
<title>erl_bifs: Remove pure BIFs serving no useful purpose</title>
<updated>2017-05-10T08:37:11+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2017-05-08T14:08:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=8f84553cb56a6cbe0ae6785dba18c81ed6e47641'/>
<id>8f84553cb56a6cbe0ae6785dba18c81ed6e47641</id>
<content type='text'>
Functions that can are known be pure can be evaluated at
compile-time if the arguments are literals and if the result is
expressible as a literal.

list_to_ref/1 and list_to_port/1 returns terms that cannot be
expressed as literals, so the optimization is not possible.
The argument for port_to_list/1 is never a literal, so there is
no way to evaluate it at compile-time. Therefore, marking those
functions as pure serves no useful purpose.

Note: list_to_pid/1 *is* marked as pure, but only so that we can test
the code in sys_core_fold that rejects pure functions that evaluate to
at term that is not possible to express as a literal. It is sufficient
to have one pure function of that kind.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Functions that can are known be pure can be evaluated at
compile-time if the arguments are literals and if the result is
expressible as a literal.

list_to_ref/1 and list_to_port/1 returns terms that cannot be
expressed as literals, so the optimization is not possible.
The argument for port_to_list/1 is never a literal, so there is
no way to evaluate it at compile-time. Therefore, marking those
functions as pure serves no useful purpose.

Note: list_to_pid/1 *is* marked as pure, but only so that we can test
the code in sys_core_fold that rejects pure functions that evaluate to
at term that is not possible to express as a literal. It is sufficient
to have one pure function of that kind.
</pre>
</div>
</content>
</entry>
<entry>
<title>erl_bifs: Remove erlang:hash/2 from list of pure functions</title>
<updated>2017-05-10T08:37:11+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2017-05-08T05:19:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=2bcc3f97e9273c543b803a812da393e640464978'/>
<id>2bcc3f97e9273c543b803a812da393e640464978</id>
<content type='text'>
erlang:hash/2 was removed in c5d9b970fb5b3a71.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
erlang:hash/2 was removed in c5d9b970fb5b3a71.
</pre>
</div>
</content>
</entry>
</feed>
