diff options
Diffstat (limited to 'lib/compiler/doc/src')
-rw-r--r-- | lib/compiler/doc/src/compile.xml | 30 | ||||
-rw-r--r-- | lib/compiler/doc/src/notes.xml | 248 |
2 files changed, 273 insertions, 5 deletions
diff --git a/lib/compiler/doc/src/compile.xml b/lib/compiler/doc/src/compile.xml index 27d750f929..f1238f27a6 100644 --- a/lib/compiler/doc/src/compile.xml +++ b/lib/compiler/doc/src/compile.xml @@ -816,6 +816,32 @@ pi() -> 3.1416. </section> <section> + <title>Inlining of list functions</title> + <p>The compiler can also inline a variety of list manipulation functions + from the stdlib's lists module.</p> + + <p>This feature must be explicitly enabled with a compiler option or a + <c>-compile()</c> attribute in the source module.</p> + + <p>To enable inlining of list functions, use the <c>inline_list_funcs</c> + option.</p> + + <p>The following functions are inlined:</p> + <list type="bulleted"> + <item><seealso marker="stdlib:lists#all/2">lists:all/2</seealso></item> + <item><seealso marker="stdlib:lists#any/2">lists:any/2</seealso></item> + <item><seealso marker="stdlib:lists#foreach/2">lists:foreach/2</seealso></item> + <item><seealso marker="stdlib:lists#map/2">lists:map/2</seealso></item> + <item><seealso marker="stdlib:lists#flatmap/2">lists:flatmap/2</seealso></item> + <item><seealso marker="stdlib:lists#filter/2">lists:filter/2</seealso></item> + <item><seealso marker="stdlib:lists#foldl/3">lists:foldl/3</seealso></item> + <item><seealso marker="stdlib:lists#foldr/3">lists:foldr/3</seealso></item> + <item><seealso marker="stdlib:lists#mapfoldl/3">lists:mapfoldl/3</seealso></item> + <item><seealso marker="stdlib:lists#mapfoldr/3">lists:mapfoldr/3</seealso></item> + </list> + </section> + + <section> <title>Parse Transformations</title> <p>Parse transformations are used when a programmer wants to use @@ -833,6 +859,10 @@ pi() -> 3.1416. {ErrorLine, Module, ErrorDescriptor} </code> + <p><c>ErrorLine</c> will be the atom <c>none</c> if the error does + not correspond to a specific line (e.g. if the source file does + not exist).</p> + <p>A string describing the error is obtained with the following call:</p> <code> diff --git a/lib/compiler/doc/src/notes.xml b/lib/compiler/doc/src/notes.xml index 6d51074d4a..cb39b28d3d 100644 --- a/lib/compiler/doc/src/notes.xml +++ b/lib/compiler/doc/src/notes.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE chapter SYSTEM "chapter.dtd"> <chapter> <header> <copyright> - <year>2004</year><year>2012</year> + <year>2004</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -31,6 +31,244 @@ <p>This document describes the changes made to the Compiler application.</p> +<section><title>Compiler 4.9.4</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + Typo fix ambigous -> ambiguous. Thanks to Leo Correa.</p> + <p> + Own Id: OTP-11455</p> + </item> + </list> + </section> + + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> + Lift 'after' blocks to zeroary functions. Thanks to + Anthony Ramine.</p> + <p> + Own Id: OTP-11267</p> + </item> + </list> + </section> + +</section> + +<section><title>Compiler 4.9.3</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + Expressions such as <c>'B = is_integer(V), if B and B + -> ok end'</c> would crash the compiler.</p> + <p> + Own Id: OTP-11240</p> + </item> + <item> + <p> + <c>compile:file2/2</c> with the option + <c>report_errors</c> could return ErrorInfo tuples with + only two elements, while the documentation says that the + ErrorInfo tuple always has three elements. Also updated + the documentation to add that the first element may be + '<c>none</c>' if no line number is applicable.</p> + <p> + Own Id: OTP-11304 Aux Id: seq12412 </p> + </item> + </list> + </section> + + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> + Fix matching of floating point middle-endian machines. + Thanks to Johannes Weissl.</p> + <p> + Own Id: OTP-11201</p> + </item> + <item> + <p> + Restrict inlining of local fun references. Thanks to + Anthony Ramine.</p> + <p> + Own Id: OTP-11211</p> + </item> + <item> + <p> + Silence a misleading warning with some comprehensions. + Thanks to Anthony Ramine.</p> + <p> + Own Id: OTP-11212</p> + </item> + <item> + <p> + Forbid returning a match context in beam_validator. + Thanks to Anthony Ramine.</p> + <p> + Own Id: OTP-11247</p> + </item> + </list> + </section> + +</section> + +<section><title>Compiler 4.9.2</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + Compiling functions with complex boolean operations in + guards could be very slow. (Thanks to Magnus Muller for + reporting this issue.)</p> + <p> + Own Id: OTP-10939</p> + </item> + <item> + <p> + Certain guard expressions used in a receive statement + could cause the compiler to crash.</p> + <p> + Own Id: OTP-11119 Aux Id: seq12342 </p> + </item> + </list> + </section> + + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> + Fix optimization of some binary comprehensions. Thanks to + Anthony Ramine.</p> + <p> + Own Id: OTP-11005</p> + </item> + <item> + <p> + Use a set to store ref registers in beam_receive. Thanks + to Anthony Ramine.</p> + <p> + Own Id: OTP-11069</p> + </item> + <item> + <p> + Fix renaming of bs_put_string instructions. Thanks to + Anthony Ramine.</p> + <p> + Own Id: OTP-11129</p> + </item> + </list> + </section> + +</section> + +<section><title>Compiler 4.9.1</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + The compiler would crash attempting to compile + expressions such as "element(2, not_tuple)".</p> + <p> + Own Id: OTP-10794</p> + </item> + <item> + <p> + Forbid multiple values in Core Erlang sequence arguments. + Thanks to José Valim and Anthony Ramine.</p> + <p> + Own Id: OTP-10818</p> + </item> + <item> + <p> + An unsafe optimization would cause the compiler to crash + with an internal error for certain complex code + sequences.</p> + <p> + Own Id: OTP-10825 Aux Id: seq12247 </p> + </item> + </list> + </section> + + + <section><title>Improvements and New Features</title> + <list> + <item> + <p>Integers in expression that will give a floating point + result (such as "<c>X / 2</c>" will now be converted to + floating point at compile-time. (Suggested by Richard + O'Keefe.)</p> + <p>Identical floating points constans in a module will + now be coalesced to one entry in the constant pool.</p> + <p> + Own Id: OTP-10788</p> + </item> + </list> + </section> + +</section> + +<section><title>Compiler 4.9</title> + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> + The compiler optimizations have been polished, so that + the code quality will be slightly better in some cases.</p> + <p> + Own Id: OTP-10193</p> + </item> + <item> + <p> Support for Unicode has been implemented. </p> + <p> + Own Id: OTP-10302</p> + </item> + <item> + <p>Where necessary a comment stating encoding has been + added to Erlang files. The comment is meant to be removed + in Erlang/OTP R17B when UTF-8 becomes the default + encoding. </p> + <p> + Own Id: OTP-10630</p> + </item> + <item> + <p> + Fix some wrong warnings triggered by the option + inline_list_funcs. Thanks to Anthony Ramine.</p> + <p> + Own Id: OTP-10690</p> + </item> + <item> + <p> + Forbid local fun variables in Core Erlang guards. Thanks + to Anthony Ramine.</p> + <p> + Own Id: OTP-10706</p> + </item> + <item> + <p> + Binary syntax matches could cause an internal consistency + error in in the compiler. (Thanks to Viktor Sovietov for + reporting this bug.)</p> + <p> + Own Id: OTP-10724</p> + </item> + </list> + </section> + +</section> + <section><title>Compiler 4.8.2</title> <section><title>Fixed Bugs and Malfunctions</title> @@ -46,7 +284,7 @@ <p> <c>compile:forms/2</c> will now use a {source,SourceFilePath} to set the source returned by - <c>module_info(compile)</c> (Thanks to Jos� Valim)</p> + <c>module_info(compile)</c> (Thanks to José Valim)</p> <p> Own Id: OTP-10150</p> </item> @@ -158,7 +396,7 @@ <item> <p> Fix typo in `compile' doc: unmatched parenthesis (Thanks - to Ricardo Catalinas Jim�nez)</p> + to Ricardo Catalinas Jiménez)</p> <p> Own Id: OTP-9919</p> </item> @@ -659,7 +897,7 @@ (Thanks to Paul Fisher.)</p> <p>Using filter expressions containing <c>andalso</c> or <c>orelse</c> in a list comprehension could cause a - compiler crash. (Thanks to Martin Engstr�m.)</p> + compiler crash. (Thanks to Martin Engström.)</p> <p> Own Id: OTP-8054</p> </item> |