1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
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-2011, 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; }
17 <a href=
"http://luajit.org"><span>Lua
<span id=
"logo">JIT
</span></span></a>
20 <h1>LuaJIT Change History
</h1>
24 <a href=
"luajit.html">LuaJIT
</a>
26 <a href=
"install.html">Installation
</a>
28 <a href=
"running.html">Running
</a>
31 <a href=
"extensions.html">Extensions
</a>
33 <a href=
"ext_ffi.html">FFI Library
</a>
35 <a href=
"ext_ffi_tutorial.html">FFI Tutorial
</a>
37 <a href=
"ext_ffi_api.html">ffi.* API
</a>
39 <a href=
"ext_ffi_int64.html">64 bit Integers
</a>
41 <a href=
"ext_ffi_semantics.html">FFI Semantics
</a>
44 <a href=
"ext_jit.html">jit.* Library
</a>
46 <a href=
"ext_c_api.html">Lua/C API
</a>
49 <a href=
"status.html">Status
</a>
51 <a class=
"current" href=
"changes.html">Changes
</a>
54 <a href=
"faq.html">FAQ
</a>
56 <a href=
"http://luajit.org/performance.html">Performance
<span class=
"ext">»</span></a>
58 <a href=
"http://luajit.org/download.html">Download
<span class=
"ext">»</span></a>
63 This is a list of changes between the released versions of LuaJIT.
<br>
64 The current
<span style=
"color: #c00000;">development version
</span> is
<strong>LuaJIT
2.0.0-beta5
</strong>.
<br>
65 The current
<span style=
"color: #0000c0;">stable version
</span> is
<strong>LuaJIT
1.1.6</strong>.
69 <a href=
"http://luajit.org/changes.html"><span class=
"ext">»</span> Online Change History
</a>
70 to see whether newer versions are available.
73 <div class=
"major" style=
"background: #ffd0d0;">
74 <h2 id=
"LuaJIT-2.0.0-beta5">LuaJIT
2.0.0-beta5
— 2010-
08-
24</h2>
76 <li>Correctness and completeness:
78 <li>Fix trace exit dispatch to function headers.
</li>
79 <li>Fix Windows and OSX builds with LUAJIT_DISABLE_JIT.
</li>
80 <li>Reorganize and fix placement of generated machine code on x64.
</li>
81 <li>Fix TNEW in x64 interpreter.
</li>
82 <li>Do not eliminate PHIs for values only referenced from side exits.
</li>
83 <li>OS-independent canonicalization of strings for non-finite numbers.
</li>
84 <li>Fix
<tt>string.char()
</tt> range check on x64.
</li>
85 <li>Fix
<tt>tostring()
</tt> resolving within
<tt>print()
</tt>.
</li>
86 <li>Fix error handling for
<tt>next()
</tt>.
</li>
87 <li>Fix passing of constant arguments to external calls on x64.
</li>
88 <li>Fix interpreter argument check for two-argument SSE math functions.
</li>
89 <li>Fix C frame chain corruption caused by
<tt>lua_cpcall()
</tt>.
</li>
90 <li>Fix return from
<tt>pcall()
</tt> within active hook.
</li>
92 <li>Structural and performance enhancements:
94 <li>Replace on-trace GC frame syncing with interpreter exit.
</li>
95 <li>Improve hash lookup specialization by not removing dead keys during GC.
</li>
96 <li>Turn traces into true GC objects.
</li>
97 <li>Avoid starting a GC cycle immediately after library init.
</li>
98 <li>Add weak guards to improve dead-code elimination.
</li>
99 <li>Speed up string interning.
</li>
103 <h2 id=
"LuaJIT-2.0.0-beta4">LuaJIT
2.0.0-beta4
— 2010-
03-
28</h2>
105 <li>Correctness and completeness:
107 <li>Fix precondition for on-trace creation of table keys.
</li>
108 <li>Fix
<tt>{f()}
</tt> on x64 when table is resized.
</li>
109 <li>Fix folding of ordered comparisons with same references.
</li>
110 <li>Fix snapshot restores for multi-result bytecodes.
</li>
111 <li>Fix potential hang when recording bytecode with nested closures.
</li>
112 <li>Fix recording of
<tt>getmetatable()
</tt>,
<tt>tonumber()
</tt> and bad argument types.
</li>
113 <li>Fix SLOAD fusion across returns to lower frames.
</li>
115 <li>Structural and performance enhancements:
117 <li>Add array bounds check elimination.
<tt>-Oabc
</tt> is enabled by default.
</li>
118 <li>More tuning for x64, e.g. smaller table objects.
</li>
122 <h2 id=
"LuaJIT-2.0.0-beta3">LuaJIT
2.0.0-beta3
— 2010-
03-
07</h2>
124 <li>LuaJIT x64 port:
</li>
126 <li>Port integrated memory allocator to Linux/x64, Windows/x64 and OSX/x64.
</li>
127 <li>Port interpreter and JIT compiler to x64.
</li>
128 <li>Port DynASM to x64.
</li>
129 <li>Many
32/
64 bit cleanups in the VM.
</li>
130 <li>Allow building the interpreter with either x87 or SSE2 arithmetics.
</li>
131 <li>Add external unwinding and C++ exception interop (default on x64).
</li>
133 <li>Correctness and completeness:
135 <li>Fix constructor bytecode generation for certain conditional values.
</li>
136 <li>Fix some cases of ordered string comparisons.
</li>
137 <li>Fix
<tt>lua_tocfunction()
</tt>.
</li>
138 <li>Fix cutoff register in JMP bytecode for some conditional expressions.
</li>
139 <li>Fix PHI marking algorithm for references from variant slots.
</li>
140 <li>Fix
<tt>package.cpath
</tt> for non-default PREFIX.
</li>
141 <li>Fix DWARF2 frame unwind information for interpreter on OSX.
</li>
142 <li>Drive the GC forward on string allocations in the parser.
</li>
143 <li>Implement call/return hooks (zero-cost if disabled).
</li>
144 <li>Implement yield from C hooks.
</li>
145 <li>Disable JIT compiler on older non-SSE2 CPUs instead of aborting.
</li>
147 <li>Structural and performance enhancements:
149 <li>Compile recursive code (tail-, up- and down-recursion).
</li>
150 <li>Improve heuristics for bytecode penalties and blacklisting.
</li>
151 <li>Split CALL/FUNC recording and clean up fast function call semantics.
</li>
152 <li>Major redesign of internal function call handling.
</li>
153 <li>Improve FOR loop const specialization and integerness checks.
</li>
154 <li>Switch to pre-initialized stacks. Avoid frame-clearing.
</li>
155 <li>Colocation of prototypes and related data: bytecode, constants, debug info.
</li>
156 <li>Cleanup parser and streamline bytecode generation.
</li>
157 <li>Add support for weak IR references to register allocator.
</li>
158 <li>Switch to compressed, extensible snapshots.
</li>
159 <li>Compile returns to frames below the start frame.
</li>
160 <li>Improve alias analysis of upvalues using a disambiguation hash value.
</li>
161 <li>Compile floor/ceil/trunc to SSE2 helper calls or SSE4.1 instructions.
</li>
162 <li>Add generic C call handling to IR and backend.
</li>
163 <li>Improve KNUM fuse vs. load heuristics.
</li>
164 <li>Compile various
<tt>io.*()
</tt> functions.
</li>
165 <li>Compile
<tt>math.sinh()
</tt>,
<tt>math.cosh()
</tt>,
<tt>math.tanh()
</tt>
166 and
<tt>math.random()
</tt>.
</li>
170 <h2 id=
"LuaJIT-2.0.0-beta2">LuaJIT
2.0.0-beta2
— 2009-
11-
09</h2>
172 <li>Reorganize build system. Build static+shared library on POSIX.
</li>
173 <li>Allow C++ exception conversion on all platforms
174 using a wrapper function.
</li>
175 <li>Automatically catch C++ exceptions and rethrow Lua error
177 <li>Check for the correct x87 FPU precision at strategic points.
</li>
178 <li>Always use wrappers for libm functions.
</li>
179 <li>Resurrect metamethod name strings before copying them.
</li>
180 <li>Mark current trace, even if compiler is idle.
</li>
181 <li>Ensure FILE metatable is created only once.
</li>
182 <li>Fix type comparisons when different integer types are involved.
</li>
183 <li>Fix
<tt>getmetatable()
</tt> recording.
</li>
184 <li>Fix TDUP with dead keys in template table.
</li>
185 <li><tt>jit.flush(tr)
</tt> returns status.
186 Prevent manual flush of a trace that's still linked.
</li>
187 <li>Improve register allocation heuristics for invariant references.
</li>
188 <li>Compile the push/pop variants of
<tt>table.insert()
</tt> and
189 <tt>table.remove()
</tt>.
</li>
190 <li>Compatibility with MSVC
<tt>link /debug
</tt>.
</li>
191 <li>Fix
<tt>lua_iscfunction()
</tt>.
</li>
192 <li>Fix
<tt>math.random()
</tt> when compiled with
<tt>-fpic
</tt> (OSX).
</li>
193 <li>Fix
<tt>table.maxn()
</tt>.
</li>
194 <li>Bump
<tt>MACOSX_DEPLOYMENT_TARGET
</tt> to
<tt>10.4</tt></li>
195 <li><tt>luaL_check*()
</tt> and
<tt>luaL_opt*()
</tt> now support
196 negative arguments, too.
<br>
197 This matches the behavior of Lua
5.1, but not the specification.
</li>
200 <h2 id=
"LuaJIT-2.0.0-beta1">LuaJIT
2.0.0-beta1
— 2009-
10-
31</h2>
202 <li>This is the first public release of LuaJIT
2.0.
</li>
203 <li>The whole VM has been rewritten from the ground up, so there's
204 no point in listing differences over earlier versions.
</li>
208 <div class=
"major" style=
"background: #d0d0ff;">
209 <h2 id=
"LuaJIT-1.1.6">LuaJIT
1.1.6 — 2010-
03-
28</h2>
211 <li>Added fixes for the
212 <a href=
"http://www.lua.org/bugs.html#5.1.4"><span class=
"ext">»</span> currently known bugs in Lua
5.1.4</a>.
</li>
213 <li>Removed wrong GC check in
<tt>jit_createstate()
</tt>.
214 Thanks to Tim Mensch.
</li>
215 <li>Fixed bad assertions while compiling
<tt>table.insert()
</tt> and
216 <tt>table.remove()
</tt>.
</li>
219 <h2 id=
"LuaJIT-1.1.5">LuaJIT
1.1.5 — 2008-
10-
25</h2>
221 <li>Merged with Lua
5.1.4. Fixes all
222 <a href=
"http://www.lua.org/bugs.html#5.1.3"><span class=
"ext">»</span> known bugs in Lua
5.1.3</a>.
</li>
225 <h2 id=
"LuaJIT-1.1.4">LuaJIT
1.1.4 — 2008-
02-
05</h2>
227 <li>Merged with Lua
5.1.3. Fixes all
228 <a href=
"http://www.lua.org/bugs.html#5.1.2"><span class=
"ext">»</span> known bugs in Lua
5.1.2</a>.
</li>
229 <li>Fixed possible (but unlikely) stack corruption while compiling
230 <tt>k^x
</tt> expressions.
</li>
231 <li>Fixed DynASM template for cmpss instruction.
</li>
234 <h2 id=
"LuaJIT-1.1.3">LuaJIT
1.1.3 — 2007-
05-
24</h2>
236 <li>Merged with Lua
5.1.2. Fixes all
237 <a href=
"http://www.lua.org/bugs.html#5.1.1"><span class=
"ext">»</span> known bugs in Lua
5.1.1</a>.
</li>
238 <li>Merged pending Lua
5.1.x fixes:
"return -nil" bug, spurious count hook call.
</li>
239 <li>Remove a (sometimes) wrong assertion in
<tt>luaJIT_findpc()
</tt>.
</li>
240 <li>DynASM now allows labels for displacements and
<tt>.aword
</tt>.
</li>
241 <li>Fix some compiler warnings for DynASM glue (internal API change).
</li>
242 <li>Correct naming for SSSE3 (temporarily known as SSE4) in DynASM and x86 disassembler.
</li>
243 <li>The loadable debug modules now handle redirection to stdout
244 (e.g.
<tt>-j
trace=-
</tt>).
</li>
247 <h2 id=
"LuaJIT-1.1.2">LuaJIT
1.1.2 — 2006-
06-
24</h2>
249 <li>Fix MSVC inline assembly: use only local variables with
250 <tt>lua_number2int()
</tt>.
</li>
251 <li>Fix
"attempt to call a thread value" bug on Mac OS X:
252 make values of consts used as lightuserdata keys unique
253 to avoid joining by the compiler/linker.
</li>
256 <h2 id=
"LuaJIT-1.1.1">LuaJIT
1.1.1 — 2006-
06-
20</h2>
258 <li>Merged with Lua
5.1.1. Fixes all
259 <a href=
"http://www.lua.org/bugs.html#5.1"><span class=
"ext">»</span> known bugs in Lua
5.1</a>.
</li>
260 <li>Enforce (dynamic) linker error for EXE/DLL version mismatches.
</li>
261 <li>Minor changes to DynASM: faster preprocessing, smaller encoding
262 for some immediates.
</li>
265 This release is in sync with Coco
1.1.1 (see the
266 <a href=
"http://coco.luajit.org/changes.html"><span class=
"ext">»</span> Coco Change History
</a>).
269 <h2 id=
"LuaJIT-1.1.0">LuaJIT
1.1.0 — 2006-
03-
13</h2>
271 <li>Merged with Lua
5.1 (final).
</li>
273 <li>New JIT call frame setup:
275 <li>The C stack is kept
16 byte aligned (faster).
276 Mandatory for Mac OS X on Intel, too.
</li>
277 <li>Faster calling conventions for internal C helper functions.
</li>
278 <li>Better instruction scheduling for function prologue, OP_CALL and
282 <li>Miscellaneous optimizations:
284 <li>Faster loads of FP constants. Remove narrow-to-wide store-to-load
285 forwarding stalls.
</li>
286 <li>Use (scalar) SSE2 ops (if the CPU supports it) to speed up slot moves
287 and FP to integer conversions.
</li>
288 <li>Optimized the two-argument form of
<tt>OP_CONCAT
</tt> (
<tt>a..b
</tt>).
</li>
289 <li>Inlined
<tt>OP_MOD
</tt> (
<tt>a%b
</tt>).
290 With better accuracy than the C variant, too.
</li>
291 <li>Inlined
<tt>OP_POW
</tt> (
<tt>a^b
</tt>). Unroll
<tt>x^k
</tt> or
292 use
<tt>k^x =
2^(log2(k)*x)
</tt> or call
<tt>pow()
</tt>.
</li>
295 <li>Changes in the optimizer:
297 <li>Improved hinting for table keys derived from table values
298 (
<tt>t1[t2[x]]
</tt>).
</li>
299 <li>Lookup hinting now works with arbitrary object types and
300 supports index chains, too.
</li>
301 <li>Generate type hints for arithmetic and comparison operators,
302 OP_LEN, OP_CONCAT and OP_FORPREP.
</li>
303 <li>Remove several hint definitions in favour of a generic COMBINE hint.
</li>
304 <li>Complete rewrite of
<tt>jit.opt_inline
</tt> module
305 (ex
<tt>jit.opt_lib
</tt>).
</li>
308 <li>Use adaptive deoptimization:
310 <li>If runtime verification of a contract fails, the affected
311 instruction is recompiled and patched on-the-fly.
312 Regular programs will trigger deoptimization only occasionally.
</li>
313 <li>This avoids generating code for uncommon fallback cases
314 most of the time. Generated code is up to
30% smaller compared to
315 LuaJIT
1.0.3.
</li>
316 <li>Deoptimization is used for many opcodes and contracts:
318 <li>OP_CALL, OP_TAILCALL: type mismatch for callable.
</li>
319 <li>Inlined calls: closure mismatch, parameter number and type mismatches.
</li>
320 <li>OP_GETTABLE, OP_SETTABLE: table or key type and range mismatches.
</li>
321 <li>All arithmetic and comparison operators, OP_LEN, OP_CONCAT,
322 OP_FORPREP: operand type and range mismatches.
</li>
324 <li>Complete redesign of the debug and traceback info
325 (bytecode
↔ mcode) to support deoptimization.
326 Much more flexible and needs only
50% of the space.
</li>
327 <li>The modules
<tt>jit.trace
</tt>,
<tt>jit.dumphints
</tt> and
328 <tt>jit.dump
</tt> handle deoptimization.
</li>
331 <li>Inlined many popular library functions
332 (for commonly used arguments only):
334 <li>Most
<tt>math.*
</tt> functions (the
18 most used ones)
335 [
2x-
10x faster].
</li>
336 <li><tt>string.len
</tt>,
<tt>string.sub
</tt> and
<tt>string.char
</tt>
337 [
2x-
10x faster].
</li>
338 <li><tt>table.insert
</tt>,
<tt>table.remove
</tt> and
<tt>table.getn
</tt>
340 <li><tt>coroutine.yield
</tt> and
<tt>coroutine.resume
</tt>
342 <li><tt>pairs
</tt>,
<tt>ipairs
</tt> and the corresponding iterators
343 [
8x-
15x faster].
</li>
346 <li>Changes in the core and loadable modules and the stand-alone executable:
348 <li>Added
<tt>jit.version
</tt>,
<tt>jit.version_num
</tt>
349 and
<tt>jit.arch
</tt>.
</li>
350 <li>Reorganized some internal API functions (
<tt>jit.util.*mcode*
</tt>).
</li>
351 <li>The
<tt>-j dump
</tt> output now shows JSUB names, too.
</li>
352 <li>New x86 disassembler module written in pure Lua. No dependency
353 on ndisasm anymore. Flexible API, very compact (
500 lines)
354 and complete (x87, MMX, SSE, SSE2, SSE3, SSSE3, privileged instructions).
</li>
355 <li><tt>luajit -v
</tt> prints the LuaJIT version and copyright
356 on a separate line.
</li>
359 <li>Added SSE, SSE2, SSE3 and SSSE3 support to DynASM.
</li>
360 <li>Miscellaneous doc changes. Added a section about
361 <a href=
"install.html#embedding">embedding LuaJIT
</a>.
</li>
364 This release is in sync with Coco
1.1.0 (see the
365 <a href=
"http://coco.luajit.org/changes.html"><span class=
"ext">»</span> Coco Change History
</a>).
369 <div class=
"major" style=
"background: #ffffd0;">
370 <h2 id=
"LuaJIT-1.0.3">LuaJIT
1.0.3 — 2005-
09-
08</h2>
372 <li>Even more docs.
</li>
373 <li>Unified closure checks in
<tt>jit.*
</tt>.
</li>
374 <li>Fixed some range checks in
<tt>jit.util.*
</tt>.
</li>
375 <li>Fixed __newindex call originating from
<tt>jit_settable_str()
</tt>.
</li>
376 <li>Merged with Lua
5.1 alpha (including early bug fixes).
</li>
379 This is the first public release of LuaJIT.
382 <h2 id=
"LuaJIT-1.0.2">LuaJIT
1.0.2 — 2005-
09-
02</h2>
384 <li>Add support for flushing the Valgrind translation cache
<br>
385 (
<tt>MYCFLAGS= -DUSE_VALGRIND
</tt>).
</li>
386 <li>Add support for freeing executable mcode memory to the
<tt>mmap()
</tt>-based
387 variant for POSIX systems.
</li>
388 <li>Reorganized the C
function signature handling in
389 <tt>jit.opt_lib
</tt>.
</li>
390 <li>Changed to index-based hints for inlining C
functions.
391 Still no support in the backend for inlining.
</li>
392 <li>Hardcode
<tt>HEAP_CREATE_ENABLE_EXECUTE
</tt> value if undefined.
</li>
393 <li>Misc. changes to the
<tt>jit.*
</tt> modules.
</li>
394 <li>Misc. changes to the Makefiles.
</li>
395 <li>Lots of new docs.
</li>
396 <li>Complete doc reorg.
</li>
399 Not released because Lua
5.1 alpha came out today.
402 <h2 id=
"LuaJIT-1.0.1">LuaJIT
1.0.1 — 2005-
08-
31</h2>
404 <li>Missing GC step in
<tt>OP_CONCAT
</tt>.
</li>
405 <li>Fix result handling for C
–> JIT calls.
</li>
406 <li>Detect CPU feature bits.
</li>
407 <li>Encode conditional moves (
<tt>fucomip
</tt>) only when supported.
</li>
408 <li>Add fallback instructions for FP compares.
</li>
409 <li>Add support for
<tt>LUA_COMPAT_VARARG
</tt>. Still disabled by default.
</li>
410 <li>MSVC needs a specific place for the
<tt>CALLBACK
</tt> attribute
411 (David Burgess).
</li>
412 <li>Misc. doc updates.
</li>
415 Interim non-public release.
416 Special thanks to Adam D. Moss for reporting most of the bugs.
419 <h2 id=
"LuaJIT-1.0.0">LuaJIT
1.0.0 — 2005-
08-
29</h2>
421 This is the initial non-public release of LuaJIT.
428 Copyright
© 2005-
2011 Mike Pall
429 <span class=
"noprint">
431 <a href=
"contact.html">Contact
</a>