diff options
Diffstat (limited to 'lib/compiler')
-rw-r--r-- | lib/compiler/doc/src/notes.xml | 94 | ||||
-rw-r--r-- | lib/compiler/src/compile.erl | 12 | ||||
-rw-r--r-- | lib/compiler/vsn.mk | 2 |
3 files changed, 102 insertions, 6 deletions
diff --git a/lib/compiler/doc/src/notes.xml b/lib/compiler/doc/src/notes.xml index ae375c5f58..e25cdc580c 100644 --- a/lib/compiler/doc/src/notes.xml +++ b/lib/compiler/doc/src/notes.xml @@ -32,6 +32,100 @@ <p>This document describes the changes made to the Compiler application.</p> +<section><title>Compiler 7.0</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p><c>compile:forms/1,2</c> would crash when used in a + working directory that had been deleted by another + process.</p> + <p> + Own Id: OTP-13430 Aux Id: ERL-113 </p> + </item> + <item> + <p>Dialyzer no longer crashes when there is an invalid + function call such as <c>42(7)</c> in a module being + analyzed. The compiler will now warn for invalid function + calls such as <c>X = 42, x(7)</c>.</p> + <p> + Own Id: OTP-13552 Aux Id: ERL-138 </p> + </item> + </list> + </section> + + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> + Optimization of tuple matching has been slightly + improved.</p> + <p> + Own Id: OTP-12951</p> + </item> + <item> + <p>Five deprecated and undocumented functions in the + module <c>core_lib</c> have been removed. The functions + are: <c>get_anno/{1,2}</c>, <c>is_literal/1</c>, + <c>is_literal_list/1</c>, and <c>literal_value</c>. Use + the appropriate functions in the <c>cerl</c> module + instead.</p> + <p> + Own Id: OTP-12979</p> + </item> + <item> + <p>The pre-processor can now expand the ?FUNCTION_NAME + and ?FUNCTION_ARITY macros.</p> + <p> + Own Id: OTP-13059</p> + </item> + <item> + <p>The function mapfold/4 has been added to the + <c>cerl_trees</c> module.</p> + <p> + Own Id: OTP-13280</p> + </item> + <item> + <p>Bitstring comprehensions have been generalized to + allow arbitrary expressions in the construction part.</p> + <p> + Own Id: OTP-13289</p> + </item> + <item> + <p>The compiler will now produce warnings for binary + patterns that will never match (example: + <c><<-1/unsigned>> = Bin</c>). </p> + <p> + Own Id: OTP-13374 Aux Id: ERL-44 </p> + </item> + <item> + <p>The compiler will no longer put the compilation date + and time into BEAM files. That means that two BEAM files + compiled on the same computer from the same source code + and compilation options will be identical.</p> + <p>Note: If you want to find out whether a BEAM file on + disk is different from the loaded code, compared the MD5 + value obtained from <c>Mod:module_info(md5)</c> with the + MD5 value obtained from + <c>beam_lib:md5(BeamFileForMod)</c></p>. + <p> + *** POTENTIAL INCOMPATIBILITY ***</p> + <p> + Own Id: OTP-13504</p> + </item> + <item> + <p>The function <c>compile:env_compiler_options/0</c> has + been added to allow tools to pick up the same default + compiler options as the compiler itself.</p> + <p> + Own Id: OTP-13654</p> + </item> + </list> + </section> + +</section> + <section><title>Compiler 6.0.3</title> <section><title>Fixed Bugs and Malfunctions</title> diff --git a/lib/compiler/src/compile.erl b/lib/compiler/src/compile.erl index b716867f2f..e951a25e04 100644 --- a/lib/compiler/src/compile.erl +++ b/lib/compiler/src/compile.erl @@ -240,6 +240,8 @@ format_error({epp,E}) -> epp:format_error(E); format_error(write_error) -> "error writing file"; +format_error({write_error, Error}) -> + io_lib:format("error writing file: ~ts", [file:format_error(Error)]); format_error({rename,From,To,Error}) -> io_lib:format("failed to rename ~ts to ~ts: ~ts", [From,To,file:format_error(Error)]); @@ -1210,7 +1212,7 @@ makedep_output(#compile{code=Code,options=Opts,ofile=Ofile}=St) -> end, {ok,St} catch - exit:_ -> + error:_ -> %% Couldn't write to output Makefile. Err = {St#compile.ifile,[{none,?MODULE,write_error}]}, {error,St#compile{errors=St#compile.errors++[Err]}} @@ -1483,8 +1485,8 @@ save_binary_1(St) -> end, {error,St#compile{errors=St#compile.errors ++ Es}} end; - {error,_Error} -> - Es = [{Tfile,[{none,compile,write_error}]}], + {error,Error} -> + Es = [{Tfile,[{none,compile,{write_error,Error}}]}], {error,St#compile{errors=St#compile.errors ++ Es}} end. @@ -1632,8 +1634,8 @@ listing(LFun, Ext, St) -> LFun(Lf, Code), ok = file:close(Lf), {ok,St}; - {error,_Error} -> - Es = [{Lfile,[{none,compile,write_error}]}], + {error,Error} -> + Es = [{Lfile,[{none,compile,{write_error,Error}}]}], {error,St#compile{errors=St#compile.errors ++ Es}} end. diff --git a/lib/compiler/vsn.mk b/lib/compiler/vsn.mk index c83455240d..23dd4bd4b1 100644 --- a/lib/compiler/vsn.mk +++ b/lib/compiler/vsn.mk @@ -1 +1 @@ -COMPILER_VSN = 6.0.3 +COMPILER_VSN = 7.0 |