Merge branch 'master' into v2.1
[luajit-2.0.git] / doc / changes.html
blob6dbf26ba6bde8c5fdfc29126c7c9d796a87750a1
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3 <head>
4 <title>LuaJIT Change History</title>
5 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6 <meta name="Author" content="Mike Pall">
7 <meta name="Copyright" content="Copyright (C) 2005-2014, Mike Pall">
8 <meta name="Language" content="en">
9 <link rel="stylesheet" type="text/css" href="bluequad.css" media="screen">
10 <link rel="stylesheet" type="text/css" href="bluequad-print.css" media="print">
11 <style type="text/css">
12 div.major { max-width: 600px; padding: 1em; margin: 1em 0 1em 0; }
13 </style>
14 </head>
15 <body>
16 <div id="site">
17 <a href="http://luajit.org"><span>Lua<span id="logo">JIT</span></span></a>
18 </div>
19 <div id="head">
20 <h1>LuaJIT Change History</h1>
21 </div>
22 <div id="nav">
23 <ul><li>
24 <a href="luajit.html">LuaJIT</a>
25 <ul><li>
26 <a href="http://luajit.org/download.html">Download <span class="ext">&raquo;</span></a>
27 </li><li>
28 <a href="install.html">Installation</a>
29 </li><li>
30 <a href="running.html">Running</a>
31 </li></ul>
32 </li><li>
33 <a href="extensions.html">Extensions</a>
34 <ul><li>
35 <a href="ext_ffi.html">FFI Library</a>
36 <ul><li>
37 <a href="ext_ffi_tutorial.html">FFI Tutorial</a>
38 </li><li>
39 <a href="ext_ffi_api.html">ffi.* API</a>
40 </li><li>
41 <a href="ext_ffi_semantics.html">FFI Semantics</a>
42 </li></ul>
43 </li><li>
44 <a href="ext_jit.html">jit.* Library</a>
45 </li><li>
46 <a href="ext_c_api.html">Lua/C API</a>
47 </li><li>
48 <a href="ext_profiler.html">Profiler</a>
49 </li></ul>
50 </li><li>
51 <a href="status.html">Status</a>
52 <ul><li>
53 <a class="current" href="changes.html">Changes</a>
54 </li></ul>
55 </li><li>
56 <a href="faq.html">FAQ</a>
57 </li><li>
58 <a href="http://luajit.org/performance.html">Performance <span class="ext">&raquo;</span></a>
59 </li><li>
60 <a href="http://wiki.luajit.org/">Wiki <span class="ext">&raquo;</span></a>
61 </li><li>
62 <a href="http://luajit.org/list.html">Mailing List <span class="ext">&raquo;</span></a>
63 </li></ul>
64 </div>
65 <div id="main">
66 <p>
67 This is a list of changes between the released versions of LuaJIT.<br>
68 The current <span style="color: #0000c0;">stable version</span> is <strong>LuaJIT&nbsp;2.0.3</strong>.<br>
69 </p>
70 <p>
71 Please check the
72 <a href="http://luajit.org/changes.html"><span class="ext">&raquo;</span>&nbsp;Online Change History</a>
73 to see whether newer versions are available.
74 </p>
76 <div class="major" style="background: #d0d0ff;">
77 <h2 id="LuaJIT-2.0.3">LuaJIT 2.0.3 &mdash; 2014-03-12</h2>
78 <ul>
79 <li>Add PS4 port.</li>
80 <li>Add support for multilib distro builds.</li>
81 <li>Fix OSX build.</li>
82 <li>Fix MinGW build.</li>
83 <li>Fix Xbox 360 build.</li>
84 <li>Improve ULOAD forwarding for open upvalues.</li>
85 <li>Fix GC steps threshold handling when called by JIT-compiled code.</li>
86 <li>Fix argument checks for <tt>math.deg()</tt> and <tt>math.rad()</tt>.</li>
87 <li>Fix <tt>jit.flush(func|true)</tt>.</li>
88 <li>Respect <tt>jit.off(func)</tt> when returning to a function, too.</li>
89 <li>Fix compilation of <tt>string.byte(s, nil, n)</tt>.</li>
90 <li>Fix line number for relocated bytecode after closure fixup</li>
91 <li>Fix frame traversal for backtraces.</li>
92 <li>Fix ABC elimination.</li>
93 <li>Fix handling of redundant PHIs.</li>
94 <li>Fix snapshot restore for exit to function header.</li>
95 <li>Fix type punning alias analysis for constified pointers</li>
96 <li>Fix call unroll checks in the presence of metamethod frames.</li>
97 <li>Fix initial maxslot for down-recursive traces.</li>
98 <li>Prevent BASE register coalescing if parent uses <tt>IR_RETF</tt>.</li>
99 <li>Don't purge modified function from stack slots in <tt>BC_RET</tt>.</li>
100 <li>Fix recording of <tt>BC_VARG</tt>.</li>
101 <li>Don't access dangling reference to reallocated IR.</li>
102 <li>Fix frame depth display for bytecode dump in <tt>-jdump</tt>.</li>
103 <li>ARM: Fix register allocation when rematerializing FPRs.</li>
104 <li>x64: Fix store to upvalue for lightuserdata values.</li>
105 <li>FFI: Add missing GC steps for callback argument conversions.</li>
106 <li>FFI: Properly unload loaded DLLs.</li>
107 <li>FFI: Fix argument checks for <tt>ffi.string()</tt>.</li>
108 <li>FFI/x64: Fix passing of vector arguments to calls.</li>
109 <li>FFI: Rehash finalizer table after GC cycle, if needed.</li>
110 <li>FFI: Fix <tt>cts-&gt;L</tt> for cdata unsinking in snapshot restore.</li>
111 </ul>
113 <h2 id="LuaJIT-2.0.2">LuaJIT 2.0.2 &mdash; 2013-06-03</h2>
114 <ul>
115 <li>Fix memory access check for fast string interning.</li>
116 <li>Fix MSVC intrinsics for older versions.</li>
117 <li>Add missing GC steps for <tt>io.*</tt> functions.</li>
118 <li>Fix spurious red zone overflows in machine code generation.</li>
119 <li>Fix jump-range constrained mcode allocation.</li>
120 <li>Inhibit DSE for implicit loads via calls.</li>
121 <li>Fix builtin string to number conversion for overflow digits.</li>
122 <li>Fix optional argument handling while recording builtins.</li>
123 <li>Fix optional argument handling in <tt>table.concat()</tt>.</li>
124 <li>Add partial support for building with MingW64 GCC 4.8-SEH.</li>
125 <li>Add missing PHI barrier to <tt>string.sub(str, a, b) == kstr</tt> FOLD rule.</li>
126 <li>Fix compatibility issues with Illumos.</li>
127 <li>ARM: Fix cache flush/sync for exit stubs of JIT-compiled code.</li>
128 <li>MIPS: Fix cache flush/sync for JIT-compiled code jump area.</li>
129 <li>PPC: Add <tt>plt</tt> suffix for external calls from assembler code.</li>
130 <li>FFI: Fix snapshot substitution in SPLIT pass.</li>
131 <li>FFI/x86: Fix register allocation for 64 bit comparisons.</li>
132 <li>FFI: Fix tailcall in lowest frame to C&nbsp;function with bool result.</li>
133 <li>FFI: Ignore <tt>long</tt> type specifier in <tt>ffi.istype()</tt>.</li>
134 <li>FFI: Fix calling conventions for 32 bit OSX and iOS simulator (struct returns).</li>
135 <li>FFI: Fix calling conventions for ARM hard-float EABI (nested structs).</li>
136 <li>FFI: Improve error messages for arithmetic and comparison operators.</li>
137 <li>FFI: Insert no-op type conversion for pointer to integer cast.</li>
138 <li>FFI: Fix unroll limit for <tt>ffi.fill()</tt>.</li>
139 <li>FFI: Must sink <tt>XBAR</tt> together with <tt>XSTORE</tt>s.</li>
140 <li>FFI: Preserve intermediate string for <tt>const&nbsp;char&nbsp;*</tt> conversion.</li>
141 </ul>
143 <h2 id="LuaJIT-2.0.1">LuaJIT 2.0.1 &mdash; 2013-02-19</h2>
144 <ul>
145 <li>Don't clear frame for out-of-memory error.</li>
146 <li>Leave hook when resume catches error thrown from hook.</li>
147 <li>Add missing GC steps for template table creation.</li>
148 <li>Fix discharge order of comparisons in Lua parser.</li>
149 <li>Improve buffer handling for <tt>io.read()</tt>.</li>
150 <li>OSX: Add support for Mach-O object files to <tt>-b</tt> option.</li>
151 <li>Fix PS3 port.</li>
152 <li>Fix/enable Xbox 360 port.</li>
153 <li>x86/x64: Always mark ref for shift count as non-weak.</li>
154 <li>x64: Don't fuse implicitly 32-to-64 extended operands.</li>
155 <li>ARM: Fix armhf call argument handling.</li>
156 <li>ARM: Fix code generation for integer math.min/math.max.</li>
157 <li>PPC/e500: Fix <tt>lj_vm_floor()</tt> for Inf/NaN.</li>
158 <li>FFI: Change priority of table initializer variants for structs.</li>
159 <li>FFI: Fix code generation for bool call result check on x86/x64.</li>
160 <li>FFI: Load FFI library on-demand for bytecode with cdata literals.</li>
161 <li>FFI: Fix handling of qualified transparent structs/unions.</li>
162 </ul>
164 <h2 id="LuaJIT-2.0.0">LuaJIT 2.0.0 &mdash; 2012-11-08</h2>
165 <ul>
166 <li>Correctness and completeness:
167 <ul>
168 <li>Fix Android/x86 build.</li>
169 <li>Fix recording of equality comparisons with <tt>__eq</tt> metamethods.</li>
170 <li>Fix detection of immutable upvalues.</li>
171 <li>Replace error with PANIC for callbacks from JIT-compiled code.</li>
172 <li>Fix builtin string to number conversion for <tt>INT_MIN</tt>.</li>
173 <li>Don't create unneeded array part for template tables.</li>
174 <li>Fix <tt>CONV.num.int</tt> sinking.</li>
175 <li>Don't propagate implicitly widened number to index metamethods.</li>
176 <li>ARM: Fix ordered comparisons of number vs. non-number.</li>
177 <li>FFI: Fix code generation for replay of sunk float fields.</li>
178 <li>FFI: Fix signedness of bool.</li>
179 <li>FFI: Fix recording of bool call result check on x86/x64.</li>
180 <li>FFI: Fix stack-adjustment for <tt>__thiscall</tt> callbacks.</li>
181 </ul></li>
182 </ul>
184 <h2 id="LuaJIT-2.0.0-beta11">LuaJIT 2.0.0-beta11 &mdash; 2012-10-16</h2>
185 <ul>
186 <li>New features:
187 <ul>
188 <li>Use ARM VFP instructions, if available (build-time detection).</li>
189 <li>Add support for ARM hard-float EABI (<tt>armhf</tt>).</li>
190 <li>Add PS3 port.</li>
191 <li>Add many features from Lua&nbsp;5.2, e.g. <tt>goto</tt>/labels.
192 Refer to <a href="extensions.html#lua52">this list</a>.</li>
193 <li>FFI: Add parameterized C types.</li>
194 <li>FFI: Add support for copy constructors.</li>
195 <li>FFI: Equality comparisons never raise an error (treat as unequal instead).</li>
196 <li>FFI: Box all accessed or returned enums.</li>
197 <li>FFI: Check for <tt>__new</tt> metamethod when calling a constructor.</li>
198 <li>FFI: Handle <tt>__pairs</tt>/<tt>__ipairs</tt> metamethods for cdata objects.</li>
199 <li>FFI: Convert <tt>io.*</tt> file handle to <tt>FILE *</tt> pointer (but as a <tt>void *</tt>).</li>
200 <li>FFI: Detect and support type punning through unions.</li>
201 <li>FFI: Improve various error messages.</li>
202 </ul></li>
203 <li>Build-system reorganization:
204 <ul>
205 <li>Reorganize directory layout:<br>
206 <tt>lib/*</tt> &rarr; <tt>src/jit/*</tt><br>
207 <tt>src/buildvm_*.dasc</tt> &rarr; <tt>src/vm_*.dasc</tt><br>
208 <tt>src/buildvm_*.h</tt> &rarr; removed<br>
209 <tt>src/buildvm*</tt> &rarr; <tt>src/host/*</tt></li>
210 <li>Add minified Lua interpreter plus Lua BitOp (<tt>minilua</tt>) to run DynASM.</li>
211 <li>Change DynASM bit operations to use Lua BitOp</li>
212 <li>Translate only <tt>vm_*.dasc</tt> for detected target architecture.</li>
213 <li>Improve target detection for <tt>msvcbuild.bat</tt>.</li>
214 <li>Fix build issues on Cygwin and MinGW with optional MSys.</li>
215 <li>Handle cross-compiles with FPU/no-FPU or hard-fp/soft-fp ABI mismatch.</li>
216 <li>Remove some library functions for no-JIT/no-FFI builds.</li>
217 <li>Add uninstall target to top-level Makefile.</li>
218 </ul></li>
219 <li>Correctness and completeness:
220 <ul>
221 <li>Preserve snapshot #0 PC for all traces.</li>
222 <li>Fix argument checks for <tt>coroutine.create()</tt>.</li>
223 <li>Command line prints version and JIT status to <tt>stdout</tt>, not <tt>stderr</tt>.</li>
224 <li>Fix userdata <tt>__gc</tt> separations at Lua state close.</li>
225 <li>Fix <tt>TDUP</tt> to <tt>HLOAD</tt> forwarding for <tt>LJ_DUALNUM</tt> builds.</li>
226 <li>Fix buffer check in bytecode writer.</li>
227 <li>Make <tt>os.date()</tt> thread-safe.</li>
228 <li>Add missing declarations for MSVC intrinsics.</li>
229 <li>Fix dispatch table modifications for return hooks.</li>
230 <li>Workaround for MSVC conversion bug (<tt>double</tt> &rarr; <tt>uint32_t</tt> &rarr; <tt>int32_t</tt>).</li>
231 <li>Fix FOLD rule <tt>(i-j)-i => 0-j</tt>.</li>
232 <li>Never use DWARF unwinder on Windows.</li>
233 <li>Fix shrinking of direct mapped blocks in builtin allocator.</li>
234 <li>Limit recursion depth in <tt>string.match()</tt> et al.</li>
235 <li>Fix late despecialization of <tt>ITERN</tt> after loop has been entered.</li>
236 <li>Fix <tt>'f'</tt> and <tt>'L'</tt> options for <tt>debug.getinfo()</tt> and <tt>lua_getinfo()</tt>.</li>
237 <li>Fix <tt>package.searchpath()</tt>.</li>
238 <li>OSX: Change dylib names to be consistent with other platforms.</li>
239 <li>Android: Workaround for broken <tt>sprintf("%g",&nbsp;-0.0)</tt>.</li>
240 <li>x86: Remove support for ancient CPUs without <tt>CMOV</tt> (before Pentium Pro).</li>
241 <li>x86: Fix register allocation for calls returning register pair.</li>
242 <li>x86/x64: Fix fusion of unsigned byte comparisons with swapped operands.</li>
243 <li>ARM: Fix <tt>tonumber()</tt> argument check.</li>
244 <li>ARM: Fix modulo operator and <tt>math.floor()</tt>/<tt>math.ceil()</tt> for <tt>inf</tt>/<tt>nan</tt>.</li>
245 <li>ARM: Invoke SPLIT pass for leftover <tt>IR_TOBIT</tt>.</li>
246 <li>ARM: Fix BASE register coalescing.</li>
247 <li>PPC: Fix interpreter state setup in callbacks.</li>
248 <li>PPC: Fix <tt>string.sub()</tt> range check.</li>
249 <li>MIPS: Support generation of MIPS/MIPSEL bytecode object files.</li>
250 <li>MIPS: Fix calls to <tt>floor()</tt>/<tt>ceil()</tt><tt>/trunc()</tt>.</li>
251 <li>ARM/PPC: Detect more target architecture variants.</li>
252 <li>ARM/PPC/e500/MIPS: Fix tailcalls from fast functions, esp. <tt>tostring()</tt>.</li>
253 <li>ARM/PPC/MIPS: Fix rematerialization of FP constants.</li>
254 <li>FFI: Don't call <tt>FreeLibrary()</tt> on our own EXE/DLL.</li>
255 <li>FFI: Resolve metamethods for constructors, too.</li>
256 <li>FFI: Properly disable callbacks on iOS (would require executable memory).</li>
257 <li>FFI: Fix cdecl string parsing during recording.</li>
258 <li>FFI: Show address pointed to for <tt>tostring(ref)</tt>, too.</li>
259 <li>FFI: Fix alignment of C call argument/return structure.</li>
260 <li>FFI: Initialize all fields of standard types.</li>
261 <li>FFI: Fix callback handling when new C&nbsp;types are declared in callback.</li>
262 <li>FFI: Fix recording of constructors for pointers.</li>
263 <li>FFI: Always resolve metamethods for pointers to structs.</li>
264 <li>FFI: Correctly propagate alignment when interning nested types.</li>
265 </ul></li>
266 <li>Structural and performance enhancements:
267 <ul>
268 <li>Add allocation sinking and store sinking optimization.</li>
269 <li>Constify immutable upvalues.</li>
270 <li>Add builtin string to integer or FP number conversion. Improves cross-platform consistency and correctness.</li>
271 <li>Create string hash slots in template tables for non-const values, too. Avoids later table resizes.</li>
272 <li>Eliminate <tt>HREFK</tt> guard for template table references.</li>
273 <li>Add various new FOLD rules.</li>
274 <li>Don't use stack unwinding for <tt>lua_yield()</tt> (slow on x64).</li>
275 <li>ARM, PPC, MIPS: Improve <tt>XLOAD</tt> operand fusion and register hinting.</li>
276 <li>PPC, MIPS: Compile <tt>math.sqrt()</tt> to sqrt instruction, if available.</li>
277 <li>FFI: Fold <tt>KPTR</tt> + constant offset in SPLIT pass.</li>
278 <li>FFI: Optimize/inline <tt>ffi.copy()</tt> and <tt>ffi.fill()</tt>.</li>
279 <li>FFI: Compile and optimize array/struct copies.</li>
280 <li>FFI: Compile <tt>ffi.typeof(cdata|ctype)</tt>, <tt>ffi.sizeof()</tt>, <tt>ffi.alignof()</tt>, <tt>ffi.offsetof()</tt> and <tt>ffi.gc()</tt>.</li>
281 </ul></li>
282 </ul>
284 <h2 id="LuaJIT-2.0.0-beta10">LuaJIT 2.0.0-beta10 &mdash; 2012-05-09</h2>
285 <ul>
286 <li>New features:
287 <ul>
288 <li>The MIPS of LuaJIT is complete. It requires a CPU conforming to the
289 MIPS32&nbsp;R1 architecture with hardware FPU. O32 hard-fp ABI,
290 little-endian or big-endian.</li>
291 <li>Auto-detect target arch via cross-compiler. No need for
292 <tt>TARGET=arch</tt> anymore.</li>
293 <li>Make DynASM compatible with Lua 5.2.</li>
294 <li>From Lua 5.2: Try <tt>__tostring</tt> metamethod on non-string error
295 messages..</li>
296 </ul></li>
297 <li>Correctness and completeness:
298 <ul>
299 <li>Fix parsing of hex literals with exponents.</li>
300 <li>Fix bytecode dump for certain number constants.</li>
301 <li>Fix argument type in error message for relative arguments.</li>
302 <li>Fix argument error handling on Lua stacks without a frame.</li>
303 <li>Add missing mcode limit check in assembler backend.</li>
304 <li>Fix compilation on OpenBSD.</li>
305 <li>Avoid recursive GC steps after GC-triggered trace exit.</li>
306 <li>Replace <tt>&lt;unwind.h&gt;</tt> definitions with our own.</li>
307 <li>Fix OSX build issues. Bump minimum required OSX version to 10.4.</li>
308 <li>Fix discharge order of comparisons in Lua parser.</li>
309 <li>Ensure running <tt>__gc</tt> of userdata created in <tt>__gc</tt>
310 at state close.</li>
311 <li>Limit number of userdata <tt>__gc</tt> separations at state close.</li>
312 <li>Fix bytecode <tt>JMP</tt> slot range when optimizing
313 <tt>and</tt>/<tt>or</tt> with constant LHS.</li>
314 <li>Fix DSE of <tt>USTORE</tt>.</li>
315 <li>Make <tt>lua_concat()</tt> work from C&nbsp;hook with partial frame.</li>
316 <li>Add required PHIs for implicit conversions, e.g. via <tt>XREF</tt>
317 forwarding.</li>
318 <li>Add more comparison variants to Valgrind suppressions file.</li>
319 <li>Disable loading bytecode with an extra header (BOM or <tt>#!</tt>).</li>
320 <li>Fix PHI stack slot syncing.</li>
321 <li>ARM: Reorder type/value tests to silence Valgrind.</li>
322 <li>ARM: Fix register allocation for <tt>ldrd</tt>-optimized
323 <tt>HREFK</tt>.</li>
324 <li>ARM: Fix conditional branch fixup for <tt>OBAR</tt>.</li>
325 <li>ARM: Invoke SPLIT pass for <tt>double</tt> args in FFI call.</li>
326 <li>ARM: Handle all <tt>CALL*</tt> ops with <tt>double</tt> results in
327 SPLIT pass.</li>
328 <li>ARM: Fix rejoin of <tt>POW</tt> in SPLIT pass.</li>
329 <li>ARM: Fix compilation of <tt>math.sinh</tt>, <tt>math.cosh</tt>,
330 <tt>math.tanh</tt>.</li>
331 <li>ARM, PPC: Avoid pointless arg clearing in <tt>BC_IFUNCF</tt>.</li>
332 <li>PPC: Fix resume after yield from hook.</li>
333 <li>PPC: Fix argument checking for <tt>rawget()</tt>.</li>
334 <li>PPC: Fix fusion of floating-point <tt>XLOAD</tt>/<tt>XSTORE</tt>.</li>
335 <li>PPC: Fix <tt>HREFK</tt> code generation for huge tables.</li>
336 <li>PPC: Use builtin D-Cache/I-Cache sync code.</li>
337 </ul></li>
338 <li>FFI library:
339 <ul>
340 <li>Ignore empty statements in <tt>ffi.cdef()</tt>.</li>
341 <li>Ignore number parsing errors while skipping definitions.</li>
342 <li>Don't touch frame in callbacks with tailcalls to fast functions.</li>
343 <li>Fix library unloading on POSIX systems.</li>
344 <li>Finalize cdata before userdata when closing the state.</li>
345 <li>Change <tt>ffi.load()</tt> library name resolution for Cygwin.</li>
346 <li>Fix resolving of function name redirects on Windows/x86.</li>
347 <li>Fix symbol resolving error messages on Windows.</li>
348 <li>Fix blacklisting of C functions calling callbacks.</li>
349 <li>Fix result type of pointer difference.</li>
350 <li>Use correct PC in FFI metamethod error message.</li>
351 <li>Allow <tt>'typedef _Bool int BOOL;'</tt> for the Windows API.</li>
352 <li>Don't record test for bool result of call, if ignored.</li>
353 </ul></li>
354 </ul>
356 <h2 id="LuaJIT-2.0.0-beta9">LuaJIT 2.0.0-beta9 &mdash; 2011-12-14</h2>
357 <ul>
358 <li>New features:
359 <ul>
360 <li>PPC port of LuaJIT is complete. Default is the dual-number port
361 (usually faster). Single-number port selectable via <tt>src/Makefile</tt>
362 at build time.</li>
363 <li>Add FFI callback support.</li>
364 <li>Extend <tt>-b</tt> to generate <tt>.c</tt>, <tt>.h</tt> or <tt>.obj/.o</tt>
365 files with embedded bytecode.</li>
366 <li>Allow loading embedded bytecode with <tt>require()</tt>.</li>
367 <li>From Lua 5.2: Change to <tt>'\z'</tt> escape. Reject undefined escape
368 sequences.</li>
369 </ul></li>
370 <li>Correctness and completeness:
371 <ul>
372 <li>Fix OSX 10.7 build. Fix <tt>install_name</tt> and versioning on OSX.</li>
373 <li>Fix iOS build.</li>
374 <li>Install <tt>dis_arm.lua</tt>, too.</li>
375 <li>Mark installed shared library as executable.</li>
376 <li>Add debug option to <tt>msvcbuild.bat</tt> and improve error handling.</li>
377 <li>Fix data-flow analysis for iterators.</li>
378 <li>Fix forced unwinding triggered by external unwinder.</li>
379 <li>Record missing <tt>for</tt> loop slot loads (return to lower frame).</li>
380 <li>Always use ANSI variants of Windows system functions.</li>
381 <li>Fix GC barrier for multi-result table constructor (<tt>TSETM</tt>).</li>
382 <li>Fix/add various FOLD rules.</li>
383 <li>Add potential PHI for number conversions due to type instability.</li>
384 <li>Do not eliminate PHIs only referenced from other PHIs.</li>
385 <li>Correctly anchor implicit number to string conversions in Lua/C API.</li>
386 <li>Fix various stack limit checks.</li>
387 <li>x64: Use thread-safe exceptions for external unwinding (GCC platforms).</li>
388 <li>x64: Fix result type of cdata index conversions.</li>
389 <li>x64: Fix <tt>math.random()</tt> and <tt>bit.bswap()</tt> code generation.</li>
390 <li>x64: Fix <tt>lightuserdata</tt> comparisons.</li>
391 <li>x64: Always extend stack-passed arguments to pointer size.</li>
392 <li>ARM: Many fixes to code generation backend.</li>
393 <li>PPC/e500: Fix dispatch for binop metamethods.</li>
394 <li>PPC/e500: Save/restore condition registers when entering/leaving the VM.</li>
395 <li>PPC/e500: Fix write barrier in stores of strings to upvalues.</li>
396 </ul></li>
397 <li>FFI library:
398 <ul>
399 <li>Fix C comment parsing.</li>
400 <li>Fix snapshot optimization for cdata comparisons.</li>
401 <li>Fix recording of const/enum lookups in namespaces.</li>
402 <li>Fix call argument and return handling for <tt>I8/U8/I16/U16</tt> types.</li>
403 <li>Fix unfused loads of float fields.</li>
404 <li>Fix <tt>ffi.string()</tt> recording.</li>
405 <li>Save <tt>GetLastError()</tt> around <tt>ffi.load()</tt> and symbol
406 resolving, too.</li>
407 <li>Improve ld script detection in <tt>ffi.load()</tt>.</li>
408 <li>Record loads/stores to external variables in namespaces.</li>
409 <li>Compile calls to stdcall, fastcall and vararg functions.</li>
410 <li>Treat function ctypes like pointers in comparisons.</li>
411 <li>Resolve <tt>__call</tt> metamethod for pointers, too.</li>
412 <li>Record C function calls with bool return values.</li>
413 <li>Record <tt>ffi.errno()</tt>.</li>
414 <li>x86: Fix number to <tt>uint32_t</tt> conversion rounding.</li>
415 <li>x86: Fix 64 bit arithmetic in assembler backend.</li>
416 <li>x64: Fix struct-by-value calling conventions.</li>
417 <li>ARM: Ensure invocation of SPLIT pass for float conversions.</li>
418 </ul></li>
419 <li>Structural and performance enhancements:
420 <ul>
421 <li>Display trace types with <tt>-jv</tt> and <tt>-jdump</tt>.</li>
422 <li>Record isolated calls. But prefer recording loops over calls.</li>
423 <li>Specialize to prototype for non-monomorphic functions. Solves the
424 trace-explosion problem for closure-heavy programming styles.</li>
425 <li>Always generate a portable <tt>vmdef.lua</tt>. Easier for distros.</li>
426 </ul></li>
427 </ul>
429 <h2 id="LuaJIT-2.0.0-beta8">LuaJIT 2.0.0-beta8 &mdash; 2011-06-23</h2>
430 <ul>
431 <li>New features:
432 <ul>
433 <li>Soft-float ARM port of LuaJIT is complete.</li>
434 <li>Add support for bytecode loading/saving and <tt>-b</tt> command line
435 option.</li>
436 <li>From Lua 5.2: <tt>__len</tt> metamethod for tables
437 (disabled by default).</li>
438 </ul></li>
439 <li>Correctness and completeness:
440 <ul>
441 <li>ARM: Misc. fixes for interpreter.</li>
442 <li>x86/x64: Fix <tt>bit.*</tt> argument checking in interpreter.</li>
443 <li>Catch early out-of-memory in memory allocator initialization.</li>
444 <li>Fix data-flow analysis for paths leading to an upvalue close.</li>
445 <li>Fix check for missing arguments in <tt>string.format()</tt>.</li>
446 <li>Fix Solaris/x86 build (note: not a supported target).</li>
447 <li>Fix recording of loops with instable directions in side traces.</li>
448 <li>x86/x64: Fix fusion of comparisons with <tt>u8</tt>/<tt>u16</tt>
449 <tt>XLOAD</tt>.</li>
450 <li>x86/x64: Fix register allocation for variable shifts.</li>
451 </ul></li>
452 <li>FFI library:
453 <ul>
454 <li>Add <tt>ffi.errno()</tt>. Save <tt>errno</tt>/<tt>GetLastError()</tt>
455 around allocations etc.</li>
456 <li>Fix <tt>__gc</tt> for VLA/VLS cdata objects.</li>
457 <li>Fix recording of casts from 32 bit cdata pointers to integers.</li>
458 <li><tt>tonumber(cdata)</tt> returns <tt>nil</tt> for non-numbers.</li>
459 <li>Show address pointed to for <tt>tostring(pointer)</tt>.</li>
460 <li>Print <tt>NULL</tt> pointers as <tt>"cdata&lt;... *&gt;: NULL"</tt>.</li>
461 <li>Support <tt>__tostring</tt> metamethod for pointers to structs, too.</li>
462 </ul></li>
463 <li>Structural and performance enhancements:
464 <ul>
465 <li>More tuning for loop unrolling heuristics.</li>
466 <li>Flatten and compress in-memory debug info (saves ~70%).</li>
467 </ul></li>
468 </ul>
470 <h2 id="LuaJIT-2.0.0-beta7">LuaJIT 2.0.0-beta7 &mdash; 2011-05-05</h2>
471 <ul>
472 <li>New features:
473 <ul>
474 <li>ARM port of the LuaJIT interpreter is complete.</li>
475 <li>FFI library: Add <tt>ffi.gc()</tt>, <tt>ffi.metatype()</tt>,
476 <tt>ffi.istype()</tt>.</li>
477 <li>FFI library: Resolve ld script redirection in <tt>ffi.load()</tt>.</li>
478 <li>From Lua 5.2: <tt>package.searchpath()</tt>, <tt>fp:read("*L")</tt>,
479 <tt>load(string)</tt>.</li>
480 <li>From Lua 5.2, disabled by default: empty statement,
481 <tt>table.unpack()</tt>, modified <tt>coroutine.running()</tt>.</li>
482 </ul></li>
483 <li>Correctness and completeness:
484 <ul>
485 <li>FFI library: numerous fixes.</li>
486 <li>Fix type mismatches in store-to-load forwarding.</li>
487 <li>Fix error handling within metamethods.</li>
488 <li>Fix <tt>table.maxn()</tt>.</li>
489 <li>Improve accuracy of <tt>x^-k</tt> on x64.</li>
490 <li>Fix code generation for Intel Atom in x64 mode.</li>
491 <li>Fix narrowing of POW.</li>
492 <li>Fix recording of retried fast functions.</li>
493 <li>Fix code generation for <tt>bit.bnot()</tt> and multiplies.</li>
494 <li>Fix error location within cpcall frames.</li>
495 <li>Add workaround for old libgcc unwind bug.</li>
496 <li>Fix <tt>lua_yield()</tt> and <tt>getmetatable(lightuserdata)</tt> on x64.</li>
497 <li>Misc. fixes for PPC/e500 interpreter.</li>
498 <li>Fix stack slot updates for down-recursion.</li>
499 </ul></li>
500 <li>Structural and performance enhancements:
501 <ul>
502 <li>Add dual-number mode (int/double) for the VM. Enabled for ARM.</li>
503 <li>Improve narrowing of arithmetic operators and <tt>for</tt> loops.</li>
504 <li>Tune loop unrolling heuristics and increase trace recorder limits.</li>
505 <li>Eliminate dead slots in snapshots using bytecode data-flow analysis.</li>
506 <li>Avoid phantom stores to proxy tables.</li>
507 <li>Optimize lookups in empty proxy tables.</li>
508 <li>Improve bytecode optimization of <tt>and</tt>/<tt>or</tt> operators.</li>
509 </ul></li>
510 </ul>
512 <h2 id="LuaJIT-2.0.0-beta6">LuaJIT 2.0.0-beta6 &mdash; 2011-02-11</h2>
513 <ul>
514 <li>New features:
515 <ul>
516 <li>PowerPC/e500v2 port of the LuaJIT interpreter is complete.</li>
517 <li>Various minor features from Lua 5.2: Hex escapes in literals,
518 <tt>'\*'</tt> escape, reversible <tt>string.format("%q",s)</tt>,
519 <tt>"%g"</tt> pattern, <tt>table.sort</tt> checks callbacks,
520 <tt>os.exit(status|true|false[,close])</tt>.</li>
521 <li>Lua 5.2 <tt>__pairs</tt> and <tt>__ipairs</tt> metamethods
522 (disabled by default).</li>
523 <li>Initial release of the FFI library.</li>
524 </ul></li>
525 <li>Correctness and completeness:
526 <ul>
527 <li>Fix <tt>string.format()</tt> for non-finite numbers.</li>
528 <li>Fix memory leak when compiled to use the built-in allocator.</li>
529 <li>x86/x64: Fix unnecessary resize in <tt>TSETM</tt> bytecode.</li>
530 <li>Fix various GC issues with traces and <tt>jit.flush()</tt>.</li>
531 <li>x64: Fix fusion of indexes for array references.</li>
532 <li>x86/x64: Fix stack overflow handling for coroutine results.</li>
533 <li>Enable low-2GB memory allocation on FreeBSD/x64.</li>
534 <li>Fix <tt>collectgarbage("count")</tt> result if more than 2GB is in use.</li>
535 <li>Fix parsing of hex floats.</li>
536 <li>x86/x64: Fix loop branch inversion with trailing
537 <tt>HREF+NE/EQ</tt>.</li>
538 <li>Add <tt>jit.os</tt> string.</li>
539 <li><tt>coroutine.create()</tt> permits running C functions, too.</li>
540 <li>Fix OSX build to work with newer ld64 versions.</li>
541 <li>Fix bytecode optimization of <tt>and</tt>/<tt>or</tt> operators.</li>
542 </ul></li>
543 <li>Structural and performance enhancements:
544 <ul>
545 <li>Emit specialized bytecode for <tt>pairs()</tt>/<tt>next()</tt>.</li>
546 <li>Improve bytecode coalescing of <tt>nil</tt> constants.</li>
547 <li>Compile calls to vararg functions.</li>
548 <li>Compile <tt>select()</tt>.</li>
549 <li>Improve alias analysis, esp. for loads from allocations.</li>
550 <li>Tuning of various compiler heuristics.</li>
551 <li>Refactor and extend IR conversion instructions.</li>
552 <li>x86/x64: Various backend enhancements related to the FFI.</li>
553 <li>Add SPLIT pass to split 64 bit IR instructions for 32 bit CPUs.</li>
554 </ul></li>
555 </ul>
557 <h2 id="LuaJIT-2.0.0-beta5">LuaJIT 2.0.0-beta5 &mdash; 2010-08-24</h2>
558 <ul>
559 <li>Correctness and completeness:
560 <ul>
561 <li>Fix trace exit dispatch to function headers.</li>
562 <li>Fix Windows and OSX builds with LUAJIT_DISABLE_JIT.</li>
563 <li>Reorganize and fix placement of generated machine code on x64.</li>
564 <li>Fix TNEW in x64 interpreter.</li>
565 <li>Do not eliminate PHIs for values only referenced from side exits.</li>
566 <li>OS-independent canonicalization of strings for non-finite numbers.</li>
567 <li>Fix <tt>string.char()</tt> range check on x64.</li>
568 <li>Fix <tt>tostring()</tt> resolving within <tt>print()</tt>.</li>
569 <li>Fix error handling for <tt>next()</tt>.</li>
570 <li>Fix passing of constant arguments to external calls on x64.</li>
571 <li>Fix interpreter argument check for two-argument SSE math functions.</li>
572 <li>Fix C frame chain corruption caused by <tt>lua_cpcall()</tt>.</li>
573 <li>Fix return from <tt>pcall()</tt> within active hook.</li>
574 </ul></li>
575 <li>Structural and performance enhancements:
576 <ul>
577 <li>Replace on-trace GC frame syncing with interpreter exit.</li>
578 <li>Improve hash lookup specialization by not removing dead keys during GC.</li>
579 <li>Turn traces into true GC objects.</li>
580 <li>Avoid starting a GC cycle immediately after library init.</li>
581 <li>Add weak guards to improve dead-code elimination.</li>
582 <li>Speed up string interning.</li>
583 </ul></li>
584 </ul>
586 <h2 id="LuaJIT-2.0.0-beta4">LuaJIT 2.0.0-beta4 &mdash; 2010-03-28</h2>
587 <ul>
588 <li>Correctness and completeness:
589 <ul>
590 <li>Fix precondition for on-trace creation of table keys.</li>
591 <li>Fix <tt>{f()}</tt> on x64 when table is resized.</li>
592 <li>Fix folding of ordered comparisons with same references.</li>
593 <li>Fix snapshot restores for multi-result bytecodes.</li>
594 <li>Fix potential hang when recording bytecode with nested closures.</li>
595 <li>Fix recording of <tt>getmetatable()</tt>, <tt>tonumber()</tt> and bad argument types.</li>
596 <li>Fix SLOAD fusion across returns to lower frames.</li>
597 </ul></li>
598 <li>Structural and performance enhancements:
599 <ul>
600 <li>Add array bounds check elimination. <tt>-Oabc</tt> is enabled by default.</li>
601 <li>More tuning for x64, e.g. smaller table objects.</li>
602 </ul></li>
603 </ul>
605 <h2 id="LuaJIT-2.0.0-beta3">LuaJIT 2.0.0-beta3 &mdash; 2010-03-07</h2>
606 <ul>
607 <li>LuaJIT x64 port:
608 <ul>
609 <li>Port integrated memory allocator to Linux/x64, Windows/x64 and OSX/x64.</li>
610 <li>Port interpreter and JIT compiler to x64.</li>
611 <li>Port DynASM to x64.</li>
612 <li>Many 32/64 bit cleanups in the VM.</li>
613 <li>Allow building the interpreter with either x87 or SSE2 arithmetics.</li>
614 <li>Add external unwinding and C++ exception interop (default on x64).</li>
615 </ul></li>
616 <li>Correctness and completeness:
617 <ul>
618 <li>Fix constructor bytecode generation for certain conditional values.</li>
619 <li>Fix some cases of ordered string comparisons.</li>
620 <li>Fix <tt>lua_tocfunction()</tt>.</li>
621 <li>Fix cutoff register in JMP bytecode for some conditional expressions.</li>
622 <li>Fix PHI marking algorithm for references from variant slots.</li>
623 <li>Fix <tt>package.cpath</tt> for non-default PREFIX.</li>
624 <li>Fix DWARF2 frame unwind information for interpreter on OSX.</li>
625 <li>Drive the GC forward on string allocations in the parser.</li>
626 <li>Implement call/return hooks (zero-cost if disabled).</li>
627 <li>Implement yield from C hooks.</li>
628 <li>Disable JIT compiler on older non-SSE2 CPUs instead of aborting.</li>
629 </ul></li>
630 <li>Structural and performance enhancements:
631 <ul>
632 <li>Compile recursive code (tail-, up- and down-recursion).</li>
633 <li>Improve heuristics for bytecode penalties and blacklisting.</li>
634 <li>Split CALL/FUNC recording and clean up fast function call semantics.</li>
635 <li>Major redesign of internal function call handling.</li>
636 <li>Improve FOR loop const specialization and integerness checks.</li>
637 <li>Switch to pre-initialized stacks. Avoid frame-clearing.</li>
638 <li>Colocation of prototypes and related data: bytecode, constants, debug info.</li>
639 <li>Cleanup parser and streamline bytecode generation.</li>
640 <li>Add support for weak IR references to register allocator.</li>
641 <li>Switch to compressed, extensible snapshots.</li>
642 <li>Compile returns to frames below the start frame.</li>
643 <li>Improve alias analysis of upvalues using a disambiguation hash value.</li>
644 <li>Compile floor/ceil/trunc to SSE2 helper calls or SSE4.1 instructions.</li>
645 <li>Add generic C call handling to IR and backend.</li>
646 <li>Improve KNUM fuse vs. load heuristics.</li>
647 <li>Compile various <tt>io.*()</tt> functions.</li>
648 <li>Compile <tt>math.sinh()</tt>, <tt>math.cosh()</tt>, <tt>math.tanh()</tt>
649 and <tt>math.random()</tt>.</li>
650 </ul></li>
651 </ul>
653 <h2 id="LuaJIT-2.0.0-beta2">LuaJIT 2.0.0-beta2 &mdash; 2009-11-09</h2>
654 <ul>
655 <li>Reorganize build system. Build static+shared library on POSIX.</li>
656 <li>Allow C++ exception conversion on all platforms
657 using a wrapper function.</li>
658 <li>Automatically catch C++ exceptions and rethrow Lua error
659 (DWARF2 only).</li>
660 <li>Check for the correct x87 FPU precision at strategic points.</li>
661 <li>Always use wrappers for libm functions.</li>
662 <li>Resurrect metamethod name strings before copying them.</li>
663 <li>Mark current trace, even if compiler is idle.</li>
664 <li>Ensure FILE metatable is created only once.</li>
665 <li>Fix type comparisons when different integer types are involved.</li>
666 <li>Fix <tt>getmetatable()</tt> recording.</li>
667 <li>Fix TDUP with dead keys in template table.</li>
668 <li><tt>jit.flush(tr)</tt> returns status.
669 Prevent manual flush of a trace that's still linked.</li>
670 <li>Improve register allocation heuristics for invariant references.</li>
671 <li>Compile the push/pop variants of <tt>table.insert()</tt> and
672 <tt>table.remove()</tt>.</li>
673 <li>Compatibility with MSVC <tt>link&nbsp/debug</tt>.</li>
674 <li>Fix <tt>lua_iscfunction()</tt>.</li>
675 <li>Fix <tt>math.random()</tt> when compiled with <tt>-fpic</tt> (OSX).</li>
676 <li>Fix <tt>table.maxn()</tt>.</li>
677 <li>Bump <tt>MACOSX_DEPLOYMENT_TARGET</tt> to <tt>10.4</tt></li>
678 <li><tt>luaL_check*()</tt> and <tt>luaL_opt*()</tt> now support
679 negative arguments, too.<br>
680 This matches the behavior of Lua 5.1, but not the specification.</li>
681 </ul>
683 <h2 id="LuaJIT-2.0.0-beta1">LuaJIT 2.0.0-beta1 &mdash; 2009-10-31</h2>
684 <ul>
685 <li>This is the first public release of LuaJIT 2.0.</li>
686 <li>The whole VM has been rewritten from the ground up, so there's
687 no point in listing differences over earlier versions.</li>
688 </ul>
689 </div>
691 <div class="major" style="background: #ffff80;">
692 <h2 id="LuaJIT-1.1.8">LuaJIT 1.1.8 &mdash; 2012-04-16</h2>
693 <ul>
694 <li>Merged with Lua 5.1.5. Also integrated fixes for all
695 <a href="http://www.lua.org/bugs.html#5.1.5"><span class="ext">&raquo;</span>&nbsp;<span class="ext">&raquo;</span>&nbsp;currently known bugs in Lua 5.1.5</a>.</li>
696 </ul>
698 <h2 id="LuaJIT-1.1.7">LuaJIT 1.1.7 &mdash; 2011-05-05</h2>
699 <ul>
700 <li>Added fixes for the
701 <a href="http://www.lua.org/bugs.html#5.1.4"><span class="ext">&raquo;</span>&nbsp;currently known bugs in Lua 5.1.4</a>.</li>
702 </ul>
704 <h2 id="LuaJIT-1.1.6">LuaJIT 1.1.6 &mdash; 2010-03-28</h2>
705 <ul>
706 <li>Added fixes for the
707 <a href="http://www.lua.org/bugs.html#5.1.4"><span class="ext">&raquo;</span>&nbsp;currently known bugs in Lua 5.1.4</a>.</li>
708 <li>Removed wrong GC check in <tt>jit_createstate()</tt>.
709 Thanks to Tim Mensch.</li>
710 <li>Fixed bad assertions while compiling <tt>table.insert()</tt> and
711 <tt>table.remove()</tt>.</li>
712 </ul>
714 <h2 id="LuaJIT-1.1.5">LuaJIT 1.1.5 &mdash; 2008-10-25</h2>
715 <ul>
716 <li>Merged with Lua 5.1.4. Fixes all
717 <a href="http://www.lua.org/bugs.html#5.1.3"><span class="ext">&raquo;</span>&nbsp;known bugs in Lua 5.1.3</a>.</li>
718 </ul>
720 <h2 id="LuaJIT-1.1.4">LuaJIT 1.1.4 &mdash; 2008-02-05</h2>
721 <ul>
722 <li>Merged with Lua 5.1.3. Fixes all
723 <a href="http://www.lua.org/bugs.html#5.1.2"><span class="ext">&raquo;</span>&nbsp;known bugs in Lua 5.1.2</a>.</li>
724 <li>Fixed possible (but unlikely) stack corruption while compiling
725 <tt>k^x</tt> expressions.</li>
726 <li>Fixed DynASM template for cmpss instruction.</li>
727 </ul>
729 <h2 id="LuaJIT-1.1.3">LuaJIT 1.1.3 &mdash; 2007-05-24</h2>
730 <ul>
731 <li>Merged with Lua 5.1.2. Fixes all
732 <a href="http://www.lua.org/bugs.html#5.1.1"><span class="ext">&raquo;</span>&nbsp;known bugs in Lua 5.1.1</a>.</li>
733 <li>Merged pending Lua 5.1.x fixes: "return -nil" bug, spurious count hook call.</li>
734 <li>Remove a (sometimes) wrong assertion in <tt>luaJIT_findpc()</tt>.</li>
735 <li>DynASM now allows labels for displacements and <tt>.aword</tt>.</li>
736 <li>Fix some compiler warnings for DynASM glue (internal API change).</li>
737 <li>Correct naming for SSSE3 (temporarily known as SSE4) in DynASM and x86 disassembler.</li>
738 <li>The loadable debug modules now handle redirection to stdout
739 (e.g. <tt>-j&nbsp;trace=-</tt>).</li>
740 </ul>
742 <h2 id="LuaJIT-1.1.2">LuaJIT 1.1.2 &mdash; 2006-06-24</h2>
743 <ul>
744 <li>Fix MSVC inline assembly: use only local variables with
745 <tt>lua_number2int()</tt>.</li>
746 <li>Fix "attempt to call a thread value" bug on Mac OS X:
747 make values of consts used as lightuserdata keys unique
748 to avoid joining by the compiler/linker.</li>
749 </ul>
751 <h2 id="LuaJIT-1.1.1">LuaJIT 1.1.1 &mdash; 2006-06-20</h2>
752 <ul>
753 <li>Merged with Lua 5.1.1. Fixes all
754 <a href="http://www.lua.org/bugs.html#5.1"><span class="ext">&raquo;</span>&nbsp;known bugs in Lua 5.1</a>.</li>
755 <li>Enforce (dynamic) linker error for EXE/DLL version mismatches.</li>
756 <li>Minor changes to DynASM: faster pre-processing, smaller encoding
757 for some immediates.</li>
758 </ul>
760 This release is in sync with Coco 1.1.1 (see the
761 <a href="http://coco.luajit.org/changes.html"><span class="ext">&raquo;</span>&nbsp;Coco Change History</a>).
762 </p>
764 <h2 id="LuaJIT-1.1.0">LuaJIT 1.1.0 &mdash; 2006-03-13</h2>
765 <ul>
766 <li>Merged with Lua 5.1 (final).</li>
768 <li>New JIT call frame setup:
769 <ul>
770 <li>The C stack is kept 16 byte aligned (faster).
771 Mandatory for Mac OS X on Intel, too.</li>
772 <li>Faster calling conventions for internal C helper functions.</li>
773 <li>Better instruction scheduling for function prologue, OP_CALL and
774 OP_RETURN.</li>
775 </ul></li>
777 <li>Miscellaneous optimizations:
778 <ul>
779 <li>Faster loads of FP constants. Remove narrow-to-wide store-to-load
780 forwarding stalls.</li>
781 <li>Use (scalar) SSE2 ops (if the CPU supports it) to speed up slot moves
782 and FP to integer conversions.</li>
783 <li>Optimized the two-argument form of <tt>OP_CONCAT</tt> (<tt>a..b</tt>).</li>
784 <li>Inlined <tt>OP_MOD</tt> (<tt>a%b</tt>).
785 With better accuracy than the C variant, too.</li>
786 <li>Inlined <tt>OP_POW</tt> (<tt>a^b</tt>). Unroll <tt>x^k</tt> or
787 use <tt>k^x = 2^(log2(k)*x)</tt> or call <tt>pow()</tt>.</li>
788 </ul></li>
790 <li>Changes in the optimizer:
791 <ul>
792 <li>Improved hinting for table keys derived from table values
793 (<tt>t1[t2[x]]</tt>).</li>
794 <li>Lookup hinting now works with arbitrary object types and
795 supports index chains, too.</li>
796 <li>Generate type hints for arithmetic and comparison operators,
797 OP_LEN, OP_CONCAT and OP_FORPREP.</li>
798 <li>Remove several hint definitions in favour of a generic COMBINE hint.</li>
799 <li>Complete rewrite of <tt>jit.opt_inline</tt> module
800 (ex <tt>jit.opt_lib</tt>).</li>
801 </ul></li>
803 <li>Use adaptive deoptimization:
804 <ul>
805 <li>If runtime verification of a contract fails, the affected
806 instruction is recompiled and patched on-the-fly.
807 Regular programs will trigger deoptimization only occasionally.</li>
808 <li>This avoids generating code for uncommon fallback cases
809 most of the time. Generated code is up to 30% smaller compared to
810 LuaJIT&nbsp;1.0.3.</li>
811 <li>Deoptimization is used for many opcodes and contracts:
812 <ul>
813 <li>OP_CALL, OP_TAILCALL: type mismatch for callable.</li>
814 <li>Inlined calls: closure mismatch, parameter number and type mismatches.</li>
815 <li>OP_GETTABLE, OP_SETTABLE: table or key type and range mismatches.</li>
816 <li>All arithmetic and comparison operators, OP_LEN, OP_CONCAT,
817 OP_FORPREP: operand type and range mismatches.</li>
818 </ul></li>
819 <li>Complete redesign of the debug and traceback info
820 (bytecode &harr; mcode) to support deoptimization.
821 Much more flexible and needs only 50% of the space.</li>
822 <li>The modules <tt>jit.trace</tt>, <tt>jit.dumphints</tt> and
823 <tt>jit.dump</tt> handle deoptimization.</li>
824 </ul></li>
826 <li>Inlined many popular library functions
827 (for commonly used arguments only):
828 <ul>
829 <li>Most <tt>math.*</tt> functions (the 18 most used ones)
830 [2x-10x faster].</li>
831 <li><tt>string.len</tt>, <tt>string.sub</tt> and <tt>string.char</tt>
832 [2x-10x faster].</li>
833 <li><tt>table.insert</tt>, <tt>table.remove</tt> and <tt>table.getn</tt>
834 [3x-5x faster].</li>
835 <li><tt>coroutine.yield</tt> and <tt>coroutine.resume</tt>
836 [3x-5x faster].</li>
837 <li><tt>pairs</tt>, <tt>ipairs</tt> and the corresponding iterators
838 [8x-15x faster].</li>
839 </ul></li>
841 <li>Changes in the core and loadable modules and the stand-alone executable:
842 <ul>
843 <li>Added <tt>jit.version</tt>, <tt>jit.version_num</tt>
844 and <tt>jit.arch</tt>.</li>
845 <li>Reorganized some internal API functions (<tt>jit.util.*mcode*</tt>).</li>
846 <li>The <tt>-j dump</tt> output now shows JSUB names, too.</li>
847 <li>New x86 disassembler module written in pure Lua. No dependency
848 on ndisasm anymore. Flexible API, very compact (500 lines)
849 and complete (x87, MMX, SSE, SSE2, SSE3, SSSE3, privileged instructions).</li>
850 <li><tt>luajit -v</tt> prints the LuaJIT version and copyright
851 on a separate line.</li>
852 </ul></li>
854 <li>Added SSE, SSE2, SSE3 and SSSE3 support to DynASM.</li>
855 <li>Miscellaneous doc changes. Added a section about
856 <a href="install.html#embedding">embedding LuaJIT</a>.</li>
857 </ul>
859 This release is in sync with Coco 1.1.0 (see the
860 <a href="http://coco.luajit.org/changes.html"><span class="ext">&raquo;</span>&nbsp;Coco Change History</a>).
861 </p>
862 </div>
864 <div class="major" style="background: #ffffd0;">
865 <h2 id="LuaJIT-1.0.3">LuaJIT 1.0.3 &mdash; 2005-09-08</h2>
866 <ul>
867 <li>Even more docs.</li>
868 <li>Unified closure checks in <tt>jit.*</tt>.</li>
869 <li>Fixed some range checks in <tt>jit.util.*</tt>.</li>
870 <li>Fixed __newindex call originating from <tt>jit_settable_str()</tt>.</li>
871 <li>Merged with Lua 5.1 alpha (including early bug fixes).</li>
872 </ul>
874 This is the first public release of LuaJIT.
875 </p>
877 <h2 id="LuaJIT-1.0.2">LuaJIT 1.0.2 &mdash; 2005-09-02</h2>
878 <ul>
879 <li>Add support for flushing the Valgrind translation cache <br>
880 (<tt>MYCFLAGS= -DUSE_VALGRIND</tt>).</li>
881 <li>Add support for freeing executable mcode memory to the <tt>mmap()</tt>-based
882 variant for POSIX systems.</li>
883 <li>Reorganized the C&nbsp;function signature handling in
884 <tt>jit.opt_lib</tt>.</li>
885 <li>Changed to index-based hints for inlining C&nbsp;functions.
886 Still no support in the backend for inlining.</li>
887 <li>Hardcode <tt>HEAP_CREATE_ENABLE_EXECUTE</tt> value if undefined.</li>
888 <li>Misc. changes to the <tt>jit.*</tt> modules.</li>
889 <li>Misc. changes to the Makefiles.</li>
890 <li>Lots of new docs.</li>
891 <li>Complete doc reorg.</li>
892 </ul>
894 Not released because Lua 5.1 alpha came out today.
895 </p>
897 <h2 id="LuaJIT-1.0.1">LuaJIT 1.0.1 &mdash; 2005-08-31</h2>
898 <ul>
899 <li>Missing GC step in <tt>OP_CONCAT</tt>.</li>
900 <li>Fix result handling for C &ndash;> JIT calls.</li>
901 <li>Detect CPU feature bits.</li>
902 <li>Encode conditional moves (<tt>fucomip</tt>) only when supported.</li>
903 <li>Add fallback instructions for FP compares.</li>
904 <li>Add support for <tt>LUA_COMPAT_VARARG</tt>. Still disabled by default.</li>
905 <li>MSVC needs a specific place for the <tt>CALLBACK</tt> attribute
906 (David Burgess).</li>
907 <li>Misc. doc updates.</li>
908 </ul>
910 Interim non-public release.
911 Special thanks to Adam D. Moss for reporting most of the bugs.
912 </p>
914 <h2 id="LuaJIT-1.0.0">LuaJIT 1.0.0 &mdash; 2005-08-29</h2>
916 This is the initial non-public release of LuaJIT.
917 </p>
918 </div>
919 <br class="flush">
920 </div>
921 <div id="foot">
922 <hr class="hide">
923 Copyright &copy; 2005-2014 Mike Pall
924 <span class="noprint">
925 &middot;
926 <a href="contact.html">Contact</a>
927 </span>
928 </div>
929 </body>
930 </html>