From e35e6a94e57a651e4837c2391d5b1d3ac57c978b Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Thu, 14 Jul 2016 11:22:49 +0200 Subject: Prepare release --- lib/compiler/doc/src/notes.xml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'lib/compiler/doc/src') diff --git a/lib/compiler/doc/src/notes.xml b/lib/compiler/doc/src/notes.xml index e25cdc580c..92b3d809fc 100644 --- a/lib/compiler/doc/src/notes.xml +++ b/lib/compiler/doc/src/notes.xml @@ -32,6 +32,23 @@

This document describes the changes made to the Compiler application.

+
Compiler 7.0.1 + +
Fixed Bugs and Malfunctions + + +

+ A literal binary matching regression was introduced in + 19.0 where a match could fail to resolve to the right + clause. This has now been fixed.

+

+ Own Id: OTP-13738

+
+
+
+ +
+
Compiler 7.0
Fixed Bugs and Malfunctions -- cgit v1.2.3 From ad6e765bcd4f35a282ef00e38ed9129f3a5c1d83 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Thu, 1 Sep 2016 14:32:27 +0200 Subject: doc: Correct errors introduced by Editorial changes Fix some older errors as well. --- lib/compiler/doc/src/compile.xml | 6 +++--- lib/compiler/doc/src/notes.xml | 4 ++-- lib/compiler/doc/src/ref_man.xml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/compiler/doc/src') diff --git a/lib/compiler/doc/src/compile.xml b/lib/compiler/doc/src/compile.xml index 61e214294e..3ce37b98e9 100644 --- a/lib/compiler/doc/src/compile.xml +++ b/lib/compiler/doc/src/compile.xml @@ -136,7 +136,7 @@ (see The Abstract Format in ERTS User's Guide) in the compiled beam module. Tools - such as Debugger, Xref, and Cover require + such as Debugger, Xref, and Cover require the debug information to be included.

Warning: Source code can be reconstructed from @@ -544,7 +544,7 @@ module.beam: module.erl \ compiler to be deprecated. Notice that the compiler does not know about attribute -deprecated(), but uses an assembled list of deprecated functions in Erlang/OTP. To - do a more general check, the Xref tool can be used. + do a more general check, the Xref tool can be used. See also xref(3) and the function @@ -846,7 +846,7 @@ pi() -> 3.1416.

Inlining of List Functions

The compiler can also inline various list manipulation functions - from the module list in STDLIB.

+ from the module list in STDLIB.

This feature must be explicitly enabled with a compiler option or a -compile() attribute in the source module.

diff --git a/lib/compiler/doc/src/notes.xml b/lib/compiler/doc/src/notes.xml index 92b3d809fc..dd6b132a92 100644 --- a/lib/compiler/doc/src/notes.xml +++ b/lib/compiler/doc/src/notes.xml @@ -280,7 +280,7 @@

The cerl and cerl_trees modules in the - compiler application are now documented.

+ Compiler application are now documented.

Own Id: OTP-11978

@@ -1982,7 +1982,7 @@ RightExpr or vice versa. The evaluation order is only important if the expressions contains and/or depends on operations with side-effects, such as message passing - or ets operations.

+ or ETS operations.

Own Id: OTP-7206

diff --git a/lib/compiler/doc/src/ref_man.xml b/lib/compiler/doc/src/ref_man.xml index f5466553c0..c32c499008 100644 --- a/lib/compiler/doc/src/ref_man.xml +++ b/lib/compiler/doc/src/ref_man.xml @@ -30,7 +30,7 @@ application.sgml -

The Compiler application compiles Erlang +

The Compiler application compiles Erlang code to byte-code. The highly compact byte-code is executed by the Erlang emulator.

-- cgit v1.2.3 From 37e14c395a0d3621d65552b3954856d1cbeaed9a Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Tue, 20 Sep 2016 09:36:54 +0200 Subject: Prepare release --- lib/compiler/doc/src/notes.xml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'lib/compiler/doc/src') diff --git a/lib/compiler/doc/src/notes.xml b/lib/compiler/doc/src/notes.xml index dd6b132a92..6aaf16e9a5 100644 --- a/lib/compiler/doc/src/notes.xml +++ b/lib/compiler/doc/src/notes.xml @@ -32,6 +32,43 @@

This document describes the changes made to the Compiler application.

+
Compiler 7.0.2 + +
Fixed Bugs and Malfunctions + + +

+ If the compiler fails to write the BEAM file, it will now + report the reason of the error for the write operation.

+

+ Own Id: OTP-13701

+
+ +

+ Fixed an internal compiler error. (Thanks to Svilen + Ivanov for reporting this bug.)

+

+ Own Id: OTP-13780 Aux Id: ERL-202

+
+ +

+ The compiler could crash when trying to compile a + complicated expression with multiple catches all on one + line . (Thanks to Thomas Arts for reporting this bug.)

+

+ Own Id: OTP-13804 Aux Id: ERL-209

+
+ +

+ Eliminated a few internal compiler failures.

+

+ Own Id: OTP-13863

