<feed xmlns='http://www.w3.org/2005/Atom'>
<title>otp.git/lib/compiler/src, branch OTP-18.2.3</title>
<subtitle>Mirror of Erlang/OTP repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/'/>
<entry>
<title>Fix missing filename and line number in warning</title>
<updated>2015-11-20T13:24:57+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2015-11-19T11:13:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=d4bb044cb5359c6d4bffe3efcb8256cf7199bdf3'/>
<id>d4bb044cb5359c6d4bffe3efcb8256cf7199bdf3</id>
<content type='text'>
When the 'bin_opt_info' is given, warnings without filenames
and line numbers could sometimes be produced:

  no_file: Warning: INFO: matching non-variables after
  a previous clause matching a variable will prevent delayed
  sub binary optimization

The reason for the missing information is that #c_alias{} records lack
location information. There are several ways to fix the problem. The
easiest seems to be to get the location information from the
code).

Noticed-by: José Valim
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the 'bin_opt_info' is given, warnings without filenames
and line numbers could sometimes be produced:

  no_file: Warning: INFO: matching non-variables after
  a previous clause matching a variable will prevent delayed
  sub binary optimization

The reason for the missing information is that #c_alias{} records lack
location information. There are several ways to fix the problem. The
easiest seems to be to get the location information from the
code).

Noticed-by: José Valim
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix cerl_trees:label/2 bug with map K/V swap</title>
<updated>2015-10-26T14:37:39+00:00</updated>
<author>
<name>Magnus Lång</name>
<email>margnus1@telia.com</email>
</author>
<published>2014-06-05T10:12:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=cc1026a0e646b3a21b7bd7930fb7294425f1d79b'/>
<id>cc1026a0e646b3a21b7bd7930fb7294425f1d79b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'c-rack/fix-typo3' into maint</title>
<updated>2015-09-11T08:17:10+00:00</updated>
<author>
<name>Zandra</name>
<email>zandra@erlang.org</email>
</author>
<published>2015-09-11T08:17:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=6fd0f00a4a5420621d5a12c28024a1f21fe8e14d'/>
<id>6fd0f00a4a5420621d5a12c28024a1f21fe8e14d</id>
<content type='text'>
* c-rack/fix-typo3:
  Fix typo in call_last/3 spec
  Fix typo
  Fix typo: message to send is in x(1) not x(0)
  Fix another small typo
  Fix typo
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* c-rack/fix-typo3:
  Fix typo in call_last/3 spec
  Fix typo
  Fix typo: message to send is in x(1) not x(0)
  Fix another small typo
  Fix typo
