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