<feed xmlns='http://www.w3.org/2005/Atom'>
<title>otp.git/lib/compiler/test/core_SUITE_data, branch OTP-18.3.2</title>
<subtitle>Mirror of Erlang/OTP repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/'/>
<entry>
<title>test suite: Always place .core files in data directories</title>
<updated>2015-04-22T08:12:32+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2015-04-20T08:19:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=37996d71a60f8aa4dd1078a7903098aa656b9e35'/>
<id>37996d71a60f8aa4dd1078a7903098aa656b9e35</id>
<content type='text'>
For tidiness, always place .core files in data directories.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For tidiness, always place .core files in data directories.
</pre>
</div>
</content>
</entry>
<entry>
<title>Make the syntax for map pairs readable</title>
<updated>2015-01-30T14:51:52+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2015-01-30T14:43:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=f667931e2905797ffab63e224e56eaf07f77178a'/>
<id>f667931e2905797ffab63e224e56eaf07f77178a</id>
<content type='text'>
Use the same syntax for map pairs in Core Erlang code as in the
Erlang Code. This Erlang code:

  M#{x:=42,y=&gt;1}

will look like this in Core Erlang:

  ~{'x':=42,'y'=&gt;1|M}~
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use the same syntax for map pairs in Core Erlang code as in the
Erlang Code. This Erlang code:

  M#{x:=42,y=&gt;1}

will look like this in Core Erlang:

  ~{'x':=42,'y'=&gt;1|M}~
</pre>
</div>
</content>
</entry>
<entry>
<title>compiler: Change Maps Core Format</title>
<updated>2014-03-17T16:47:34+00:00</updated>
<author>
<name>Björn-Egil Dahlberg</name>
<email>egil@erlang.org</email>
</author>
<published>2014-03-06T16:59:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=70c968442a8e2afbae7fa485527920006bfe2031'/>
<id>70c968442a8e2afbae7fa485527920006bfe2031</id>
<content type='text'>
Ex.

Instead of:

    M~{~&lt;K,V&gt;}~

The format is now:

    ~{~&lt;K,V&gt;|M}~

This also removes a shift/reduce warning.

The changes in core_pp now requires compiler-5.0 to compile
because of is_map/1 guard, i.e. a need for a compiler with Maps know-how.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ex.

Instead of:

    M~{~&lt;K,V&gt;}~

The format is now:

    ~{~&lt;K,V&gt;|M}~

This also removes a shift/reduce warning.

The changes in core_pp now requires compiler-5.0 to compile
because of is_map/1 guard, i.e. a need for a compiler with Maps know-how.
</pre>
</div>
</content>
</entry>
<entry>
<title>Do not try to optimize non-boolean guards</title>
<updated>2014-03-05T09:18:15+00:00</updated>
<author>
<name>Anthony Ramine</name>
<email>n.oxyde@gmail.com</email>
</author>
<published>2014-03-01T16:26:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=926be4d0a3a75f48bc280a7aa2f97fc4adbef189'/>
<id>926be4d0a3a75f48bc280a7aa2f97fc4adbef189</id>
<content type='text'>
Expressions such as erlang:'or'(bar, true) can make beam_bool crash if it tries
to optimize them, as this code is not quite really written by users, no attempt
to rewrite them more efficiently should be done, for simplicity's sake.

Reported-by: Ulf Norell
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Expressions such as erlang:'or'(bar, true) can make beam_bool crash if it tries
to optimize them, as this code is not quite really written by users, no attempt
to rewrite them more efficiently should be done, for simplicity's sake.

Reported-by: Ulf Norell
</pre>
</div>
</content>
</entry>
<entry>
<title>Teach sys_core_fold:eval_case/2 to cope with handwritten Core Erlang</title>
<updated>2014-02-11T09:09:46+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2014-02-11T07:31:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=c89ada7517420ce9065840ea857a0009418ce2af'/>
<id>c89ada7517420ce9065840ea857a0009418ce2af</id>
<content type='text'>
Starting in e12b7d5331c58b41db06cadfa4af75b78b62a2b1,
sys_core_fold:eval_case/2 will crash on handwritten but legal
Core Erlang programs such as:

   case let &lt;Var&gt; = Arg in {'x',Var} of
      {x,X} -&gt; X
   end