+
+
+
+ +
+
Compiler 7.0.1
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 12f6a1b18fc573ce3f245bfd69e62fbaa378b80e Mon Sep 17 00:00:00 2001 From: Richard Carlsson Date: Sat, 29 Oct 2016 23:30:49 +0200 Subject: warn_obsolete_guard is already default Update compiler documentation and remove superfluous erlc flags. --- lib/compiler/doc/src/compile.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/compiler/doc/src') diff --git a/lib/compiler/doc/src/compile.xml b/lib/compiler/doc/src/compile.xml index 3ce37b98e9..81e8ec6c23 100644 --- a/lib/compiler/doc/src/compile.xml +++ b/lib/compiler/doc/src/compile.xml @@ -574,7 +574,7 @@ module.beam: module.erl \ such as pid/1 and list/1. See the Erlang Reference Manual for a complete list of type testing BIFs and their old - equivalents. Default is to emit no warnings for calls to + equivalents. Default is to emit warnings for calls to old type testing BIFs.

-- cgit v1.2.3 From ba8f27dca5662ca7c66ac766be107342d808e72b Mon Sep 17 00:00:00 2001 From: Richard Carlsson Date: Sat, 29 Oct 2016 23:40:01 +0200 Subject: Make warn_export_all the default --- lib/compiler/doc/src/compile.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/compiler/doc/src') diff --git a/lib/compiler/doc/src/compile.xml b/lib/compiler/doc/src/compile.xml index 81e8ec6c23..e93da85f6c 100644 --- a/lib/compiler/doc/src/compile.xml +++ b/lib/compiler/doc/src/compile.xml @@ -498,9 +498,11 @@ module.beam: module.erl \ - warn_export_all + nowarn_export_all -

Emits a warning if option export_all is also given.

+

Turns off warnings for uses of the export_all + option. Default is to emit a warning if option + export_all is also given.

warn_export_vars -- cgit v1.2.3 From 8b0aff6608c42bf3c04381697b9ab57ffbd93456 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Wed, 7 Dec 2016 15:40:45 +0100 Subject: Add option 'deterministic' for reproducible builds Add the option 'deterministic' to make it easier to achieve reproducible builds. This option omits the {options,...} and {source,...} tuples in M:module_info(compile), because those options may contain absolute paths. The author of ERL-310 suggested that only compiler options that may contain absolute paths (such as {i,...}) should be excluded. But I find it confusing to keep only some options. Alternatives considered: Always omitting this information. Since this information has been available for a long time, that would probably break some workflows. As an example that some people care about {source,...}, 2d785c07fbf9 made it possible to give a compiler option to set {source,...}. ERL-310 --- lib/compiler/doc/src/compile.xml | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/compiler/doc/src') diff --git a/lib/compiler/doc/src/compile.xml b/lib/compiler/doc/src/compile.xml index e93da85f6c..bd488a39a5 100644 --- a/lib/compiler/doc/src/compile.xml +++ b/lib/compiler/doc/src/compile.xml @@ -176,6 +176,14 @@ beam_lib(3).

+ deterministic + +

Omit the options and source tuples in + the list returned by Module:module_info(compile). + This option will make it easier to achieve reproducible builds. +

+
+ makedep

Produces a Makefile rule to track headers dependencies. -- cgit v1.2.3 From fc0427be6d482182ec70f3cd87c73027cfb17ea9 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Fri, 9 Dec 2016 11:45:22 +0100 Subject: Prepare release --- lib/compiler/doc/src/notes.xml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'lib/compiler/doc/src') diff --git a/lib/compiler/doc/src/notes.xml b/lib/compiler/doc/src/notes.xml index 6aaf16e9a5..2e58b68bf0 100644 --- a/lib/compiler/doc/src/notes.xml +++ b/lib/compiler/doc/src/notes.xml @@ -32,6 +32,41 @@

This document describes the changes made to the Compiler application.

+
Compiler 7.0.3 + +
Fixed Bugs and Malfunctions + + +

+ Fixed a compiler crash when maps were matched.

+

+ Own Id: OTP-13931 Aux Id: ERL-266

+
+ +

+ Fixed a compiler crash having to with the delayed + sub-creation optimization. (Thanks to Jose Valim for + reporting this bug.)

+

+ Own Id: OTP-13947 Aux Id: ERL-268

+
+ +

The compiler option inline_list_funcs + accidentally turned off some other optimizations.

+

+ Own Id: OTP-13985

+
+ +

The compiler could sometimes generate spurious + warnings when inlining was enabled.

+

+ Own Id: OTP-14040 Aux Id: ERL-301

+
+
+
+ +
+
Compiler 7.0.2
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 36f7087ae0fe9749b776b7b013ccc0a26a494a84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sun, 12 Feb 2017 22:04:36 +0100 Subject: Add extra_chunks option to compile This allow languages such as Elixir and LFE to attach extra chunks to the .beam file without having to parse the beam file after compilation. This commit also cleans up the interface to beam_asm, allowing chunks to be passed from the compiler without a need to change beam_asm API on every new chunk. --- lib/compiler/doc/src/compile.xml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'lib/compiler/doc/src') diff --git a/lib/compiler/doc/src/compile.xml b/lib/compiler/doc/src/compile.xml index bd488a39a5..e6470b938f 100644 --- a/lib/compiler/doc/src/compile.xml +++ b/lib/compiler/doc/src/compile.xml @@ -418,7 +418,7 @@ module.beam: module.erl \ without module prefix to local or imported functions before trying with auto-imported BIFs. If the BIF is to be called, use the erlang module prefix in the call, not - { no_auto_import,[{F,A}, ...]}.

+ {no_auto_import,[{F,A}, ...]}.

If this option is written in the source code, as a -compile directive, the syntax F/A can be used instead @@ -439,6 +439,15 @@ module.beam: module.erl \

