<feed xmlns='http://www.w3.org/2005/Atom'>
<title>otp.git/lib/compiler/test, branch OTP_R14B04</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 'hl/beam_disasm-no_attri_chunk' into dev</title>
<updated>2011-09-22T15:01:35+00:00</updated>
<author>
<name>Henrik Nord</name>
<email>henrik@erlang.org</email>
</author>
<published>2011-09-22T15:01:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=7c11b3f7a00a18fb11918a57ee1d6597ced97a07'/>
<id>7c11b3f7a00a18fb11918a57ee1d6597ced97a07</id>
<content type='text'>
* hl/beam_disasm-no_attri_chunk:
  beam_disasm: Handle stripped BEAM files

OTP-9571
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* hl/beam_disasm-no_attri_chunk:
  beam_disasm: Handle stripped BEAM files

OTP-9571
</pre>
</div>
</content>
</entry>
<entry>
<title>beam_disasm: Handle stripped BEAM files</title>
<updated>2011-09-21T10:19:48+00:00</updated>
<author>
<name>Haitao Li</name>
<email>lihaitao@gmail.com</email>
</author>
<published>2011-07-22T09:14:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=347dfb022195994a368ff12f8d009b7263044f50'/>
<id>347dfb022195994a368ff12f8d009b7263044f50</id>
<content type='text'>
beam_disasm:file/1 would crash if asked to disassemble a stripped
BEAM file without an "Attr" chunk.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
beam_disasm:file/1 would crash if asked to disassemble a stripped
BEAM file without an "Attr" chunk.
</pre>
</div>
</content>
</entry>
<entry>
<title>Do not write beam file if Werr and warnings /= []</title>
<updated>2011-09-08T12:02:16+00:00</updated>
<author>
<name>Tuncer Ayaz</name>
<email>tuncer.ayaz@gmail.com</email>
</author>
<published>2011-06-01T19:38:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=3d28c22f0c05955216b743148cfd4c656e4c1e4a'/>
<id>3d28c22f0c05955216b743148cfd4c656e4c1e4a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bs_match_SUITE: Improve coverage of beam_bsm</title>
<updated>2011-04-12T03:54:47+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2011-04-09T06:27:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=a86d00316ef882310fa222e0a2ac76dd8c1ab275'/>
<id>a86d00316ef882310fa222e0a2ac76dd8c1ab275</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>match_SUITE: Cover a clause in beam_dead:forward/4</title>
<updated>2011-04-12T03:54:47+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2011-04-11T12:55:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=2c67e91d20daf46e4ffff91b10208768d97e8ec8'/>
<id>2c67e91d20daf46e4ffff91b10208768d97e8ec8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>record_SUITE: Cover optimization of is_record/3 in beam_type</title>
<updated>2011-04-12T03:52:25+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2011-04-06T11:32:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=3235b9e006298750a9239de0139545018597befd'/>
<id>3235b9e006298750a9239de0139545018597befd</id>
<content type='text'>
Since the introduction of improved record optimizations in
1858cb81391d2bce29b4b7620574ca60128cebf7 and
470c91d43eae54f63661645acbce4b92d73287cc, the optimization of
a is_record/3 call with a known correct type in
beam_type:simplify_basic_1/3 has not been covered.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since the introduction of improved record optimizations in
1858cb81391d2bce29b4b7620574ca60128cebf7 and
470c91d43eae54f63661645acbce4b92d73287cc, the optimization of
a is_record/3 call with a known correct type in
beam_type:simplify_basic_1/3 has not been covered.
</pre>
</div>
</content>
</entry>
<entry>
<title>compiler tests: Reinstate ?MODULE macro in calls to test_lib:recompile/1</title>
<updated>2011-04-12T03:52:24+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2011-04-06T12:56:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=236b6e32118bfc064f88bebf9945080ed8ea9eb4'/>
<id>236b6e32118bfc064f88bebf9945080ed8ea9eb4</id>
<content type='text'>
In 3d0f4a3085f11389e5b22d10f96f0cbf08c9337f (an update to conform
with common_test), in all test_lib:recompile(?MODULE) calls, ?MODULE
was changed to the actual name of the module. That would cause
test_lib:recompile/1 to compile the module with the incorrect
compiler options in cloned modules such as record_no_opt_SUITE,
causing worse coverage.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In 3d0f4a3085f11389e5b22d10f96f0cbf08c9337f (an update to conform
with common_test), in all test_lib:recompile(?MODULE) calls, ?MODULE
was changed to the actual name of the module. That would cause
test_lib:recompile/1 to compile the module with the incorrect
compiler options in cloned modules such as record_no_opt_SUITE,
causing worse coverage.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'hw/call-chmod-without-f' into dev</title>
<updated>2011-03-30T15:35:10+00:00</updated>
<author>
<name>Henrik Nord</name>
<email>henrik@erlang.org</email>
</author>
<published>2011-03-30T15:28:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=033469177c0337ce0dfde3a5a6478179389ba8c0'/>
<id>033469177c0337ce0dfde3a5a6478179389ba8c0</id>
<content type='text'>
* hw/call-chmod-without-f:
  Call chmod without the "-f" flag

