aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/doc/src/notes.xml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compiler/doc/src/notes.xml')
-rw-r--r--lib/compiler/doc/src/notes.xml266
1 files changed, 266 insertions, 0 deletions
diff --git a/lib/compiler/doc/src/notes.xml b/lib/compiler/doc/src/notes.xml
index 7addadf82c..f11444137d 100644
--- a/lib/compiler/doc/src/notes.xml
+++ b/lib/compiler/doc/src/notes.xml
@@ -32,6 +32,272 @@
<p>This document describes the changes made to the Compiler
application.</p>
+<section><title>Compiler 7.4.4</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>Fixed a compiler crash introduced in <c>22.0.6</c>
+ (OTP-15952).</p>
+ <p>
+ Own Id: OTP-15953 Aux Id: ERL-999 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Compiler 7.4.3</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>Fixed an unsafe optimization when matching
+ <c>tuple_size/1</c> outside of guards, which could crash
+ the emulator if the argument was not a tuple.</p>
+ <p>
+ Own Id: OTP-15945</p>
+ </item>
+ <item>
+ <p>Fixed a rare bug that could cause the wrong kind of
+ exception to be thrown when a BIF failed in a function
+ that matched bitstrings.</p>
+ <p>
+ Own Id: OTP-15946</p>
+ </item>
+ <item>
+ <p>Fixed a bug where receive statements inside try/catch
+ blocks could return incorrect results.</p>
+ <p>
+ Own Id: OTP-15952</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Compiler 7.4.2</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>Fixed an incorrect type determination for constructed
+ binaries, which could cause <c>is_binary</c> checks to
+ succeed when they shouldn't have.</p>
+ <p>
+ Own Id: OTP-15872</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Compiler 7.4.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>The type optimization pass of the compiler could hang
+ or loop for a long time when analyzing a
+ <c>setelement/3</c> call with a varible position.</p>
+ <p>
+ Own Id: OTP-15828 Aux Id: ERL-948 </p>
+ </item>
+ <item>
+ <p>Certain complex receive statements would result in an
+ internal compiler failure.</p>
+ <p>
+ Own Id: OTP-15832 Aux Id: ERL-950 </p>
+ </item>
+ <item>
+ <p>Fixed an unsafe type optimization.</p>
+ <p>
+ Own Id: OTP-15838</p>
+ </item>
+ <item>
+ <p>Fixed a crash when optimizing compiler-generated
+ exceptions (like badmatch) whose offending term was a
+ constructed binary.</p>
+ <p>
+ Own Id: OTP-15839 Aux Id: ERL-954 </p>
+ </item>
+ <item>
+ <p>Fixed a bad optimization related to the <c>++/2</c>
+ operator, where the compiler assumed that it always
+ produced a list (<c>[] ++ RHS</c> returns <c>RHS</c>
+ verbatim, even if it's not a list).</p>
+ <p>
+ Own Id: OTP-15841</p>
+ </item>
+ <item>
+ <p>An <c>is_binary/1</c> test followed by
+ <c>is_bitstring/1</c> (or vice versa) could fail because
+ of an usafe optimization.</p>
+ <p>
+ Own Id: OTP-15845</p>
+ </item>
+ <item>
+ <p>A Core Erlang module where the last clause in a
+ <c>case</c> matched a map would fail to load.</p>
+ <p>
+ Own Id: OTP-15846 Aux Id: ERL-955 </p>
+ </item>
+ <item>
+ <p>Fixed a bug that could cause the compiler to crash
+ when compiling complex nested case expressions.</p>
+ <p>
+ Own Id: OTP-15848 Aux Id: ERL-956 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Compiler 7.4</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p><c>record_info/2</c> is a pseudo-function that
+ requires literal arguments known at compile time.
+ Therefore, the following usage is illegal: <c>fun
+ record/info/2</c>. The compiler would crash when during
+ compilation of that kind of code. Corrected to issue a
+ compilation error.</p>
+ <p>
+ Own Id: OTP-15760 Aux Id: ERL-907 </p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ The compiler has been rewritten to internally use an
+ intermediate representation based on Static Single
+ Assignment (SSA). The new intermediate representation
+ makes more optimizations possible.</p>
+ <p>
+ Most noticeable is that the binary matching optimizations
+ are now applicable in many more circumstances than
+ before.</p>
+ <p>
+ Another noticeable change is that type optimizations are
+ now applied across local function calls, and will remove
+ a lot more redundant type tests than before.</p>
+ <p>
+ Own Id: OTP-14894 Aux Id: ERL-714 </p>
+ </item>
+ <item>
+ <p>Funs are no longer created when they are only used
+ locally, greatly improving the performance of named funs
+ and "fun-wrapped" macros.</p>
+ <p>
+ Own Id: OTP-15273 Aux Id: ERL-639 </p>
+ </item>
+ <item>
+ <p>All compiler options that can be given in the source
+ file can now also be given in the option list or from the
+ command line for <c>erlc</c>.</p>
+ <p>Specifically, the option
+ <c>{nowarn_deprecated_function,MFAs}</c> was only
+ recognized when given in the file with the attribute
+ <c>-compile()</c>. The option
+ <c>{nowarn_unused_function,FAs}</c> was incorrectly
+ documented to only work in a file, but it also worked
+ when given in the option list.</p>
+ <p>
+ Own Id: OTP-15456</p>
+ </item>
+ <item>
+ <p> Do not allow function specifications for functions
+ residing in other modules. </p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-15563 Aux Id: ERL-845, OTP-15562 </p>
+ </item>
+ <item>
+ <p>Internal documentation has now been added to the
+ <em>Erts</em> and <em>Compiler</em> applications.</p>
+ <p>The internal documents for <em>Erts</em> describe
+ miscellaneous interesting implementation details. Those
+ details can change at any time.</p>
+ <p>The internal documentation for <em>Compiler</em>
+ documents the API for the Core Erlang modules. While we
+ will not change those APIs without good reason, we don't
+ give the same guarantees about backward compatibility as
+ for the rest of the APIs in OTP.</p>
+ <p>
+ Own Id: OTP-15715</p>
+ </item>
+ <item>
+ <p> There are new compiler options <c>nowarn_removed</c>
+ and <c>{nowarn_removed,Items}</c> to suppress warnings
+ for functions and modules that have been removed from
+ OTP.</p>
+ <p>
+ Own Id: OTP-15749 Aux Id: ERL-904 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Compiler 7.3.2</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>An expression such as <c>(A / B) band 16#ff</c> would
+ crash the compiler.</p>
+ <p>
+ Own Id: OTP-15518 Aux Id: ERL-829 </p>
+ </item>
+ <item>
+ <p>There could be an incorrect warning when the
+ <c>tuple_calls</c> option was given. The generated code
+ would be correct. Here is an example of code that would
+ trigger the warning:</p>
+ <p><c>(list_to_atom("prefix_" ++
+ atom_to_list(suffix))):doit(X)</c>.</p>
+ <p>
+ Own Id: OTP-15552 Aux Id: ERL-838 </p>
+ </item>
+ <item>
+ <p>Optimize (again) Dialyzer's handling of
+ left-associative use of <c>andalso</c> and <c>orelse</c>
+ in guards.</p>
+ <p>
+ Own Id: OTP-15577 Aux Id: ERL-851, PR-2141, PR-1944 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Compiler 7.3.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>An optimization that avoided allocation of a stack
+ frame for some <c>case</c> expressions was introduced in
+ OTP 21. (ERL-504/OTP-14808) It turns out that in rare
+ circumstances, this optimization is not safe. Therefore,
+ this optimization has been disabled.</p>
+ <p>A similar optimization will be included in OTP 22 in a
+ safe way.</p>
+ <p>
+ Own Id: OTP-15501 Aux Id: ERL-807, ERL-514, OTP-14808 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Compiler 7.3</title>
<section><title>Fixed Bugs and Malfunctions</title>