+ {extra_chunks, [{binary(), binary()}]} + +

Pass extra chunks to be stored in the .beam file. + The extra chunks must be a list of tuples with a four byte + binary as chunk name followed by a binary with the chunk contents. + See beam_lib for + more information. +

+

If warnings are turned on (option report_warnings -- cgit v1.2.3 From 2e6f6882b36bd4b752c27f1e07a7209d74cd9bd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20G=C3=B6m=C3=B6ri?= Date: Sun, 26 Feb 2017 14:32:03 +0100 Subject: Fix minor typo in compile:forms/1 doc --- lib/compiler/doc/src/compile.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/compiler/doc/src') diff --git a/lib/compiler/doc/src/compile.xml b/lib/compiler/doc/src/compile.xml index 3ce37b98e9..611cdc71ae 100644 --- a/lib/compiler/doc/src/compile.xml +++ b/lib/compiler/doc/src/compile.xml @@ -669,7 +669,7 @@ module.beam: module.erl \ Compiles a list of forms.

Is the same as - forms(File, [verbose,report_errors,report_warnings]). + forms(Forms, [verbose,report_errors,report_warnings]).

-- cgit v1.2.3 From 26c3cd82529836cb5b6eefbf7f92f318fd91f847 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Fri, 10 Mar 2017 15:00:46 +0100 Subject: Update copyright year --- lib/compiler/doc/src/compile.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/compiler/doc/src') diff --git a/lib/compiler/doc/src/compile.xml b/lib/compiler/doc/src/compile.xml index 611cdc71ae..9ac16af814 100644 --- a/lib/compiler/doc/src/compile.xml +++ b/lib/compiler/doc/src/compile.xml @@ -4,7 +4,7 @@
- 19962016 + 19962017 Ericsson AB. All Rights Reserved. -- cgit v1.2.3 From 4d658008be5a08ddadbe75ebadb9ef124436b76e Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Tue, 14 Mar 2017 15:59:23 +0100 Subject: Prepare release --- lib/compiler/doc/src/notes.xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'lib/compiler/doc/src') diff --git a/lib/compiler/doc/src/notes.xml b/lib/compiler/doc/src/notes.xml index 2e58b68bf0..449453bf88 100644 --- a/lib/compiler/doc/src/notes.xml +++ b/lib/compiler/doc/src/notes.xml @@ -32,6 +32,22 @@

This document describes the changes made to the Compiler application.

+
Compiler 7.0.4 + +
Fixed Bugs and Malfunctions + + +

+ Minor internal changes. A typo in the documentation was + also fixed.

+

+ Own Id: OTP-14240

+
+
+
+ +
+
Compiler 7.0.3
Fixed Bugs and Malfunctions -- cgit v1.2.3 From dfb899c0229f7ff7dbfad34d496e0429562728bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Wed, 8 Mar 2017 13:25:35 +0100 Subject: Store abstract code in the Dbgi chunk The new Dbgi chunk returns data in the following format: {debug_info_v1, Backend, Data} This allows compilers to store the debug info in different formats. In order to retrieve a particular format, for instance, Erlang Abstract Format, one may invoke: Backend:debug_info(erlang_v1, Module, Data, Opts) Besides introducing the chunk above, this commit also: * Changes beam_lib:chunk(Beam, [:abstract_code]) to read from the new Dbgi chunk while keeping backwards compatibility with old .beams * Adds the {debug_info, {Backend, Data}} option to compile:file/2 and friends that are stored in the Dbgi chunk. This allows the debug info encryption mechanism to work across compilers * Improves dialyzer to work directly on Core Erlang, allowing languages that do not have the Erlang Abstract Format to be dialyzer as long as they emit the new chunk and their backend implementation is available Backwards compatibility is kept across the board except for those calling beam_lib:chunk(Beam, ["Abst"]), as the old chunk is no longer available. Note however the "Abst" chunk has always been optional. Future OTP versions may remove parsing the "Abst" chunk altogether from beam_lib once Erlang 19 and earlier is no longer supported. The current Dialyzer implementation still supports earlier .beam files and such may also be removed in future versions. --- lib/compiler/doc/src/compile.xml | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'lib/compiler/doc/src') diff --git a/lib/compiler/doc/src/compile.xml b/lib/compiler/doc/src/compile.xml index ed04dac1c0..94bda0d5e3 100644 --- a/lib/compiler/doc/src/compile.xml +++ b/lib/compiler/doc/src/compile.xml @@ -132,12 +132,10 @@ debug_info -

