diff options
author | Erlang/OTP <[email protected]> | 2018-04-30 10:06:42 +0200 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2018-04-30 10:06:42 +0200 |
commit | 202bb737e3deabfebee683266f4b7c42781eb521 (patch) | |
tree | e8058b1f3549dc7436bce2e6f5dfe70176fee4d4 /lib/compiler/doc | |
parent | 345f7f527a4c26ef49cef0d81e2c8b71bf01ebc3 (diff) | |
download | otp-202bb737e3deabfebee683266f4b7c42781eb521.tar.gz otp-202bb737e3deabfebee683266f4b7c42781eb521.tar.bz2 otp-202bb737e3deabfebee683266f4b7c42781eb521.zip |
Update release notes
Diffstat (limited to 'lib/compiler/doc')
-rw-r--r-- | lib/compiler/doc/src/notes.xml | 198 |
1 files changed, 198 insertions, 0 deletions
diff --git a/lib/compiler/doc/src/notes.xml b/lib/compiler/doc/src/notes.xml index bc1f68337b..9cb1fc1ba7 100644 --- a/lib/compiler/doc/src/notes.xml +++ b/lib/compiler/doc/src/notes.xml @@ -32,6 +32,204 @@ <p>This document describes the changes made to the Compiler application.</p> +<section><title>Compiler 7.2</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p>Fixed an error in an optimization pass that caused + impossible tuple matching.</p> + <p> + Own Id: OTP-14855 Aux Id: ERL-549 </p> + </item> + <item> + <p>The exception thrown when a list comprehension was + given a non-list term was not always correct.</p> + <p> + Own Id: OTP-14992 Aux Id: ERL-572 </p> + </item> + </list> + </section> + + + <section><title>Improvements and New Features</title> + <list> + <item> + <p>Changed the default behaviour of <c>.erlang</c> + loading: <c>.erlang</c> is no longer loaded from the + current directory. <c>c:erlangrc(PathList)</c> can be + used to search and load an <c>.erlang</c> file from user + specified directories.</p> <p><c>escript</c>, + <c>erlc</c>, <c>dialyzer</c> and <c>typer</c> no longer + load an <c>.erlang</c> at all.</p> + <p> + *** POTENTIAL INCOMPATIBILITY ***</p> + <p> + Own Id: OTP-14439</p> + </item> + <item> + <p>Support for "tuple calls" have been removed from the + run-time system. Tuple calls was an undocumented and + unsupported feature which allowed the module argument for + an apply operation to be a tuple: <c>Var = dict:new(), + Var:size()</c>. This "feature" frequently caused + confuses, especially when such call failed. The + stacktrace would point out functions that don't exist in + the source code.</p> + <p>For legacy code that need to use parameterized modules + or tuple calls for some other reason, there is a new + compiler option called <c>tuple_calls</c>. When this + option is given, the compiler will generate extra code + that emulates the old behavior for calls where the module + is a variable.</p> + <p> + *** POTENTIAL INCOMPATIBILITY ***</p> + <p> + Own Id: OTP-14497</p> + </item> + <item> + <p>In code such as <c>example({ok, Val}) -> {ok, + Val}.</c> a tuple would be built. The compiler will now + automatically rewrite the code to + <c>example({ok,Val}=Tuple) -> Tuple.</c> which will + reduce code size, execution time, and remove GC + pressure.</p> + <p> + Own Id: OTP-14505</p> + </item> + <item> + <p>The optimization of <c>case</c> expression where only + one of the case arms can execute successfully has been + improved.</p> + <p> + Own Id: OTP-14525</p> + </item> + <item> + <p>Some uses of binary matching has been slightly + improved, eliminating unnecessary register shuffling.</p> + <p> + Own Id: OTP-14594 Aux Id: ERL-444 </p> + </item> + <item> + <p>There is a new <c>{compile_info,Info}</c> option for + the compiler that allows BEAM-based languages such as + Elixir and LFE to add their own compiler versions.</p> + <p> + Own Id: OTP-14615 Aux Id: PR-1558 </p> + </item> + <item> + <p>Loaded BEAM code in a 64-bit system requires less + memory because of better packing of operands for + instructions.</p> + <p>These memory savings were achieved by major + improvements to the <c>beam_makeops</c> scripts used when + building the run time system and BEAM compiler. There is + also new for documentation for <c>beam_makeops</c> that + describes how new BEAM instructions and loader + transformations can be implemented. The documentation is + found in here in a source directory or git repository: + erts/emulator/internal_doc/beam_makeops.md. An online + version can be found here: + https://github.com/erlang/otp/blob/master/erts/emulator/internal_doc/beam_makeops.md</p> + <p> + Own Id: OTP-14626</p> + </item> + <item> + <p>Size calculations for binary constructions has been + somewhat optimized, producing smaller code.</p> + <p> + Own Id: OTP-14654</p> + </item> + <item> + <p>When the value returned from a '<c>catch</c>' + expression is ignored, no stacktrace will be built if an + exception is caught. That will save time and produce less + garbage. There are also some minor optimizations of + '<c>try</c>/<c>catch</c>' both in the compiler and + run-time system.</p> + <p> + Own Id: OTP-14683</p> + </item> + <item> + <p>There is a new syntax in '<c>try/catch</c>' for + retrieving the stacktrace without calling + '<c>erlang:get_stacktrace/0</c>'. See the reference + manual for a description of the new syntax. The + '<c>erlang:get_stacktrace/0</c>' BIF is now + deprecated.</p> + <p> + Own Id: OTP-14692</p> + </item> + <item> + <p>The following is an internal change in the compiler, + that is not noticeable for normal use of the compiler: + The module <c>v3_life</c> has been removed. Its + functionality has been simplified and integrated into + <c>v3_codegen</c>.</p> + <p> + Own Id: OTP-14712</p> + </item> + <item> + <p>The optimization of binary matching that delays + creation of sub binaries (see the Efficiency Guide) could + be thwarted by the argument order and could be necessary + to change the argument order. The compiler has now become + smarter and can handle any argument order.</p> + <p> + Own Id: OTP-14774</p> + </item> + <item> + <p>When the compiler was faced with complex case + expressions it would unnecessarily allocate stack + elements and shuffle data between x and y registers. + Improved code generation to only allocate a stack frame + when strictly necessary.</p> + <p> + Own Id: OTP-14808 Aux Id: ERL-514 </p> + </item> + <item> + <p>There is a new option '<c>makedep_side_effect</c>' for + the compiler and <c>-MMD</c> for '<c>erlc</c>' that + generates dependencies and continues to compile as + normal.</p> + <p> + Own Id: OTP-14830</p> + </item> + <item> + <p>When compiling modules with huge functions, the + compiler would generate a lot of atoms for its internal, + sometimes so many that the atom table would overflow. The + compiler has been rewritten to generate far less internal + atoms to avoid filling the atom table.</p> + <p> + Own Id: OTP-14968 Aux Id: ERL-563 </p> + </item> + <item> + <p>External funs with literal values for module, name, + and arity (e.g. <c>erlang:abs/1</c>) are now treated as + literals. That means more efficient code that produces + less garbage on the heap.</p> + <p> + Own Id: OTP-15003</p> + </item> + <item> + <p>The <c>map_get/2</c> guard BIF has been added. It + works the same way as <c>maps:get/2</c>, except that it + is allowed to use it in guards.</p> + <p> + Own Id: OTP-15037 Aux Id: PR-1784 </p> + </item> + <item> + <p>A call or apply of a literal external fun will be + replaced with a direct call.</p> + <p> + Own Id: OTP-15044 Aux Id: ERL-614 </p> + </item> + </list> + </section> + +</section> + <section><title>Compiler 7.1.5</title> <section><title>Fixed Bugs and Malfunctions</title> |