Conflicts:
	erts/emulator/test/Makefile
	lib/asn1/test/Makefile
	lib/crypto/test/Makefile
	lib/debugger/test/Makefile
	lib/docbuilder/test/Makefile
	lib/edoc/test/Makefile
	lib/erl_interface/test/Makefile
	lib/inviso/test/Makefile
	lib/parsetools/test/Makefile
	lib/percept/test/Makefile
	lib/ssl/test/Makefile
	lib/syntax_tools/test/Makefile
	lib/test_server/test/Makefile
	lib/tools/test/Makefile

OTP-9170
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* hw/call-chmod-without-f:
  Call chmod without the "-f" flag

Conflicts:
	erts/emulator/test/Makefile
	lib/asn1/test/Makefile
	lib/crypto/test/Makefile
	lib/debugger/test/Makefile
	lib/docbuilder/test/Makefile
	lib/edoc/test/Makefile
	lib/erl_interface/test/Makefile
	lib/inviso/test/Makefile
	lib/parsetools/test/Makefile
	lib/percept/test/Makefile
	lib/ssl/test/Makefile
	lib/syntax_tools/test/Makefile
	lib/test_server/test/Makefile
	lib/tools/test/Makefile

OTP-9170
</pre>
</div>
</content>
</entry>
<entry>
<title>sys_core_fold: Eliminate incorrect warning</title>
<updated>2011-03-25T10:02:11+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2011-03-15T06:55:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=c6b0d6dce5709c61e549e850c2615fd288e27ba9'/>
<id>c6b0d6dce5709c61e549e850c2615fd288e27ba9</id>
<content type='text'>
The compiler (sys_core_fold) tries to avoid constructing tuples
in case expressions. The following code:

c(A, B) -&gt;
     case {A,B} of
         {ok,X} -&gt; X;
         {_,_} -&gt; error
     end.

will be rewritten so that no tuple is built. If a clause
requires a tuple to be built as in this code:

c(A, B) -&gt;
     case {A,B} of
         {ok,X} -&gt; X;
         V -&gt; V    %The tuple will be built here
     end.

the tuple will be built in the clause(s) in which it is needed.

If the value returned from the case is not used as in this code:

c(A, B) -&gt;
    case {A,B} of
	V -&gt; V     %Warning: a term is constructed, but never used
    end,
    ok.

there will be an incorrect warning. Basically, what happens is
that the code is reduced to:

c(A, B) -&gt;
    {A,B},         %Warning: a term is constructed, but never used
    ok.

and the optimizer sees that the {A,B} tuple can't possibly be used.

Eliminate the warning by adding a 'compiler_generated' annotation
to the tuple.

Reported-by: Kostis Sagonas
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The compiler (sys_core_fold) tries to avoid constructing tuples
in case expressions. The following code:

c(A, B) -&gt;
     case {A,B} of
         {ok,X} -&gt; X;
         {_,_} -&gt; error
     end.

will be rewritten so that no tuple is built. If a clause
requires a tuple to be built as in this code:

c(A, B) -&gt;
     case {A,B} of
         {ok,X} -&gt; X;
         V -&gt; V    %The tuple will be built here
     end.

the tuple will be built in the clause(s) in which it is needed.

If the value returned from the case is not used as in this code:

c(A, B) -&gt;
    case {A,B} of
	V -&gt; V     %Warning: a term is constructed, but never used
    end,
    ok.

there will be an incorrect warning. Basically, what happens is
that the code is reduced to:

c(A, B) -&gt;
    {A,B},         %Warning: a term is constructed, but never used
    ok.

and the optimizer sees that the {A,B} tuple can't possibly be used.

Eliminate the warning by adding a 'compiler_generated' annotation
to the tuple.

Reported-by: Kostis Sagonas
</pre>
</div>
</content>
</entry>
<entry>
<title>v3_core: Fix variable incorrectly unbound after binary match</title>
<updated>2011-03-23T10:07:52+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2011-03-14T14:15:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=c7188f410f5d2688783dfbb850e1e55718885f87'/>
<id>c7188f410f5d2688783dfbb850e1e55718885f87</id>
<content type='text'>
In the following code:

m(&lt;&lt;Sz:8,_:Sz/binary&gt;&gt;) -&gt;
    Sz = wrong.

the Sz variable is supposed to be bound in the function header and the
matching "Sz = wrong" should cause a badarg exception.  But what
happens is that the Sz variables seems to be unbound and the matching
succeds and the m/1 function returns 'wrong'.

If the Sz variable is used directly (not matched), it will have
the expected value. Thus the following code:

m(&lt;&lt;Sz:8,_:Sz/binary&gt;&gt;) -&gt;
    Sz.

will correctly return the value of Sz that was matched out from
the binary.

Reported-by: Bernard Duggan
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the following code:

m(&lt;&lt;Sz:8,_:Sz/binary&gt;&gt;) -&gt;
    Sz = wrong.

the Sz variable is supposed to be bound in the function header and the
matching "Sz = wrong" should cause a badarg exception.  But what
happens is that the Sz variables seems to be unbound and the matching
succeds and the m/1 function returns 'wrong'.

If the Sz variable is used directly (not matched), it will have
the expected value. Thus the following code:

m(&lt;&lt;Sz:8,_:Sz/binary&gt;&gt;) -&gt;
    Sz.

will correctly return the value of Sz that was matched out from
the binary.

Reported-by: Bernard Duggan
</pre>
</div>
</content>
</entry>
</feed>