Includes debug information in the form of abstract code - (see - The Abstract Format - in ERTS User's Guide) in the compiled beam module. Tools - such as Debugger, Xref, and Cover require - the debug information to be included.

+

Includes debug information in the form of + Erlang Abstract Format in the debug_info + chunk of the compiled beam module. Tools such as Debugger, + Xref, and Cover require the debug information to be included.

Warning: Source code can be reconstructed from the debug information. Use encrypted debug information @@ -147,6 +145,21 @@ beam_lib(3).

+ {debug_info, {Backend, Data}} + + +

Includes custom debug information in the form of a + Backend module with custom Data in the compiled beam module. + The given module must implement a debug_info/4 function + and is responsible for generating different code representations, + as described in the debug_info under + beam_lib(3).

+ +

Warning: Source code can be reconstructed from + the debug information. Use encrypted debug information + (encrypt_debug_info) to prevent this.

+
+ {debug_info_key,KeyString} {debug_info_key,{Mode,KeyString}} -- cgit v1.2.3 From 83e20c62057ebc1d8064bf57b01be560cd244e1d Mon Sep 17 00:00:00 2001 From: Raimo Niskanen Date: Thu, 4 May 2017 15:42:21 +0200 Subject: Update copyright year --- lib/compiler/doc/src/compile.xml | 2 +- lib/compiler/doc/src/notes.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/compiler/doc/src') diff --git a/lib/compiler/doc/src/compile.xml b/lib/compiler/doc/src/compile.xml index 94bda0d5e3..a82befd057 100644 --- a/lib/compiler/doc/src/compile.xml +++ b/lib/compiler/doc/src/compile.xml @@ -4,7 +4,7 @@
- 19962016 + 19962017 Ericsson AB. All Rights Reserved. diff --git a/lib/compiler/doc/src/notes.xml b/lib/compiler/doc/src/notes.xml index 449453bf88..1dc0c808e7 100644 --- a/lib/compiler/doc/src/notes.xml +++ b/lib/compiler/doc/src/notes.xml @@ -4,7 +4,7 @@
- 20042016 + 20042017 Ericsson AB. All Rights Reserved. -- cgit v1.2.3 From dc57404252c47520f352834ad9be45ad684f96c9 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Thu, 4 May 2017 17:05:25 +0200 Subject: Prepare release --- lib/compiler/doc/src/notes.xml | 150 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) (limited to 'lib/compiler/doc/src') diff --git a/lib/compiler/doc/src/notes.xml b/lib/compiler/doc/src/notes.xml index 1dc0c808e7..f3da04120a 100644 --- a/lib/compiler/doc/src/notes.xml +++ b/lib/compiler/doc/src/notes.xml @@ -32,6 +32,156 @@

This document describes the changes made to the Compiler application.

+
Compiler 7.1 + +
Fixed Bugs and Malfunctions + + +

For many releases, it has been legal to override a BIF + with a local function having the same name. However, + calling a local function with the same name as guard BIF + as filter in a list comprehension was not allowed.

+

+ Own Id: OTP-13690

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

+ Optimized test for tuples with an atom as first element.

+

+ Own Id: OTP-12148

+
+ +

+ Compilation of modules with huge literal binary strings + is now much faster.

+

+ Own Id: OTP-13794

+
+ +

Replaced usage of deprecated symbolic time + unit representations.

+

+ Own Id: OTP-13831 Aux Id: OTP-13735

+
+ +

The undocumented and unsupported module + sys_pre_expand has been removed. As a partical + replacement for the functionality, there is a new + function erl_internal:add_predefined_functions/1 + and erl_expand_records will now add a module + prefix to calls to BIFs and imported functions.

+

+ Own Id: OTP-13856

+
+ +

The internal compiler passes now start all generated + variables with "@" to avoid any conflicts with variables + in languages such as Elixir or LFE.

+

+ Own Id: OTP-13924

+
+ +

The function fmod/2 has been added to the + math module.

+

+ Own Id: OTP-14000

+
+ +

Code generation for complicated guards have been + improved.

+

+ Own Id: OTP-14042

+
+ +

+ The compiler has new warnings for repeated identical map + keys.

+

+ A map expression such as,

+

+ #{'a' => 1, 'b' => 2, 'a' => 3}.

+

+ will produce a warning for the repeated key 'a'.

+

+ Own Id: OTP-14058

+
+ +

By default, there will now be a warning when + export_all is used. The warning can be disabled + using nowarn_export_all.

+

+ Own Id: OTP-14071

+
+ +

+ Optimize maps pattern matching by only examining the + common keys in each clause first instead of all keys. + This will reduce the number of lookups of each key in + maps pattern matching.

+

+ Own Id: OTP-14072

+
+ +

There is a new 'deterministc' option to omit + 'source' and 'options' tuples in the BEAM + file.

+

+ Own Id: OTP-14087

+
+ +

+ Analyzing modules with binary construction with huge + strings is now much faster. The compiler also compiles + such modules slightly faster.

+

+ Own Id: OTP-14125 Aux Id: ERL-308

+
+ +

Atoms may now contain arbitrary Unicode + characters.

+

+ Own Id: OTP-14178

+
+ +

compile:file/2 now accepts the option + extra_chunks to include extra chunks in the BEAM + file.

+

+ Own Id: OTP-14221

+
+ +

The format of debug information that is stored in BEAM + files (when debug_info is used) has been changed. + The purpose of the change is to better support other + BEAM-based languages such as Elixir or LFE.

+

All tools included in OTP (dialyzer, debugger, cover, + and so on) will handle both the new format and the + previous format. Tools that retrieve the debug + information using beam_lib:chunk(Beam, + [abstract_code]) will continue to work with both the + new and old format. Tools that call + beam_lib:chunk(Beam, ["Abst"]) will not work with + the new format.

+

For more information, see the description of + debug_info in the documentation for + beam_lib and the description of the + {debug_info,{Backend,Data}} option in the + documentation for compile.

+

+ Own Id: OTP-14369 Aux Id: PR-1367

