diff options
Diffstat (limited to 'lib/compiler/doc/src/notes.xml')
-rw-r--r-- | lib/compiler/doc/src/notes.xml | 246 |
1 files changed, 245 insertions, 1 deletions
diff --git a/lib/compiler/doc/src/notes.xml b/lib/compiler/doc/src/notes.xml index 740cbcf8eb..6d51074d4a 100644 --- a/lib/compiler/doc/src/notes.xml +++ b/lib/compiler/doc/src/notes.xml @@ -4,7 +4,7 @@ <chapter> <header> <copyright> - <year>2004</year><year>2011</year> + <year>2004</year><year>2012</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -31,6 +31,250 @@ <p>This document describes the changes made to the Compiler application.</p> +<section><title>Compiler 4.8.2</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + Modules with very many functions would compile very + slowly.</p> + <p> + Own Id: OTP-10123</p> + </item> + <item> + <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> + <p> + Own Id: OTP-10150</p> + </item> + <item> + <p> + A process which had enabled trap_exit would receive EXIT + messages after calling the compiler. (Thanks to Jeremy + Heater.)</p> + <p> + Own Id: OTP-10171</p> + </item> + <item> + <p> + Fix messages ordering with column numbers</p> + <p> + Own Id: OTP-10183</p> + </item> + <item> + <p> + sys_pre_expand: Fix BASE never being set</p> + <p> + Commit a612e99fb5aaa934fe5a8591db0f083d7fa0b20a turned + module attributes from 2-tuples to 3-tuples but forgot to + update get_base/1, breaking BASE for parametric modules.</p> + <p> + Own Id: OTP-10184</p> + </item> + <item> + <p> + The compiler will now issue a warning if literal tuple + funs are used. For example, {erlang,is_tuple}(X) will now + generate a warning.</p> + <p> + Own Id: OTP-10185</p> + </item> + <item> + <p> + The compiler will now warn for illegal sizes for segments + in binary construction. For example, + <<X:(2.5)>> will now cause the compiler to + issue a warning.</p> + <p> + Own Id: OTP-10197</p> + </item> + <item> + <p> + Fix the erlc -MP flag</p> + <p> + Because of a copy-and-paste error in erlc.c, the -MP flag + had the same effect as -MG. As a workaround, you had to + pass +makedep_phony to enable the MP option. This patch + makes -MP work as intended.</p> + <p> + Own Id: OTP-10211</p> + </item> + </list> + </section> + +</section> + +<section><title>Compiler 4.8.1</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + In rare circumstance, the compiler could crash when + compiling a case statement. (Thanks to Hakan Mattsson.)</p> + <p> + Own Id: OTP-9842</p> + </item> + <item> + <p>Calling a guard test (such as is_list/1) from the + top-level in a guard, would cause a compiler crash if + there was a local definition with the same name. + Corrected to reject the program with an error + message.</p> + <p> + Own Id: OTP-9866</p> + </item> + <item> + <p>Using <c>get/1</c> in a <c>try</c> block could in some + cases cause an internal compiler error. (Thanks to Eric + Merritt.)</p> + <p> + Own Id: OTP-9867</p> + </item> + <item> + <p> + An unexported on_load function would not get run if the + module was compiled with the <c>inline</c> option. + (Thanks to Yiannis Tsiouris.)</p> + <p> + Own Id: OTP-9910</p> + </item> + <item> + <p> + Fixed a discrepancy in compile_info</p> + <p> + The BEAM disassembler used the atom 'none' to signify the + absence of a compile_info chunk in a .beam file. This + clashed with the type declaration of the compile_info + field of a #beam_file{} record as containing a list. Now + [] signifies the absence of this chunk. This simplifies + the code and avoids a dialyzer warning.</p> + <p> + Own Id: OTP-9917</p> + </item> + <item> + <p> + Fix typo in `compile' doc: unmatched parenthesis (Thanks + to Ricardo Catalinas Jim�nez)</p> + <p> + Own Id: OTP-9919</p> + </item> + <item> + <p>In a <c>try</c>...<c>catch</c> statement that always + returned <c>false</c>, the compiler would remove calls to + BIFs that could not cause an exception (such as + <c>put/2</c>). Example of such code: <c>try put(K, V), + false catch _:_ -> false end.</c></p> + <p> + Own Id: OTP-9982</p> + </item> + </list> + </section> + +</section> + +<section><title>Compiler 4.8</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + Add '-callback' attributes in stdlib's behaviours</p> + <p> + Replace the behaviour_info(callbacks) export in stdlib's + behaviours with -callback' attributes for all the + callbacks. Update the documentation with information on + the callback attribute Automatically generate + 'behaviour_info' function from '-callback' attributes</p> + <p> + 'behaviour_info(callbacks)' is a special function that is + defined in a module which describes a behaviour and + returns a list of its callbacks.</p> + <p> + This function is now automatically generated using the + '-callback' specs. An error is returned by lint if user + defines both '-callback' attributes and the + behaviour_info/1 function. If no type info is needed for + a callback use a generic spec for it. Add '-callback' + attribute to language syntax</p> + <p> + Behaviours may define specs for their callbacks using the + familiar spec syntax, replacing the '-spec' keyword with + '-callback'. Simple lint checks are performed to ensure + that no callbacks are defined twice and all types + referred are declared.</p> + <p> + These attributes can be then used by tools to provide + documentation to the behaviour or find discrepancies in + the callback definitions in the callback module.</p> + <p> + Add callback specs into 'application' module in kernel + Add callback specs to tftp module following internet + documentation Add callback specs to inets_service module + following possibly deprecated comments</p> + <p> + Own Id: OTP-9621</p> + </item> + <item> + <p> + The calculation of the 'uniq' value for a fun (see + <c>erlang:fun_info/1</c>) was too weak and has been + strengthened. It used to be based on the only the code + for the fun body, but it is now based on the MD5 of the + BEAM code for the module.</p> + <p> + Own Id: OTP-9667</p> + </item> + </list> + </section> + + + <section><title>Improvements and New Features</title> + <list> + <item> + <p>Variables are now now allowed in '<c>fun M:F/A</c>' as + suggested by Richard O'Keefe in EEP-23.</p> + <p>The representation of '<c>fun M:F/A</c>' in the + abstract format has been changed in an incompatible way. + Tools that directly read or manipulate the abstract + format (such as parse transforms) may need to be updated. + The compiler can handle both the new and the old format + (i.e. extracting the abstract format from a pre-R15 BEAM + file and compiling it using compile:forms/1,2 will work). + The <c>syntax_tools</c> application can also handle both + formats.</p> + <p> + *** POTENTIAL INCOMPATIBILITY ***</p> + <p> + Own Id: OTP-9643</p> + </item> + <item> + <p> + <c>filename:find_src/1,2</c> will now work on stripped + BEAM files (reported by Per Hedeland). The HiPE compiler + will also work on stripped BEAM files. The BEAM compiler + will no longer include compilation options given in the + source code itself in <c>M:module_info(compile)</c> + (because those options will be applied anyway if the + module is re-compiled).</p> + <p> + Own Id: OTP-9752</p> + </item> + <item> + <p>Inlining binary matching could cause an internal + compiler error. (Thanks to Rene Kijewski for reporting + this bug.)</p> + <p> + Own Id: OTP-9770</p> + </item> + </list> + </section> + +</section> + <section><title>Compiler 4.7.5</title> <section><title>Fixed Bugs and Malfunctions</title> |