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