+
+
+
+ +
+
Compiler 7.0.4
Fixed Bugs and Malfunctions -- cgit v1.2.3 From eace29905be436d77245656b2511c9a9c2c67c90 Mon Sep 17 00:00:00 2001 From: Raimo Niskanen Date: Fri, 5 May 2017 13:15:42 +0200 Subject: Revert "Prepare release" This reverts commit dc57404252c47520f352834ad9be45ad684f96c9. --- lib/compiler/doc/src/notes.xml | 150 ----------------------------------------- 1 file changed, 150 deletions(-) (limited to 'lib/compiler/doc/src') diff --git a/lib/compiler/doc/src/notes.xml b/lib/compiler/doc/src/notes.xml index f3da04120a..1dc0c808e7 100644 --- a/lib/compiler/doc/src/notes.xml +++ b/lib/compiler/doc/src/notes.xml @@ -32,156 +32,6 @@

This document describes the changes made to the Compiler application.

-
Compiler 7.1 - -
Fixed Bugs and Malfunctions - - -

For many releases, it has been legal to override a BIF - with a local function having the same name. However, - calling a local function with the same name as guard BIF - as filter in a list comprehension was not allowed.

-

- Own Id: OTP-13690

-
-
-
- - -
Improvements and New Features - - -

- Optimized test for tuples with an atom as first element.

-

- Own Id: OTP-12148

-
- -

- Compilation of modules with huge literal binary strings - is now much faster.

-

- Own Id: OTP-13794

-
- -

Replaced usage of deprecated symbolic time - unit representations.

-

- Own Id: OTP-13831 Aux Id: OTP-13735

-
- -

The undocumented and unsupported module - sys_pre_expand has been removed. As a partical - replacement for the functionality, there is a new - function erl_internal:add_predefined_functions/1 - and erl_expand_records will now add a module - prefix to calls to BIFs and imported functions.

-

- Own Id: OTP-13856

-
- -

The internal compiler passes now start all generated - variables with "@" to avoid any conflicts with variables - in languages such as Elixir or LFE.

-

- Own Id: OTP-13924

-
- -

The function fmod/2 has been added to the - math module.

-

- Own Id: OTP-14000

-
- -

Code generation for complicated guards have been - improved.

-

- Own Id: OTP-14042

-
- -

- The compiler has new warnings for repeated identical map - keys.

-

- A map expression such as,

-

- #{'a' => 1, 'b' => 2, 'a' => 3}.

-

- will produce a warning for the repeated key 'a'.

-

- Own Id: OTP-14058

-
- -

By default, there will now be a warning when - export_all is used. The warning can be disabled - using nowarn_export_all.

-

- Own Id: OTP-14071

-
- -

- Optimize maps pattern matching by only examining the - common keys in each clause first instead of all keys. - This will reduce the number of lookups of each key in - maps pattern matching.

-

- Own Id: OTP-14072

-
- -

There is a new 'deterministc' option to omit - 'source' and 'options' tuples in the BEAM - file.

-

- Own Id: OTP-14087

-
- -

- Analyzing modules with binary construction with huge - strings is now much faster. The compiler also compiles - such modules slightly faster.

-

- Own Id: OTP-14125 Aux Id: ERL-308

-
- -

Atoms may now contain arbitrary Unicode - characters.

-

- Own Id: OTP-14178

-
- -

compile:file/2 now accepts the option - extra_chunks to include extra chunks in the BEAM - file.

-

- Own Id: OTP-14221

-
- -

The format of debug information that is stored in BEAM - files (when debug_info is used) has been changed. - The purpose of the change is to better support other - BEAM-based languages such as Elixir or LFE.

-

All tools included in OTP (dialyzer, debugger, cover, - and so on) will handle both the new format and the - previous format. Tools that retrieve the debug - information using beam_lib:chunk(Beam, - [abstract_code]) will continue to work with both the - new and old format. Tools that call - beam_lib:chunk(Beam, ["Abst"]) will not work with - the new format.

-

For more information, see the description of - debug_info in the documentation for - beam_lib and the description of the - {debug_info,{Backend,Data}} option in the - documentation for compile.

-

- Own Id: OTP-14369 Aux Id: PR-1367

-
-
-
- -
-
Compiler 7.0.4
Fixed Bugs and Malfunctions -- cgit v1.2.3 From d55c8e08714a8badd4a0af2bd14965b4672958fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Thu, 11 May 2017 07:04:32 +0200 Subject: Update compile.xml --- lib/compiler/doc/src/compile.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/compiler/doc/src') diff --git a/lib/compiler/doc/src/compile.xml b/lib/compiler/doc/src/compile.xml index ed04dac1c0..065042ed1c 100644 --- a/lib/compiler/doc/src/compile.xml +++ b/lib/compiler/doc/src/compile.xml @@ -587,9 +587,9 @@ module.beam: module.erl \ to be deprecated.

- warn_obsolete_guard + nowarn_obsolete_guard -

Emits warnings for calls to old type testing BIFs, +