The problem is that the only clause *is* guaranteed to match, but
cerl_clauses:match_list/2 does not understand that; all it can say is
that the clause *may* match. In those circumstances, we will need to
keep the case.

Also make sure that we keep the case if the guard is something else
than 'true'. That is not strictly necessary, because in a legal Core
Erlang program the guard in the last clause in a case must always
evaluate to 'true', so removing the guard test would still leave the
program correct. Keeping the guard, however, will make it somewhat
easier to debug an incorrect Core Erlang program. (The unsafe_case
test case has guard test in the only clause in a case, so we don't
need to write a new test case to test that.)

Reported-by: Anthony Ramine
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Starting in e12b7d5331c58b41db06cadfa4af75b78b62a2b1,
sys_core_fold:eval_case/2 will crash on handwritten but legal
Core Erlang programs such as:

   case let &lt;Var&gt; = Arg in {'x',Var} of
      {x,X} -&gt; X
   end

The problem is that the only clause *is* guaranteed to match, but
cerl_clauses:match_list/2 does not understand that; all it can say is
that the clause *may* match. In those circumstances, we will need to
keep the case.

Also make sure that we keep the case if the guard is something else
than 'true'. That is not strictly necessary, because in a legal Core
Erlang program the guard in the last clause in a case must always
evaluate to 'true', so removing the guard test would still leave the
program correct. Keeping the guard, however, will make it somewhat
easier to debug an incorrect Core Erlang program. (The unsafe_case
test case has guard test in the only clause in a case, so we don't
need to write a new test case to test that.)

Reported-by: Anthony Ramine
</pre>
</div>
</content>
</entry>
<entry>
<title>compiler: Add core compile test for maps</title>
<updated>2014-01-29T10:08:51+00:00</updated>
<author>
<name>Björn-Egil Dahlberg</name>
<email>egil@erlang.org</email>
</author>
<published>2014-01-28T13:46:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=cf5bc2e917dbcb2c2841bf07b995efe105bea4be'/>
<id>cf5bc2e917dbcb2c2841bf07b995efe105bea4be</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: Handle sequences in guards</title>
<updated>2012-01-11T07:39:57+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2012-01-04T15:40:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=823f47c8cf3c7a4f32401cae5a2e47916d3593e4'/>
<id>823f47c8cf3c7a4f32401cae5a2e47916d3593e4</id>
<content type='text'>
A guard with a sequence will cause a crash in v3_codegen. Currently,
it seems that a sequence in a guard will never happen when compiling
from Erlang code, but there are several reasons to fix this problem
anyway:

* There are other compilers that generate Core Erlang code.

* Changes to sys_core_fold (perhaps additional optimizations) may
  cause sequences to be generated in guards.

* A previously uncovered line in sys_core_fold:opt_guard_try/1 will
  now be covered.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A guard with a sequence will cause a crash in v3_codegen. Currently,
it seems that a sequence in a guard will never happen when compiling
from Erlang code, but there are several reasons to fix this problem
anyway:

* There are other compilers that generate Core Erlang code.

* Changes to sys_core_fold (perhaps additional optimizations) may
  cause sequences to be generated in guards.

* A previously uncovered line in sys_core_fold:opt_guard_try/1 will
  now be covered.
</pre>
</div>
</content>
</entry>
<entry>
<title>Cover v3_kernel:get_line/1</title>
<updated>2012-01-04T15:14:20+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2012-01-04T14:35:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=3121dce526d1bc1b993a7e7571a2d93d878407de'/>
<id>3121dce526d1bc1b993a7e7571a2d93d878407de</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>core_SUITE: Cover the nomatch_shadow warning in v3_kernel</title>
<updated>2012-01-04T15:14:19+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2012-01-04T14:33:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=2b18969e4835a79dc79f69025b77b5111263a924'/>
<id>2b18969e4835a79dc79f69025b77b5111263a924</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>core_SUITE: Cover v3_kernel:build_match/2</title>
<updated>2012-01-04T15:14:19+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2012-01-04T14:30:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=eea9dc51efcaceb1379caa288443aebb274ba87b'/>
<id>eea9dc51efcaceb1379caa288443aebb274ba87b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
