|
32 | 32 | <p>This document describes the changes made to the Compiler |
33 | 33 | application.</p> |
34 | 34 |
|
| 35 | +<section><title>Compiler 7.1</title> |
| 36 | + |
| 37 | + <section><title>Fixed Bugs and Malfunctions</title> |
| 38 | + <list> |
| 39 | + <item> |
| 40 | + <p>For many releases, it has been legal to override a BIF |
| 41 | + with a local function having the same name. However, |
| 42 | + calling a local function with the same name as guard BIF |
| 43 | + as filter in a list comprehension was not allowed.</p> |
| 44 | + <p> |
| 45 | + Own Id: OTP-13690</p> |
| 46 | + </item> |
| 47 | + </list> |
| 48 | + </section> |
| 49 | + |
| 50 | + |
| 51 | + <section><title>Improvements and New Features</title> |
| 52 | + <list> |
| 53 | + <item> |
| 54 | + <p> |
| 55 | + Optimized test for tuples with an atom as first element.</p> |
| 56 | + <p> |
| 57 | + Own Id: OTP-12148</p> |
| 58 | + </item> |
| 59 | + <item> |
| 60 | + <p> |
| 61 | + Compilation of modules with huge literal binary strings |
| 62 | + is now much faster.</p> |
| 63 | + <p> |
| 64 | + Own Id: OTP-13794</p> |
| 65 | + </item> |
| 66 | + <item> |
| 67 | + <p>Replaced usage of deprecated symbolic <seealso |
| 68 | + marker="erts:erlang#type-time_unit"><c>time |
| 69 | + unit</c></seealso> representations.</p> |
| 70 | + <p> |
| 71 | + Own Id: OTP-13831 Aux Id: OTP-13735 </p> |
| 72 | + </item> |
| 73 | + <item> |
| 74 | + <p>The undocumented and unsupported module |
| 75 | + <c>sys_pre_expand</c> has been removed. As a partical |
| 76 | + replacement for the functionality, there is a new |
| 77 | + function <c>erl_internal:add_predefined_functions/1</c> |
| 78 | + and <c>erl_expand_records</c> will now add a module |
| 79 | + prefix to calls to BIFs and imported functions.</p> |
| 80 | + <p> |
| 81 | + Own Id: OTP-13856</p> |
| 82 | + </item> |
| 83 | + <item> |
| 84 | + <p>The internal compiler passes now start all generated |
| 85 | + variables with "@" to avoid any conflicts with variables |
| 86 | + in languages such as Elixir or LFE.</p> |
| 87 | + <p> |
| 88 | + Own Id: OTP-13924</p> |
| 89 | + </item> |
| 90 | + <item> |
| 91 | + <p>The function <c>fmod/2</c> has been added to the |
| 92 | + <c>math</c> module.</p> |
| 93 | + <p> |
| 94 | + Own Id: OTP-14000</p> |
| 95 | + </item> |
| 96 | + <item> |
| 97 | + <p>Code generation for complicated guards have been |
| 98 | + improved.</p> |
| 99 | + <p> |
| 100 | + Own Id: OTP-14042</p> |
| 101 | + </item> |
| 102 | + <item> |
| 103 | + <p> |
| 104 | + The compiler has new warnings for repeated identical map |
| 105 | + keys.</p> |
| 106 | + <p> |
| 107 | + A map expression such as,</p> |
| 108 | + <p> |
| 109 | + <c> #{'a' => 1, 'b' => 2, 'a' => 3}.</c></p> |
| 110 | + <p> |
| 111 | + will produce a warning for the repeated key 'a'.</p> |
| 112 | + <p> |
| 113 | + Own Id: OTP-14058</p> |
| 114 | + </item> |
| 115 | + <item> |
| 116 | + <p>By default, there will now be a warning when |
| 117 | + <c>export_all</c> is used. The warning can be disabled |
| 118 | + using <c>nowarn_export_all</c>.</p> |
| 119 | + <p> |
| 120 | + Own Id: OTP-14071</p> |
| 121 | + </item> |
| 122 | + <item> |
| 123 | + <p> |
| 124 | + Optimize maps pattern matching by only examining the |
| 125 | + common keys in each clause first instead of all keys. |
| 126 | + This will reduce the number of lookups of each key in |
| 127 | + maps pattern matching.</p> |
| 128 | + <p> |
| 129 | + Own Id: OTP-14072</p> |
| 130 | + </item> |
| 131 | + <item> |
| 132 | + <p>There is a new '<c>deterministc</c>' option to omit |
| 133 | + '<c>source</c>' and '<c>options</c>' tuples in the BEAM |
| 134 | + file.</p> |
| 135 | + <p> |
| 136 | + Own Id: OTP-14087</p> |
| 137 | + </item> |
| 138 | + <item> |
| 139 | + <p> |
| 140 | + Analyzing modules with binary construction with huge |
| 141 | + strings is now much faster. The compiler also compiles |
| 142 | + such modules slightly faster.</p> |
| 143 | + <p> |
| 144 | + Own Id: OTP-14125 Aux Id: ERL-308 </p> |
| 145 | + </item> |
| 146 | + <item> |
| 147 | + <p>Atoms may now contain arbitrary Unicode |
| 148 | + characters.</p> |
| 149 | + <p> |
| 150 | + Own Id: OTP-14178</p> |
| 151 | + </item> |
| 152 | + <item> |
| 153 | + <p><c>compile:file/2</c> now accepts the option |
| 154 | + <c>extra_chunks</c> to include extra chunks in the BEAM |
| 155 | + file.</p> |
| 156 | + <p> |
| 157 | + Own Id: OTP-14221</p> |
| 158 | + </item> |
| 159 | + <item> |
| 160 | + <p>The format of debug information that is stored in BEAM |
| 161 | + files (when <c>debug_info</c> is used) has been changed. |
| 162 | + The purpose of the change is to better support other |
| 163 | + BEAM-based languages such as Elixir or LFE.</p> |
| 164 | + <p>All tools included in OTP (dialyzer, debugger, cover, |
| 165 | + and so on) will handle both the new format and the |
| 166 | + previous format. Tools that retrieve the debug |
| 167 | + information using <c>beam_lib:chunk(Beam, |
| 168 | + [abstract_code])</c> will continue to work with both the |
| 169 | + new and old format. Tools that call |
| 170 | + <c>beam_lib:chunk(Beam, ["Abst"])</c> will not work with |
| 171 | + the new format.</p> |
| 172 | + <p>For more information, see the description of |
| 173 | + <c>debug_info</c> in the documentation for |
| 174 | + <c>beam_lib</c> and the description of the |
| 175 | + <c>{debug_info,{Backend,Data}}</c> option in the |
| 176 | + documentation for <c>compile</c>.</p> |
| 177 | + <p> |
| 178 | + Own Id: OTP-14369 Aux Id: PR-1367 </p> |
| 179 | + </item> |
| 180 | + </list> |
| 181 | + </section> |
| 182 | + |
| 183 | +</section> |
| 184 | + |
35 | 185 | <section><title>Compiler 7.0.4</title> |
36 | 186 |
|
37 | 187 | <section><title>Fixed Bugs and Malfunctions</title> |
|
0 commit comments