Turns off warnings for calls to old type testing BIFs, such as pid/1 and list/1. See the Erlang Reference Manual for a complete list of type testing BIFs and their old -- cgit v1.2.3 From 7b169140b2d37f43996b9d1a94877926a471d97d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Tue, 2 May 2017 05:41:17 +0200 Subject: Warn for potentially unsafe use of get_stacktrace/0 erlang:get_stacktrace/0 returns the stacktrace for the latest exception. The problem is that the stacktrace is kept until the next exception occurs. If the last exception was a 'function_clause' or a 'badarg', the arguments for the call are also kept forever. The arguments can be terms of any size (potentially huge). In a future release, we would like to only allow erlang:get_stacktrace/0 from within a 'try' expression. That would make it possible to clear the stacktrace when the 'try' expression is exited. The 'catch' expression has no natural end where the stacktrace could be cleared. The stacktrace could be cleared at the end of the function that the 'catch' occurs in, but that would cause problems in the following scenario (from real life, but simplified): try ... catch _:_ -> io:format(...), io:format("~p\n", [erlang:get_stacktrace()]) end. %% In io.erl. format(Fmt, Args) -> Res = case ... of SomePattern -> catch... ...; SomeOtherPattern -> %% Output the formatted string here ... end, clear_stacktrace(), %% Inserted by compiler. Res. The call to io:format() would always clear the stacktrace before it could be retrieved. That problem could be solved by tightning the scope in which the stacktrace is kept, but the rules for how long erlang:get_stacktrace/0 would work would become complicated. Therefore, the solution we suggest for a future major release of OTP is that erlang:get_stacktrace/0 will return [] if it is called outside the 'catch' part of a 'try' expression. To help users prepare, introduce a warning when it is likely that erlang:get_stacktrace/0 will always return an empty list, for example in this code: catch error(foo), Stk = erlang:get_stacktrace() or in this code: try Expr catch _:_ -> ok end, Stk = erlang:get_stacktrace() --- lib/compiler/doc/src/compile.xml | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/compiler/doc/src') diff --git a/lib/compiler/doc/src/compile.xml b/lib/compiler/doc/src/compile.xml index fed68037c1..10164890f2 100644 --- a/lib/compiler/doc/src/compile.xml +++ b/lib/compiler/doc/src/compile.xml @@ -629,6 +629,14 @@ module.beam: module.erl \

Turns off warnings for unused record types. Default is to emit warnings for unused locally defined record types.

+ + nowarn_get_stacktrace + +

Turns off warnings for using get_stacktrace/0 in a context + where it will probably not work in a future release. For example, + by default there will be a warning if get_stacktrace/0 is + used following a catch expression.

+

Another class of warnings is generated by the compiler -- cgit v1.2.3 From eaf8ca41dfa4850437ad270d3897399c9358ced0 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Tue, 30 May 2017 16:15:30 +0200 Subject: Prepare release --- lib/compiler/doc/src/notes.xml | 174 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 174 insertions(+) (limited to 'lib/compiler/doc/src') diff --git a/lib/compiler/doc/src/notes.xml b/lib/compiler/doc/src/notes.xml index 1dc0c808e7..f11d6c73f2 100644 --- a/lib/compiler/doc/src/notes.xml +++ b/lib/compiler/doc/src/notes.xml @@ -32,6 +32,180 @@

This document describes the changes made to the Compiler application.

+
Compiler 7.1 + +
Fixed Bugs and Malfunctions + + +

For many releases, it has been legal to override a BIF + with a local function having the same name. However, + calling a local function with the same name as guard BIF + as filter in a list comprehension was not allowed.

+

+ Own Id: OTP-13690

+
+ +

compile:forms/2 would not return the module name as + documented when one of the options 'from_core', + 'from_asm', or 'from_beam' was given. Also, + the compiler would crash if one of those options was + combined with 'native'.

+

+ Own Id: OTP-14408 Aux Id: ERL-417

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

+ Optimized test for tuples with an atom as first element.

+

+ Own Id: OTP-12148

+
+ +

+ Compilation of modules with huge literal binary strings + is now much faster.

+

+ Own Id: OTP-13794

+
+ +

Replaced usage of deprecated symbolic time + unit representations.

+

+ Own Id: OTP-13831 Aux Id: OTP-13735

+
+ +

The undocumented and unsupported module + sys_pre_expand has been removed. As a partical + replacement for the functionality, there is a new + function erl_internal:add_predefined_functions/1 + and erl_expand_records will now add a module + prefix to calls to BIFs and imported functions.

+

+ Own Id: OTP-13856

+
+ +

The internal compiler passes now start all generated + variables with "@" to avoid any conflicts with variables + in languages such as Elixir or LFE.

+

+ Own Id: OTP-13924

+
+ +

The function fmod/2 has been added to the + math module.

+

+ Own Id: OTP-14000

+
+ +

Code generation for complicated guards have been + improved.

+

+ Own Id: OTP-14042

+
+ +

+ The compiler has new warnings for repeated identical map + keys.

+

+ A map expression such as,

+

+ #{'a' => 1, 'b' => 2, 'a' => 3}.

+

+ will produce a warning for the repeated key 'a'.

+

+ Own Id: OTP-14058

+
+ +

By default, there will now be a warning when + export_all is used. The warning can be disabled + using nowarn_export_all.

+

+ Own Id: OTP-14071

+
+ +

+ Optimize maps pattern matching by only examining the + common keys in each clause first instead of all keys. + This will reduce the number of lookups of each key in + maps pattern matching.

+

+ Own Id: OTP-14072

+
+ +

There is a new 'deterministc' option to omit + 'source' and 'options' tuples in the BEAM + file.

+

+ Own Id: OTP-14087

+
+ +

+ Analyzing modules with binary construction with huge + strings is now much faster. The compiler also compiles + such modules slightly faster.

+

+ Own Id: OTP-14125 Aux Id: ERL-308

+
+ +

Atoms may now contain arbitrary Unicode + characters.

+

+ Own Id: OTP-14178

+
+ +

compile:file/2 now accepts the option + extra_chunks to include extra chunks in the BEAM + file.

+

