<feed xmlns='http://www.w3.org/2005/Atom'>
<title>otp.git/lib/compiler/src, branch OTP-18.1.1</title>
<subtitle>Mirror of Erlang/OTP repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/'/>
<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>
<entry>
<title>Change license text to APLv2</title>
<updated>2015-06-18T09:31:02+00:00</updated>
<author>
<name>Bruce Yinhe</name>
<email>bruce@erlang.org</email>
</author>
<published>2015-06-18T09:31:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=738c34d4bb8f1a3811acd00af8c6c12107f8315b'/>
<id>738c34d4bb8f1a3811acd00af8c6c12107f8315b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>compiler: Fix beam_bool pass for get_map_elements</title>
<updated>2015-06-17T08:36:02+00:00</updated>
<author>
<name>Björn-Egil Dahlberg</name>
<email>egil@erlang.org</email>
</author>
<published>2015-06-15T09:30:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=82f6d6a5c9ad7dec5fccf92e892611a083efe896'/>
<id>82f6d6a5c9ad7dec5fccf92e892611a083efe896</id>
<content type='text'>
Before beam_split the get_map_elements instruction is still in
blocks and the helper function in beam_jump did not reflect this.

Reported-by: Quviq twitter account
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before beam_split the get_map_elements instruction is still in
blocks and the helper function in beam_jump did not reflect this.

Reported-by: Quviq twitter account
</pre>
</div>
</content>
</entry>
</feed>
