changes.html 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567
  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-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; }
  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="install.html">Installation</a>
  27. </li><li>
  28. <a href="running.html">Running</a>
  29. </li></ul>
  30. </li><li>
  31. <a href="extensions.html">Extensions</a>
  32. <ul><li>
  33. <a href="ext_ffi.html">FFI Library</a>
  34. <ul><li>
  35. <a href="ext_ffi_tutorial.html">FFI Tutorial</a>
  36. </li><li>
  37. <a href="ext_ffi_api.html">ffi.* API</a>
  38. </li><li>
  39. <a href="ext_ffi_semantics.html">FFI Semantics</a>
  40. </li></ul>
  41. </li><li>
  42. <a href="ext_jit.html">jit.* Library</a>
  43. </li><li>
  44. <a href="ext_c_api.html">Lua/C API</a>
  45. </li></ul>
  46. </li><li>
  47. <a href="status.html">Status</a>
  48. <ul><li>
  49. <a class="current" href="changes.html">Changes</a>
  50. </li></ul>
  51. </li><li>
  52. <a href="faq.html">FAQ</a>
  53. </li><li>
  54. <a href="http://luajit.org/performance.html">Performance <span class="ext">&raquo;</span></a>
  55. </li><li>
  56. <a href="http://luajit.org/download.html">Download <span class="ext">&raquo;</span></a>
  57. </li></ul>
  58. </div>
  59. <div id="main">
  60. <p>
  61. This is a list of changes between the released versions of LuaJIT.<br>
  62. The current <span style="color: #c00000;">development version</span> is <strong>LuaJIT&nbsp;2.0.0-beta8</strong>.<br>
  63. The current <span style="color: #0000c0;">stable version</span> is <strong>LuaJIT&nbsp;1.1.7</strong>.
  64. </p>
  65. <p>
  66. Please check the
  67. <a href="http://luajit.org/changes.html"><span class="ext">&raquo;</span>&nbsp;Online Change History</a>
  68. to see whether newer versions are available.
  69. </p>
  70. <div class="major" style="background: #ffd0d0;">
  71. <h2 id="LuaJIT-2.0.0-beta8">LuaJIT 2.0.0-beta8 &mdash; 2011-06-23</h2>
  72. <ul>
  73. <li>New features:
  74. <ul>
  75. <li>Soft-float ARM port of LuaJIT is complete.</li>
  76. <li>Add support for bytecode loading/saving and <tt>-b</tt> command line
  77. option.</li>
  78. <li>From Lua 5.2: <tt>__len</tt> metamethod for tables
  79. (disabled by default).</li>
  80. </ul></li>
  81. <li>Correctness and completeness:
  82. <ul>
  83. <li>ARM: Misc. fixes for interpreter.</li>
  84. <li>x86/x64: Fix <tt>bit.*</tt> argument checking in interpreter.</li>
  85. <li>Catch early out-of-memory in memory allocator initialization.</li>
  86. <li>Fix data-flow analysis for paths leading to an upvalue close.</li>
  87. <li>Fix check for missing arguments in <tt>string.format()</tt>.</li>
  88. <li>Fix Solaris/x86 build (note: not a supported target).</li>
  89. <li>Fix recording of loops with instable directions in side traces.</li>
  90. <li>x86/x64: Fix fusion of comparisons with <tt>u8</tt>/<tt>u16</tt>
  91. <tt>XLOAD</tt>.</li>
  92. <li>x86/x64: Fix register allocation for variable shifts.</li>
  93. </ul></li>
  94. <li>FFI library:
  95. <ul>
  96. <li>Add <tt>ffi.errno()</tt>. Save <tt>errno</tt>/<tt>GetLastError()</tt>
  97. around allocations etc.</li>
  98. <li>Fix <tt>__gc</tt> for VLA/VLS cdata objects.</li>
  99. <li>Fix recording of casts from 32 bit cdata pointers to integers.</li>
  100. <li><tt>tonumber(cdata)</tt> returns <tt>nil</tt> for non-numbers.</li>
  101. <li>Show address pointed to for <tt>tostring(pointer)</tt>.</li>
  102. <li>Print <tt>NULL</tt> pointers as <tt>"cdata&lt;... *&gt;: NULL"</tt>.</li>
  103. <li>Support <tt>__tostring</tt> metamethod for pointers to structs, too.</li>
  104. </ul></li>
  105. <li>Structural and performance enhancements:
  106. <ul>
  107. <li>More tuning for loop unrolling heuristics.</li>
  108. <li>Flatten and compress in-memory debug info (saves ~70%).</li>
  109. </ul></li>
  110. </ul>
  111. <h2 id="LuaJIT-2.0.0-beta7">LuaJIT 2.0.0-beta7 &mdash; 2011-05-05</h2>
  112. <ul>
  113. <li>New features:
  114. <ul>
  115. <li>ARM port of the LuaJIT interpreter is complete.</li>
  116. <li>FFI library: Add <tt>ffi.gc()</tt>, <tt>ffi.metatype()</tt>,
  117. <tt>ffi.istype()</tt>.</li>
  118. <li>FFI library: Resolve ld script redirection in <tt>ffi.load()</tt>.</li>
  119. <li>From Lua 5.2: <tt>package.searchpath()</tt>, <tt>fp:read("*L")</tt>,
  120. <tt>load(string)</tt>.</li>
  121. <li>From Lua 5.2, disabled by default: empty statement,
  122. <tt>table.unpack()</tt>, modified <tt>coroutine.running()</tt>.</li>
  123. </ul></li>
  124. <li>Correctness and completeness:
  125. <ul>
  126. <li>FFI library: numerous fixes.</li>
  127. <li>Fix type mismatches in store-to-load forwarding.</li>
  128. <li>Fix error handling within metamethods.</li>
  129. <li>Fix <tt>table.maxn()</tt>.</li>
  130. <li>Improve accuracy of <tt>x^-k</tt> on x64.</li>
  131. <li>Fix code generation for Intel Atom in x64 mode.</li>
  132. <li>Fix narrowing of POW.</li>
  133. <li>Fix recording of retried fast functions.</li>
  134. <li>Fix code generation for <tt>bit.bnot()</tt> and multiplies.</li>
  135. <li>Fix error location within cpcall frames.</li>
  136. <li>Add workaround for old libgcc unwind bug.</li>
  137. <li>Fix <tt>lua_yield()</tt> and <tt>getmetatable(lightuserdata)</tt> on x64.</li>
  138. <li>Misc. fixes for PPC/e500 interpreter.</li>
  139. <li>Fix stack slot updates for down-recursion.</li>
  140. </ul></li>
  141. <li>Structural and performance enhancements:
  142. <ul>
  143. <li>Add dual-number mode (int/double) for the VM. Enabled for ARM.</li>
  144. <li>Improve narrowing of arithmetic operators and <tt>for</tt> loops.</li>
  145. <li>Tune loop unrolling heuristics and increase trace recorder limits.</li>
  146. <li>Eliminate dead slots in snapshots using bytecode data-flow analysis.</li>
  147. <li>Avoid phantom stores to proxy tables.</li>
  148. <li>Optimize lookups in empty proxy tables.</li>
  149. <li>Improve bytecode optimization of <tt>and</tt>/<tt>or</tt> operators.</li>
  150. </ul></li>
  151. </ul>
  152. <h2 id="LuaJIT-2.0.0-beta6">LuaJIT 2.0.0-beta6 &mdash; 2011-02-11</h2>
  153. <ul>
  154. <li>New features:
  155. <ul>
  156. <li>PowerPC/e500v2 port of the LuaJIT interpreter is complete.</li>
  157. <li>Various minor features from Lua 5.2: Hex escapes in literals,
  158. <tt>'\*'</tt> escape, reversible <tt>string.format("%q",s)</tt>,
  159. <tt>"%g"</tt> pattern, <tt>table.sort</tt> checks callbacks,
  160. <tt>os.exit(status|true|false[,close])</tt>.</li>
  161. <li>Lua 5.2 <tt>__pairs</tt> and <tt>__ipairs</tt> metamethods
  162. (disabled by default).</li>
  163. <li>Initial release of the FFI library.</li>
  164. </ul></li>
  165. <li>Correctness and completeness:
  166. <ul>
  167. <li>Fix <tt>string.format()</tt> for non-finite numbers.</li>
  168. <li>Fix memory leak when compiled to use the built-in allocator.</li>
  169. <li>x86/x64: Fix unnecessary resize in <tt>TSETM</tt> bytecode.</li>
  170. <li>Fix various GC issues with traces and <tt>jit.flush()</tt>.</li>
  171. <li>x64: Fix fusion of indexes for array references.</li>
  172. <li>x86/x64: Fix stack overflow handling for coroutine results.</li>
  173. <li>Enable low-2GB memory allocation on FreeBSD/x64.</li>
  174. <li>Fix <tt>collectgarbage("count")</tt> result if more than 2GB is in use.</li>
  175. <li>Fix parsing of hex floats.</li>
  176. <li>x86/x64: Fix loop branch inversion with trailing
  177. <tt>HREF+NE/EQ</tt>.</li>
  178. <li>Add <tt>jit.os</tt> string.</li>
  179. <li><tt>coroutine.create()</tt> permits running C functions, too.</li>
  180. <li>Fix OSX build to work with newer ld64 versions.</li>
  181. <li>Fix bytecode optimization of <tt>and</tt>/<tt>or</tt> operators.</li>
  182. </ul></li>
  183. <li>Structural and performance enhancements:
  184. <ul>
  185. <li>Emit specialized bytecode for <tt>pairs()</tt>/<tt>next()</tt>.</li>
  186. <li>Improve bytecode coalescing of <tt>nil</tt> constants.</li>
  187. <li>Compile calls to vararg functions.</li>
  188. <li>Compile <tt>select()</tt>.</li>
  189. <li>Improve alias analysis, esp. for loads from allocations.</li>
  190. <li>Tuning of various compiler heuristics.</li>
  191. <li>Refactor and extend IR conversion instructions.</li>
  192. <li>x86/x64: Various backend enhancements related to the FFI.</li>
  193. <li>Add SPLIT pass to split 64 bit IR instructions for 32 bit CPUs.</li>
  194. </ul></li>
  195. </ul>
  196. <h2 id="LuaJIT-2.0.0-beta5">LuaJIT 2.0.0-beta5 &mdash; 2010-08-24</h2>
  197. <ul>
  198. <li>Correctness and completeness:
  199. <ul>
  200. <li>Fix trace exit dispatch to function headers.</li>
  201. <li>Fix Windows and OSX builds with LUAJIT_DISABLE_JIT.</li>
  202. <li>Reorganize and fix placement of generated machine code on x64.</li>
  203. <li>Fix TNEW in x64 interpreter.</li>
  204. <li>Do not eliminate PHIs for values only referenced from side exits.</li>
  205. <li>OS-independent canonicalization of strings for non-finite numbers.</li>
  206. <li>Fix <tt>string.char()</tt> range check on x64.</li>
  207. <li>Fix <tt>tostring()</tt> resolving within <tt>print()</tt>.</li>
  208. <li>Fix error handling for <tt>next()</tt>.</li>
  209. <li>Fix passing of constant arguments to external calls on x64.</li>
  210. <li>Fix interpreter argument check for two-argument SSE math functions.</li>
  211. <li>Fix C frame chain corruption caused by <tt>lua_cpcall()</tt>.</li>
  212. <li>Fix return from <tt>pcall()</tt> within active hook.</li>
  213. </ul></li>
  214. <li>Structural and performance enhancements:
  215. <ul>
  216. <li>Replace on-trace GC frame syncing with interpreter exit.</li>
  217. <li>Improve hash lookup specialization by not removing dead keys during GC.</li>
  218. <li>Turn traces into true GC objects.</li>
  219. <li>Avoid starting a GC cycle immediately after library init.</li>
  220. <li>Add weak guards to improve dead-code elimination.</li>
  221. <li>Speed up string interning.</li>
  222. </ul></li>
  223. </ul>
  224. <h2 id="LuaJIT-2.0.0-beta4">LuaJIT 2.0.0-beta4 &mdash; 2010-03-28</h2>
  225. <ul>
  226. <li>Correctness and completeness:
  227. <ul>
  228. <li>Fix precondition for on-trace creation of table keys.</li>
  229. <li>Fix <tt>{f()}</tt> on x64 when table is resized.</li>
  230. <li>Fix folding of ordered comparisons with same references.</li>
  231. <li>Fix snapshot restores for multi-result bytecodes.</li>
  232. <li>Fix potential hang when recording bytecode with nested closures.</li>
  233. <li>Fix recording of <tt>getmetatable()</tt>, <tt>tonumber()</tt> and bad argument types.</li>
  234. <li>Fix SLOAD fusion across returns to lower frames.</li>
  235. </ul></li>
  236. <li>Structural and performance enhancements:
  237. <ul>
  238. <li>Add array bounds check elimination. <tt>-Oabc</tt> is enabled by default.</li>
  239. <li>More tuning for x64, e.g. smaller table objects.</li>
  240. </ul></li>
  241. </ul>
  242. <h2 id="LuaJIT-2.0.0-beta3">LuaJIT 2.0.0-beta3 &mdash; 2010-03-07</h2>
  243. <ul>
  244. <li>LuaJIT x64 port:
  245. <ul>
  246. <li>Port integrated memory allocator to Linux/x64, Windows/x64 and OSX/x64.</li>
  247. <li>Port interpreter and JIT compiler to x64.</li>
  248. <li>Port DynASM to x64.</li>
  249. <li>Many 32/64 bit cleanups in the VM.</li>
  250. <li>Allow building the interpreter with either x87 or SSE2 arithmetics.</li>
  251. <li>Add external unwinding and C++ exception interop (default on x64).</li>
  252. </ul></li>
  253. <li>Correctness and completeness:
  254. <ul>
  255. <li>Fix constructor bytecode generation for certain conditional values.</li>
  256. <li>Fix some cases of ordered string comparisons.</li>
  257. <li>Fix <tt>lua_tocfunction()</tt>.</li>
  258. <li>Fix cutoff register in JMP bytecode for some conditional expressions.</li>
  259. <li>Fix PHI marking algorithm for references from variant slots.</li>
  260. <li>Fix <tt>package.cpath</tt> for non-default PREFIX.</li>
  261. <li>Fix DWARF2 frame unwind information for interpreter on OSX.</li>
  262. <li>Drive the GC forward on string allocations in the parser.</li>
  263. <li>Implement call/return hooks (zero-cost if disabled).</li>
  264. <li>Implement yield from C hooks.</li>
  265. <li>Disable JIT compiler on older non-SSE2 CPUs instead of aborting.</li>
  266. </ul></li>
  267. <li>Structural and performance enhancements:
  268. <ul>
  269. <li>Compile recursive code (tail-, up- and down-recursion).</li>
  270. <li>Improve heuristics for bytecode penalties and blacklisting.</li>
  271. <li>Split CALL/FUNC recording and clean up fast function call semantics.</li>
  272. <li>Major redesign of internal function call handling.</li>
  273. <li>Improve FOR loop const specialization and integerness checks.</li>
  274. <li>Switch to pre-initialized stacks. Avoid frame-clearing.</li>
  275. <li>Colocation of prototypes and related data: bytecode, constants, debug info.</li>
  276. <li>Cleanup parser and streamline bytecode generation.</li>
  277. <li>Add support for weak IR references to register allocator.</li>
  278. <li>Switch to compressed, extensible snapshots.</li>
  279. <li>Compile returns to frames below the start frame.</li>
  280. <li>Improve alias analysis of upvalues using a disambiguation hash value.</li>
  281. <li>Compile floor/ceil/trunc to SSE2 helper calls or SSE4.1 instructions.</li>
  282. <li>Add generic C call handling to IR and backend.</li>
  283. <li>Improve KNUM fuse vs. load heuristics.</li>
  284. <li>Compile various <tt>io.*()</tt> functions.</li>
  285. <li>Compile <tt>math.sinh()</tt>, <tt>math.cosh()</tt>, <tt>math.tanh()</tt>
  286. and <tt>math.random()</tt>.</li>
  287. </ul></li>
  288. </ul>
  289. <h2 id="LuaJIT-2.0.0-beta2">LuaJIT 2.0.0-beta2 &mdash; 2009-11-09</h2>
  290. <ul>
  291. <li>Reorganize build system. Build static+shared library on POSIX.</li>
  292. <li>Allow C++ exception conversion on all platforms
  293. using a wrapper function.</li>
  294. <li>Automatically catch C++ exceptions and rethrow Lua error
  295. (DWARF2 only).</li>
  296. <li>Check for the correct x87 FPU precision at strategic points.</li>
  297. <li>Always use wrappers for libm functions.</li>
  298. <li>Resurrect metamethod name strings before copying them.</li>
  299. <li>Mark current trace, even if compiler is idle.</li>
  300. <li>Ensure FILE metatable is created only once.</li>
  301. <li>Fix type comparisons when different integer types are involved.</li>
  302. <li>Fix <tt>getmetatable()</tt> recording.</li>
  303. <li>Fix TDUP with dead keys in template table.</li>
  304. <li><tt>jit.flush(tr)</tt> returns status.
  305. Prevent manual flush of a trace that's still linked.</li>
  306. <li>Improve register allocation heuristics for invariant references.</li>
  307. <li>Compile the push/pop variants of <tt>table.insert()</tt> and
  308. <tt>table.remove()</tt>.</li>
  309. <li>Compatibility with MSVC <tt>link&nbsp/debug</tt>.</li>
  310. <li>Fix <tt>lua_iscfunction()</tt>.</li>
  311. <li>Fix <tt>math.random()</tt> when compiled with <tt>-fpic</tt> (OSX).</li>
  312. <li>Fix <tt>table.maxn()</tt>.</li>
  313. <li>Bump <tt>MACOSX_DEPLOYMENT_TARGET</tt> to <tt>10.4</tt></li>
  314. <li><tt>luaL_check*()</tt> and <tt>luaL_opt*()</tt> now support
  315. negative arguments, too.<br>
  316. This matches the behavior of Lua 5.1, but not the specification.</li>
  317. </ul>
  318. <h2 id="LuaJIT-2.0.0-beta1">LuaJIT 2.0.0-beta1 &mdash; 2009-10-31</h2>
  319. <ul>
  320. <li>This is the first public release of LuaJIT 2.0.</li>
  321. <li>The whole VM has been rewritten from the ground up, so there's
  322. no point in listing differences over earlier versions.</li>
  323. </ul>
  324. </div>
  325. <div class="major" style="background: #d0d0ff;">
  326. <h2 id="LuaJIT-1.1.7">LuaJIT 1.1.7 &mdash; 2011-05-05</h2>
  327. <ul>
  328. <li>Added fixes for the
  329. <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>
  330. </ul>
  331. <h2 id="LuaJIT-1.1.6">LuaJIT 1.1.6 &mdash; 2010-03-28</h2>
  332. <ul>
  333. <li>Added fixes for the
  334. <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>
  335. <li>Removed wrong GC check in <tt>jit_createstate()</tt>.
  336. Thanks to Tim Mensch.</li>
  337. <li>Fixed bad assertions while compiling <tt>table.insert()</tt> and
  338. <tt>table.remove()</tt>.</li>
  339. </ul>
  340. <h2 id="LuaJIT-1.1.5">LuaJIT 1.1.5 &mdash; 2008-10-25</h2>
  341. <ul>
  342. <li>Merged with Lua 5.1.4. Fixes all
  343. <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>
  344. </ul>
  345. <h2 id="LuaJIT-1.1.4">LuaJIT 1.1.4 &mdash; 2008-02-05</h2>
  346. <ul>
  347. <li>Merged with Lua 5.1.3. Fixes all
  348. <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>
  349. <li>Fixed possible (but unlikely) stack corruption while compiling
  350. <tt>k^x</tt> expressions.</li>
  351. <li>Fixed DynASM template for cmpss instruction.</li>
  352. </ul>
  353. <h2 id="LuaJIT-1.1.3">LuaJIT 1.1.3 &mdash; 2007-05-24</h2>
  354. <ul>
  355. <li>Merged with Lua 5.1.2. Fixes all
  356. <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>
  357. <li>Merged pending Lua 5.1.x fixes: "return -nil" bug, spurious count hook call.</li>
  358. <li>Remove a (sometimes) wrong assertion in <tt>luaJIT_findpc()</tt>.</li>
  359. <li>DynASM now allows labels for displacements and <tt>.aword</tt>.</li>
  360. <li>Fix some compiler warnings for DynASM glue (internal API change).</li>
  361. <li>Correct naming for SSSE3 (temporarily known as SSE4) in DynASM and x86 disassembler.</li>
  362. <li>The loadable debug modules now handle redirection to stdout
  363. (e.g. <tt>-j&nbsp;trace=-</tt>).</li>
  364. </ul>
  365. <h2 id="LuaJIT-1.1.2">LuaJIT 1.1.2 &mdash; 2006-06-24</h2>
  366. <ul>
  367. <li>Fix MSVC inline assembly: use only local variables with
  368. <tt>lua_number2int()</tt>.</li>
  369. <li>Fix "attempt to call a thread value" bug on Mac OS X:
  370. make values of consts used as lightuserdata keys unique
  371. to avoid joining by the compiler/linker.</li>
  372. </ul>
  373. <h2 id="LuaJIT-1.1.1">LuaJIT 1.1.1 &mdash; 2006-06-20</h2>
  374. <ul>
  375. <li>Merged with Lua 5.1.1. Fixes all
  376. <a href="http://www.lua.org/bugs.html#5.1"><span class="ext">&raquo;</span>&nbsp;known bugs in Lua 5.1</a>.</li>
  377. <li>Enforce (dynamic) linker error for EXE/DLL version mismatches.</li>
  378. <li>Minor changes to DynASM: faster pre-processing, smaller encoding
  379. for some immediates.</li>
  380. </ul>
  381. <p>
  382. This release is in sync with Coco 1.1.1 (see the
  383. <a href="http://coco.luajit.org/changes.html"><span class="ext">&raquo;</span>&nbsp;Coco Change History</a>).
  384. </p>
  385. <h2 id="LuaJIT-1.1.0">LuaJIT 1.1.0 &mdash; 2006-03-13</h2>
  386. <ul>
  387. <li>Merged with Lua 5.1 (final).</li>
  388. <li>New JIT call frame setup:
  389. <ul>
  390. <li>The C stack is kept 16 byte aligned (faster).
  391. Mandatory for Mac OS X on Intel, too.</li>
  392. <li>Faster calling conventions for internal C helper functions.</li>
  393. <li>Better instruction scheduling for function prologue, OP_CALL and
  394. OP_RETURN.</li>
  395. </ul></li>
  396. <li>Miscellaneous optimizations:
  397. <ul>
  398. <li>Faster loads of FP constants. Remove narrow-to-wide store-to-load
  399. forwarding stalls.</li>
  400. <li>Use (scalar) SSE2 ops (if the CPU supports it) to speed up slot moves
  401. and FP to integer conversions.</li>
  402. <li>Optimized the two-argument form of <tt>OP_CONCAT</tt> (<tt>a..b</tt>).</li>
  403. <li>Inlined <tt>OP_MOD</tt> (<tt>a%b</tt>).
  404. With better accuracy than the C variant, too.</li>
  405. <li>Inlined <tt>OP_POW</tt> (<tt>a^b</tt>). Unroll <tt>x^k</tt> or
  406. use <tt>k^x = 2^(log2(k)*x)</tt> or call <tt>pow()</tt>.</li>
  407. </ul></li>
  408. <li>Changes in the optimizer:
  409. <ul>
  410. <li>Improved hinting for table keys derived from table values
  411. (<tt>t1[t2[x]]</tt>).</li>
  412. <li>Lookup hinting now works with arbitrary object types and
  413. supports index chains, too.</li>
  414. <li>Generate type hints for arithmetic and comparison operators,
  415. OP_LEN, OP_CONCAT and OP_FORPREP.</li>
  416. <li>Remove several hint definitions in favour of a generic COMBINE hint.</li>
  417. <li>Complete rewrite of <tt>jit.opt_inline</tt> module
  418. (ex <tt>jit.opt_lib</tt>).</li>
  419. </ul></li>
  420. <li>Use adaptive deoptimization:
  421. <ul>
  422. <li>If runtime verification of a contract fails, the affected
  423. instruction is recompiled and patched on-the-fly.
  424. Regular programs will trigger deoptimization only occasionally.</li>
  425. <li>This avoids generating code for uncommon fallback cases
  426. most of the time. Generated code is up to 30% smaller compared to
  427. LuaJIT&nbsp;1.0.3.</li>
  428. <li>Deoptimization is used for many opcodes and contracts:
  429. <ul>
  430. <li>OP_CALL, OP_TAILCALL: type mismatch for callable.</li>
  431. <li>Inlined calls: closure mismatch, parameter number and type mismatches.</li>
  432. <li>OP_GETTABLE, OP_SETTABLE: table or key type and range mismatches.</li>
  433. <li>All arithmetic and comparison operators, OP_LEN, OP_CONCAT,
  434. OP_FORPREP: operand type and range mismatches.</li>
  435. </ul></li>
  436. <li>Complete redesign of the debug and traceback info
  437. (bytecode &harr; mcode) to support deoptimization.
  438. Much more flexible and needs only 50% of the space.</li>
  439. <li>The modules <tt>jit.trace</tt>, <tt>jit.dumphints</tt> and
  440. <tt>jit.dump</tt> handle deoptimization.</li>
  441. </ul></li>
  442. <li>Inlined many popular library functions
  443. (for commonly used arguments only):
  444. <ul>
  445. <li>Most <tt>math.*</tt> functions (the 18 most used ones)
  446. [2x-10x faster].</li>
  447. <li><tt>string.len</tt>, <tt>string.sub</tt> and <tt>string.char</tt>
  448. [2x-10x faster].</li>
  449. <li><tt>table.insert</tt>, <tt>table.remove</tt> and <tt>table.getn</tt>
  450. [3x-5x faster].</li>
  451. <li><tt>coroutine.yield</tt> and <tt>coroutine.resume</tt>
  452. [3x-5x faster].</li>
  453. <li><tt>pairs</tt>, <tt>ipairs</tt> and the corresponding iterators
  454. [8x-15x faster].</li>
  455. </ul></li>
  456. <li>Changes in the core and loadable modules and the stand-alone executable:
  457. <ul>
  458. <li>Added <tt>jit.version</tt>, <tt>jit.version_num</tt>
  459. and <tt>jit.arch</tt>.</li>
  460. <li>Reorganized some internal API functions (<tt>jit.util.*mcode*</tt>).</li>
  461. <li>The <tt>-j dump</tt> output now shows JSUB names, too.</li>
  462. <li>New x86 disassembler module written in pure Lua. No dependency
  463. on ndisasm anymore. Flexible API, very compact (500 lines)
  464. and complete (x87, MMX, SSE, SSE2, SSE3, SSSE3, privileged instructions).</li>
  465. <li><tt>luajit -v</tt> prints the LuaJIT version and copyright
  466. on a separate line.</li>
  467. </ul></li>
  468. <li>Added SSE, SSE2, SSE3 and SSSE3 support to DynASM.</li>
  469. <li>Miscellaneous doc changes. Added a section about
  470. <a href="install.html#embedding">embedding LuaJIT</a>.</li>
  471. </ul>
  472. <p>
  473. This release is in sync with Coco 1.1.0 (see the
  474. <a href="http://coco.luajit.org/changes.html"><span class="ext">&raquo;</span>&nbsp;Coco Change History</a>).
  475. </p>
  476. </div>
  477. <div class="major" style="background: #ffffd0;">
  478. <h2 id="LuaJIT-1.0.3">LuaJIT 1.0.3 &mdash; 2005-09-08</h2>
  479. <ul>
  480. <li>Even more docs.</li>
  481. <li>Unified closure checks in <tt>jit.*</tt>.</li>
  482. <li>Fixed some range checks in <tt>jit.util.*</tt>.</li>
  483. <li>Fixed __newindex call originating from <tt>jit_settable_str()</tt>.</li>
  484. <li>Merged with Lua 5.1 alpha (including early bug fixes).</li>
  485. </ul>
  486. <p>
  487. This is the first public release of LuaJIT.
  488. </p>
  489. <h2 id="LuaJIT-1.0.2">LuaJIT 1.0.2 &mdash; 2005-09-02</h2>
  490. <ul>
  491. <li>Add support for flushing the Valgrind translation cache <br>
  492. (<tt>MYCFLAGS= -DUSE_VALGRIND</tt>).</li>
  493. <li>Add support for freeing executable mcode memory to the <tt>mmap()</tt>-based
  494. variant for POSIX systems.</li>
  495. <li>Reorganized the C&nbsp;function signature handling in
  496. <tt>jit.opt_lib</tt>.</li>
  497. <li>Changed to index-based hints for inlining C&nbsp;functions.
  498. Still no support in the backend for inlining.</li>
  499. <li>Hardcode <tt>HEAP_CREATE_ENABLE_EXECUTE</tt> value if undefined.</li>
  500. <li>Misc. changes to the <tt>jit.*</tt> modules.</li>
  501. <li>Misc. changes to the Makefiles.</li>
  502. <li>Lots of new docs.</li>
  503. <li>Complete doc reorg.</li>
  504. </ul>
  505. <p>
  506. Not released because Lua 5.1 alpha came out today.
  507. </p>
  508. <h2 id="LuaJIT-1.0.1">LuaJIT 1.0.1 &mdash; 2005-08-31</h2>
  509. <ul>
  510. <li>Missing GC step in <tt>OP_CONCAT</tt>.</li>
  511. <li>Fix result handling for C &ndash;> JIT calls.</li>
  512. <li>Detect CPU feature bits.</li>
  513. <li>Encode conditional moves (<tt>fucomip</tt>) only when supported.</li>
  514. <li>Add fallback instructions for FP compares.</li>
  515. <li>Add support for <tt>LUA_COMPAT_VARARG</tt>. Still disabled by default.</li>
  516. <li>MSVC needs a specific place for the <tt>CALLBACK</tt> attribute
  517. (David Burgess).</li>
  518. <li>Misc. doc updates.</li>
  519. </ul>
  520. <p>
  521. Interim non-public release.
  522. Special thanks to Adam D. Moss for reporting most of the bugs.
  523. </p>
  524. <h2 id="LuaJIT-1.0.0">LuaJIT 1.0.0 &mdash; 2005-08-29</h2>
  525. <p>
  526. This is the initial non-public release of LuaJIT.
  527. </p>
  528. </div>
  529. <br class="flush">
  530. </div>
  531. <div id="foot">
  532. <hr class="hide">
  533. Copyright &copy; 2005-2011 Mike Pall
  534. <span class="noprint">
  535. &middot;
  536. <a href="contact.html">Contact</a>
  537. </span>
  538. </div>
  539. </body>
  540. </html>