+ Own Id: OTP-14221

+
+ +

The format of debug information that is stored in BEAM + files (when debug_info is used) has been changed. + The purpose of the change is to better support other + BEAM-based languages such as Elixir or LFE.

+

All tools included in OTP (dialyzer, debugger, cover, + and so on) will handle both the new format and the + previous format. Tools that retrieve the debug + information using beam_lib:chunk(Beam, + [abstract_code]) will continue to work with both the + new and old format. Tools that call + beam_lib:chunk(Beam, ["Abst"]) will not work with + the new format.

+

For more information, see the description of + debug_info in the documentation for + beam_lib and the description of the + {debug_info,{Backend,Data}} option in the + documentation for compile.

+

+ Own Id: OTP-14369 Aux Id: PR-1367

+
+ +

In a future release, erlang:get_stacktrace/0 + will probably only work when called from within a + 'try' expression (otherwise it will return + [].

+

To help prepare for that change, the compiler will now + by default warn if 'get_stacktrace/0' is used in a + way that will not work in the future. Note that the + warning will not be issued if 'get_stacktrace/0' + is used in a function that uses neither 'catch' + nor 'try' (because that could be a legal use if + the function is called from within a 'try'.

+

+ Own Id: OTP-14401

+
+
+
+ +
+
Compiler 7.0.4
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 32275a2fc0b86d1f1b124706afc80f3ff92216eb Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Wed, 31 May 2017 16:21:00 +0200 Subject: Revert "Prepare release" This reverts commit eaf8ca41dfa4850437ad270d3897399c9358ced0. --- lib/compiler/doc/src/notes.xml | 174 ----------------------------------------- 1 file changed, 174 deletions(-) (limited to 'lib/compiler/doc/src') diff --git a/lib/compiler/doc/src/notes.xml b/lib/compiler/doc/src/notes.xml index f11d6c73f2..1dc0c808e7 100644 --- a/lib/compiler/doc/src/notes.xml +++ b/lib/compiler/doc/src/notes.xml @@ -32,180 +32,6 @@

This document describes the changes made to the Compiler application.

-
Compiler 7.1 - -
Fixed Bugs and Malfunctions - - -

For many releases, it has been legal to override a BIF - with a local function having the same name. However, - calling a local function with the same name as guard BIF - as filter in a list comprehension was not allowed.

-

- Own Id: OTP-13690

-
- -

compile:forms/2 would not return the module name as - documented when one of the options 'from_core', - 'from_asm', or 'from_beam' was given. Also, - the compiler would crash if one of those options was - combined with 'native'.

-

- Own Id: OTP-14408 Aux Id: ERL-417

-
-
-
- - -
Improvements and New Features - - -

- Optimized test for tuples with an atom as first element.

-

- Own Id: OTP-12148

-
- -

- Compilation of modules with huge literal binary strings - is now much faster.

-

- Own Id: OTP-13794

-
- -

Replaced usage of deprecated symbolic time - unit representations.

-

- Own Id: OTP-13831 Aux Id: OTP-13735

-
- -

The undocumented and unsupported module - sys_pre_expand has been removed. As a partical - replacement for the functionality, there is a new - function erl_internal:add_predefined_functions/1 - and erl_expand_records will now add a module - prefix to calls to BIFs and imported functions.

-

- Own Id: OTP-13856

-
- -

The internal compiler passes now start all generated - variables with "@" to avoid any conflicts with variables - in languages such as Elixir or LFE.

-

- Own Id: OTP-13924

-
- -

The function fmod/2 has been added to the - math module.

-

- Own Id: OTP-14000

-
- -

Code generation for complicated guards have been - improved.

-

- Own Id: OTP-14042

-
- -

- The compiler has new warnings for repeated identical map - keys.

-

- A map expression such as,

-

- #{'a' => 1, 'b' => 2, 'a' => 3}.

-

- will produce a warning for the repeated key 'a'.

-

- Own Id: OTP-14058

-
- -

By default, there will now be a warning when - export_all is used. The warning can be disabled - using nowarn_export_all.

-

- Own Id: OTP-14071

-
- -

- Optimize maps pattern matching by only examining the - common keys in each clause first instead of all keys. - This will reduce the number of lookups of each key in - maps pattern matching.

-

- Own Id: OTP-14072

-
- -

There is a new 'deterministc' option to omit - 'source' and 'options' tuples in the BEAM - file.

-

- Own Id: OTP-14087

-
- -

- Analyzing modules with binary construction with huge - strings is now much faster. The compiler also compiles - such modules slightly faster.

-

- Own Id: OTP-14125 Aux Id: ERL-308

-
- -

Atoms may now contain arbitrary Unicode - characters.

-

- Own Id: OTP-14178

-
- -

compile:file/2 now accepts the option - extra_chunks to include extra chunks in the BEAM - file.

-

- Own Id: OTP-14221

-
- -

The format of debug information that is stored in BEAM - files (when debug_info is used) has been changed. - The purpose of the change is to better support other - BEAM-based languages such as Elixir or LFE.

-

All tools included in OTP (dialyzer, debugger, cover, - and so on) will handle both the new format and the - previous format. Tools that retrieve the debug - information using beam_lib:chunk(Beam, - [abstract_code]) will continue to work with both the - new and old format. Tools that call - beam_lib:chunk(Beam, ["Abst"]) will not work with - the new format.

-

For more information, see the description of - debug_info in the documentation for - beam_lib and the description of the - {debug_info,{Backend,Data}} option in the - documentation for compile.

-

- Own Id: OTP-14369 Aux Id: PR-1367

-
- -

In a future release, erlang:get_stacktrace/0 - will probably only work when called from within a - 'try' expression (otherwise it will return - [].

-

To help prepare for that change, the compiler will now - by default warn if 'get_stacktrace/0' is used in a - way that will not work in the future. Note that the - warning will not be issued if 'get_stacktrace/0' - is used in a function that uses neither 'catch' - nor 'try' (because that could be a legal use if - the function is called from within a 'try'.

-

- Own Id: OTP-14401

-
-
-
- -
-
Compiler 7.0.4
Fixed Bugs and Malfunctions -- cgit v1.2.3 From c18b13d4c8aa31b145703bbbf228fb07d6b2a0a5 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Wed, 21 Jun 2017 10:53:19 +0200 Subject: Prepare release --- lib/compiler/doc/src/notes.xml | 174 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 174 insertions(+) (limited to 'lib/compiler/doc/src') diff --git a/lib/compiler/doc/src/notes.xml b/lib/compiler/doc/src/notes.xml index 1dc0c808e7..f3d42a909b 100644 --- a/lib/compiler/doc/src/notes.xml +++ b/lib/compiler/doc/src/notes.xml @@ -32,6 +32,180 @@

This document describes the changes made to the Compiler application.

+
Compiler 7.1 + +
Fixed Bugs and Malfunctions + + +

For many releases, it has been legal to override a BIF + with a local function having the same name. However, + calling a local function with the same name as guard BIF + as filter in a list comprehension was not allowed.

+

+ Own Id: OTP-13690

+
+ +

compile:forms/2 would not return the module name as + documented when one of the options 'from_core', + 'from_asm', or 'from_beam' was given. Also, + the compiler would crash if one of those options was + combined with 'native'.

+

+ Own Id: OTP-14408 Aux Id: ERL-417

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

+ Optimized test for tuples with an atom as first element.

+

+ Own Id: OTP-12148

+
+ +

+ Compilation of modules with huge literal binary strings + is now much faster.

+

+ Own Id: OTP-13794

+
+ +

Replaced usage of deprecated symbolic time + unit representations.

+

+ Own Id: OTP-13831 Aux Id: OTP-13735

+
+ +

The undocumented and unsupported module + sys_pre_expand has been removed. As a partial + replacement for the functionality, there is a new + function erl_internal:add_predefined_functions/1 + and erl_expand_records will now add a module + prefix to calls to BIFs and imported functions.

+

+ Own Id: OTP-13856

+
+ +

The internal compiler passes now start all generated + variables with "@" to avoid any conflicts with variables + in languages such as Elixir or LFE.

+

+ Own Id: OTP-13924

+
+ +

The function fmod/2 has been added to the + math module.

+

+ Own Id: OTP-14000

+
+ +

Code generation for complicated guards have been + improved.

+

+ Own Id: OTP-14042

+
+ +

+ The compiler has new warnings for repeated identical map + keys.

+

+ A map expression such as,

+

+ #{'a' => 1, 'b' => 2, 'a' => 3}.

+

+ will produce a warning for the repeated key 'a'.

+

+ Own Id: OTP-14058

+
+ +

By default, there will now be a warning when + export_all is used. The warning can be disabled + using nowarn_export_all.

+

+ Own Id: OTP-14071

+
+ +

+ Optimize maps pattern matching by only examining the + common keys in each clause first instead of all keys. + This will reduce the number of lookups of each key in + maps pattern matching.

+

+ Own Id: OTP-14072

+
+ +

There is a new 'deterministic' option to omit + 'source' and 'options' tuples in the BEAM + file.

+

+ Own Id: OTP-14087

+
+ +

+ Analyzing modules with binary construction with huge + strings is now much faster. The compiler also compiles + such modules slightly faster.

+

+ Own Id: OTP-14125 Aux Id: ERL-308

+
+ +

Atoms may now contain arbitrary Unicode + characters.

+

+ Own Id: OTP-14178

+
+ +

compile:file/2 now accepts the option + extra_chunks to include extra chunks in the BEAM + file.

+

+ Own Id: OTP-14221

+
+ +

The format of debug information that is stored in BEAM + files (when debug_info is used) has been changed. + The purpose of the change is to better support other + BEAM-based languages such as Elixir or LFE.

+

All tools included in OTP (dialyzer, debugger, cover, + and so on) will handle both the new format and the + previous format. Tools that retrieve the debug + information using beam_lib:chunk(Beam, + [abstract_code]) will continue to work with both the + new and old format. Tools that call + beam_lib:chunk(Beam, ["Abst"]) will not work with + the new format.

+

For more information, see the description of + debug_info in the documentation for + beam_lib and the description of the + {debug_info,{Backend,Data}} option in the + documentation for compile.

+

+ Own Id: OTP-14369 Aux Id: PR-1367

+
+ +

In a future release, erlang:get_stacktrace/0 + will probably only work when called from within a + 'try' expression (otherwise it will return + [].

+

To help prepare for that change, the compiler will now + by default warn if 'get_stacktrace/0' is used in a + way that will not work in the future. Note that the + warning will not be issued if 'get_stacktrace/0' + is used in a function that uses neither 'catch' + nor 'try' (because that could be a legal use if + the function is called from within a 'try'.

+

+ Own Id: OTP-14401

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