</pre>
</div>
</content>
</entry>
<entry>
<title>compiler: Fix get_map_elements register corruption</title>
<updated>2015-09-04T15:58:03+00:00</updated>
<author>
<name>Björn-Egil Dahlberg</name>
<email>egil@erlang.org</email>
</author>
<published>2015-08-31T14:07:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=d0784035abb22f4f385c8a8737a7b15c3741bbca'/>
<id>d0784035abb22f4f385c8a8737a7b15c3741bbca</id>
<content type='text'>
Instruction get_map_elements might destroy target registers when the fail-label is taken.
Only seen for patterns with two, and only two, target registers.
Specifically: we copy one register, and then jump.

    foo(A,#{a := V1, b := V2}) -&gt; ...
    foo(A,#{b := V}) -&gt; ...

call foo(value, #{a=&gt;whops, c=&gt;42}).

corresponding assembler:

    {test,is_map,{f,5},[{x,1}]}.

    {get_map_elements,{f,7},{x,1},{list,[{atom,a},{x,1},{atom,b},{x,2}]}}.
    %% if 'a' exists but not 'b' {x,1} is overwritten, jump {f,7}

    {move,{integer,1},{x,0}}.
    {call_only,3,{f,10}}.
    {label,7}.

    {get_map_elements,{f,8},{x,1},{list,[{atom,b},{x,2}]}}.
    %% {x,1} (src) is read with a corrupt value

    {move,{x,0},{x,1}}.
    {move,{integer,2},{x,0}}.
    {call_only,3,{f,10}}.

The fix is to remove 'opt_moves' pass for get_map_elements instruction
in the case of two or more destinations.

Reported-by: Valery Tikhonov
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instruction get_map_elements might destroy target registers when the fail-label is taken.
Only seen for patterns with two, and only two, target registers.
Specifically: we copy one register, and then jump.

    foo(A,#{a := V1, b := V2}) -&gt; ...
    foo(A,#{b := V}) -&gt; ...

call foo(value, #{a=&gt;whops, c=&gt;42}).

corresponding assembler:

    {test,is_map,{f,5},[{x,1}]}.

    {get_map_elements,{f,7},{x,1},{list,[{atom,a},{x,1},{atom,b},{x,2}]}}.
    %% if 'a' exists but not 'b' {x,1} is overwritten, jump {f,7}

    {move,{integer,1},{x,0}}.
    {call_only,3,{f,10}}.
    {label,7}.

    {get_map_elements,{f,8},{x,1},{list,[{atom,b},{x,2}]}}.
    %% {x,1} (src) is read with a corrupt value

    {move,{x,0},{x,1}}.
    {move,{integer,2},{x,0}}.
    {call_only,3,{f,10}}.

The fix is to remove 'opt_moves' pass for get_map_elements instruction
in the case of two or more destinations.

Reported-by: Valery Tikhonov
</pre>
</div>
</content>
</entry>
<entry>
<title>compiler: Add extra checks for get_map_elements in validator</title>
<updated>2015-09-04T15:57:57+00:00</updated>
<author>
<name>Björn-Egil Dahlberg</name>
<email>egil@erlang.org</email>
</author>
<published>2015-08-31T14:07:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=c9bbba0db169ece606b02162057e4681b8fb1ce4'/>
<id>c9bbba0db169ece606b02162057e4681b8fb1ce4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix typo in call_last/3 spec</title>
<updated>2015-08-28T16:30:30+00:00</updated>
<author>
<name>Constantin Rack</name>
<email>constantin@rack.li</email>
</author>
<published>2015-08-28T16:30:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=bba382165f48cace97ac64e580d533d998c0fe80'/>
<id>bba382165f48cace97ac64e580d533d998c0fe80</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix typo</title>
<updated>2015-08-25T08:35:03+00:00</updated>
<author>
<name>Constantin Rack</name>
<email>constantin@rack.li</email>
</author>
<published>2015-08-25T08:35:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=363b2038feb3c668395c6c145d83910a04cebea5'/>
<id>363b2038feb3c668395c6c145d83910a04cebea5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix typo: message to send is in x(1) not x(0)</title>
<updated>2015-08-24T07:41:12+00:00</updated>
<author>
<name>Constantin Rack</name>
<email>constantin@rack.li</email>
</author>
<published>2015-08-24T07:41:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=1d967bb8406dfd475265520b24ac4bcf099a3df1'/>
<id>1d967bb8406dfd475265520b24ac4bcf099a3df1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix another small typo</title>
<updated>2015-08-09T19:08:42+00:00</updated>
<author>
<name>Constantin Rack</name>
<email>constantin@rack.li</email>
</author>
<published>2015-08-09T19:08:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=a1074f44ce2f83cb97a713a183c0335ff670b06a'/>
<id>a1074f44ce2f83cb97a713a183c0335ff670b06a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix typo</title>
<updated>2015-08-09T15:42:40+00:00</updated>
<author>
<name>Constantin Rack</name>
<email>constantin@rack.li</email>
</author>
<published>2015-08-09T15:42:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=75ab95febea6c3d22f395a4bf986507673bb6c57'/>
<id>75ab95febea6c3d22f395a4bf986507673bb6c57</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
