From 202bb737e3deabfebee683266f4b7c42781eb521 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Mon, 30 Apr 2018 10:06:42 +0200 Subject: Update release notes --- lib/compiler/doc/src/notes.xml | 198 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 198 insertions(+) (limited to 'lib/compiler') 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 @@

This document describes the changes made to the Compiler application.

+
Compiler 7.2 + +
Fixed Bugs and Malfunctions + + +

Fixed an error in an optimization pass that caused + impossible tuple matching.

+

+ Own Id: OTP-14855 Aux Id: ERL-549

+
+ +

The exception thrown when a list comprehension was + given a non-list term was not always correct.

+

+ Own Id: OTP-14992 Aux Id: ERL-572

+
+
+
+ + +
Improvements and New Features + + +

Changed the default behaviour of .erlang + loading: .erlang is no longer loaded from the + current directory. c:erlangrc(PathList) can be + used to search and load an .erlang file from user + specified directories.

escript, + erlc, dialyzer and typer no longer + load an .erlang at all.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14439

+
+ +

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: Var = dict:new(), + Var:size(). This "feature" frequently caused + confuses, especially when such call failed. The + stacktrace would point out functions that don't exist in + the source code.

+

For legacy code that need to use parameterized modules + or tuple calls for some other reason, there is a new + compiler option called tuple_calls. When this + option is given, the compiler will generate extra code + that emulates the old behavior for calls where the module + is a variable.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14497

+
+ +

In code such as example({ok, Val}) -> {ok, + Val}. a tuple would be built. The compiler will now + automatically rewrite the code to + example({ok,Val}=Tuple) -> Tuple. which will + reduce code size, execution time, and remove GC + pressure.

+

+ Own Id: OTP-14505

+
+ +

The optimization of case expression where only + one of the case arms can execute successfully has been + improved.

+

+ Own Id: OTP-14525

+
+ +

Some uses of binary matching has been slightly + improved, eliminating unnecessary register shuffling.

+

+ Own Id: OTP-14594 Aux Id: ERL-444

+
+ +

There is a new {compile_info,Info} option for + the compiler that allows BEAM-based languages such as + Elixir and LFE to add their own compiler versions.

+

+ Own Id: OTP-14615 Aux Id: PR-1558

+
+ +

Loaded BEAM code in a 64-bit system requires less + memory because of better packing of operands for + instructions.

+

These memory savings were achieved by major + improvements to the beam_makeops scripts used when + building the run time system and BEAM compiler. There is + also new for documentation for beam_makeops 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

+

+ Own Id: OTP-14626

+
+ +

Size calculations for binary constructions has been + somewhat optimized, producing smaller code.

+

+ Own Id: OTP-14654

+
+ +

When the value returned from a 'catch' + 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 + 'try/catch' both in the compiler and + run-time system.

+

+ Own Id: OTP-14683

+
+ +

There is a new syntax in 'try/catch' for + retrieving the stacktrace without calling + 'erlang:get_stacktrace/0'. See the reference + manual for a description of the new syntax. The + 'erlang:get_stacktrace/0' BIF is now + deprecated.

+

+ Own Id: OTP-14692

+
+ +

The following is an internal change in the compiler, + that is not noticeable for normal use of the compiler: + The module v3_life has been removed. Its + functionality has been simplified and integrated into + v3_codegen.

+

+ Own Id: OTP-14712

+
+ +

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.

+

+ Own Id: OTP-14774

+
+ +

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.

+

+ Own Id: OTP-14808 Aux Id: ERL-514

+
+ +

There is a new option 'makedep_side_effect' for + the compiler and -MMD for 'erlc' that + generates dependencies and continues to compile as + normal.

+

+ Own Id: OTP-14830

+
+ +

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.

+

+ Own Id: OTP-14968 Aux Id: ERL-563

+
+ +

External funs with literal values for module, name, + and arity (e.g. erlang:abs/1) are now treated as + literals. That means more efficient code that produces + less garbage on the heap.

+

+ Own Id: OTP-15003

+
+ +

The map_get/2 guard BIF has been added. It + works the same way as maps:get/2, except that it + is allowed to use it in guards.

+

+ Own Id: OTP-15037 Aux Id: PR-1784

+
+ +

A call or apply of a literal external fun will be + replaced with a direct call.

+

+ Own Id: OTP-15044 Aux Id: ERL-614

+
+
+
+ +
+
Compiler 7.1.5
Fixed Bugs and Malfunctions -- cgit v1.2.3