changes.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  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-2010, 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><li>
  30. <a href="api.html">API Extensions</a>
  31. </li></ul>
  32. </li><li>
  33. <a href="status.html">Status</a>
  34. <ul><li>
  35. <a class="current" href="changes.html">Changes</a>
  36. </li></ul>
  37. </li><li>
  38. <a href="faq.html">FAQ</a>
  39. </li><li>
  40. <a href="http://luajit.org/download.html">Download <span class="ext">&raquo;</span></a>
  41. </li></ul>
  42. </div>
  43. <div id="main">
  44. <p>
  45. This is a list of changes between the released versions of LuaJIT.<br>
  46. The current <span style="color: #c00000;">development version</span> is <strong>LuaJIT&nbsp;2.0.0-beta2</strong>.<br>
  47. The current <span style="color: #0000c0;">stable version</span> is <strong>LuaJIT&nbsp;1.1.5</strong>.
  48. </p>
  49. <p>
  50. Please check the
  51. <a href="http://luajit.org/changes.html"><span class="ext">&raquo;</span>&nbsp;Online Change History</a>
  52. to see whether newer versions are available.
  53. </p>
  54. <div class="major" style="background: #d0d0d0;">
  55. <h2 id="snap">Development Snapshot</h2>
  56. <ul>
  57. <li>Build of preliminary x64 interpreter works on Linux/x64 or WIN64.</li>
  58. <li>Implement call hooks (zero-cost if disabled).</li>
  59. <li>Major redesign of internal function call handling.</li>
  60. <li>Implement yield from C hooks.</li>
  61. <li>Add abstract C call handling to IR.</li>
  62. <li>Improve KNUM fuse vs. load heuristics.</li>
  63. <li>Drive the GC forward on string allocations in the parser.</li>
  64. <li>Compile various <tt>io.*()</tt> functions.</li>
  65. <li>Compile <tt>math.sinh()</tt>, <tt>math.cosh()</tt>, <tt>math.tanh()</tt>
  66. and <tt>math.random()</tt>.</li>
  67. <li>Fix <tt>lua_tocfunction()</tt>.</li>
  68. <li>Fix cutoff register in JMP bytecode for some conditional expressions.</li>
  69. <li>Fix PHI marking algorithm for references from variant slots.</li>
  70. <li>Fix <tt>package.cpath</tt> for non-default PREFIX.</li>
  71. <li>Fix DWARF2 frame unwind information for interpreter on OSX.</li>
  72. </ul>
  73. </div>
  74. <div class="major" style="background: #ffd0d0;">
  75. <h2 id="LuaJIT-2.0.0-beta2">LuaJIT 2.0.0-beta2 &mdash; 2009-11-09</h2>
  76. <ul>
  77. <li>Reorganize build system. Build static+shared library on POSIX.</li>
  78. <li>Allow C++ exception conversion on all platforms
  79. using a wrapper function.</li>
  80. <li>Automatically catch C++ exceptions and rethrow Lua error
  81. (DWARF2 only).</li>
  82. <li>Check for the correct x87 FPU precision at strategic points.</li>
  83. <li>Always use wrappers for libm functions.</li>
  84. <li>Resurrect metamethod name strings before copying them.</li>
  85. <li>Mark current trace, even if compiler is idle.</li>
  86. <li>Ensure FILE metatable is created only once.</li>
  87. <li>Fix type comparisons when different integer types are involved.</li>
  88. <li>Fix <tt>getmetatable()</tt> recording.</li>
  89. <li>Fix TDUP with dead keys in template table.</li>
  90. <li><tt>jit.flush(tr)</tt> returns status.
  91. Prevent manual flush of a trace that's still linked.</li>
  92. <li>Improve register allocation heuristics for invariant references.</li>
  93. <li>Compile the push/pop variants of <tt>table.insert()</tt> and
  94. <tt>table.remove()</tt>.</li>
  95. <li>Compatibility with MSVC <tt>link&nbsp/debug</tt>.</li>
  96. <li>Fix <tt>lua_iscfunction()</tt>.</li>
  97. <li>Fix <tt>math.random()</tt> when compiled with <tt>-fpic</tt> (OSX).</li>
  98. <li>Fix <tt>table.maxn()</tt>.</li>
  99. <li>Bump <tt>MACOSX_DEPLOYMENT_TARGET</tt> to <tt>10.4</tt></li>
  100. <li><tt>luaL_check*()</tt> and <tt>luaL_opt*()</tt> now support
  101. negative arguments, too.<br>
  102. This matches the behavior of Lua 5.1, but not the specification.</li>
  103. </ul>
  104. <h2 id="LuaJIT-2.0.0-beta1">LuaJIT 2.0.0-beta1 &mdash; 2009-10-31</h2>
  105. <ul>
  106. <li>This is the first public release of LuaJIT 2.0.</li>
  107. <li>The whole VM has been rewritten from the ground up, so there's
  108. no point in listing differences over earlier versions.</li>
  109. </ul>
  110. </div>
  111. <div class="major" style="background: #d0d0ff;">
  112. <h2 id="LuaJIT-1.1.5">LuaJIT 1.1.5 &mdash; 2008-10-25</h2>
  113. <ul>
  114. <li>Merged with Lua 5.1.4. Fixes all
  115. <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>
  116. </ul>
  117. <h2 id="LuaJIT-1.1.4">LuaJIT 1.1.4 &mdash; 2008-02-05</h2>
  118. <ul>
  119. <li>Merged with Lua 5.1.3. Fixes all
  120. <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>
  121. <li>Fixed possible (but unlikely) stack corruption while compiling
  122. <tt>k^x</tt> expressions.</li>
  123. <li>Fixed DynASM template for cmpss instruction.</li>
  124. </ul>
  125. <h2 id="LuaJIT-1.1.3">LuaJIT 1.1.3 &mdash; 2007-05-24</h2>
  126. <ul>
  127. <li>Merged with Lua 5.1.2. Fixes all
  128. <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>
  129. <li>Merged pending Lua 5.1.x fixes: "return -nil" bug, spurious count hook call.</li>
  130. <li>Remove a (sometimes) wrong assertion in <tt>luaJIT_findpc()</tt>.</li>
  131. <li>DynASM now allows labels for displacements and <tt>.aword</tt>.</li>
  132. <li>Fix some compiler warnings for DynASM glue (internal API change).</li>
  133. <li>Correct naming for SSSE3 (temporarily known as SSE4) in DynASM and x86 disassembler.</li>
  134. <li>The loadable debug modules now handle redirection to stdout
  135. (e.g. <tt>-j&nbsp;trace=-</tt>).</li>
  136. </ul>
  137. <h2 id="LuaJIT-1.1.2">LuaJIT 1.1.2 &mdash; 2006-06-24</h2>
  138. <ul>
  139. <li>Fix MSVC inline assembly: use only local variables with
  140. <tt>lua_number2int()</tt>.</li>
  141. <li>Fix "attempt to call a thread value" bug on Mac OS X:
  142. make values of consts used as lightuserdata keys unique
  143. to avoid joining by the compiler/linker.</li>
  144. </ul>
  145. <h2 id="LuaJIT-1.1.1">LuaJIT 1.1.1 &mdash; 2006-06-20</h2>
  146. <ul>
  147. <li>Merged with Lua 5.1.1. Fixes all
  148. <a href="http://www.lua.org/bugs.html#5.1"><span class="ext">&raquo;</span>&nbsp;known bugs in Lua 5.1</a>.</li>
  149. <li>Enforce (dynamic) linker error for EXE/DLL version mismatches.</li>
  150. <li>Minor changes to DynASM: faster preprocessing, smaller encoding
  151. for some immediates.</li>
  152. </ul>
  153. <p>
  154. This release is in sync with Coco 1.1.1 (see the
  155. <a href="http://coco.luajit.org/changes.html"><span class="ext">&raquo;</span>&nbsp;Coco Change History</a>).
  156. </p>
  157. <h2 id="LuaJIT-1.1.0">LuaJIT 1.1.0 &mdash; 2006-03-13</h2>
  158. <ul>
  159. <li>Merged with Lua 5.1 (final).</li>
  160. <li>New JIT call frame setup:
  161. <ul>
  162. <li>The C stack is kept 16 byte aligned (faster).
  163. Mandatory for Mac OS X on Intel, too.</li>
  164. <li>Faster calling conventions for internal C helper functions.</li>
  165. <li>Better instruction scheduling for function prologue, OP_CALL and
  166. OP_RETURN.</li>
  167. </ul></li>
  168. <li>Miscellaneous optimizations:
  169. <ul>
  170. <li>Faster loads of FP constants. Remove narrow-to-wide store-to-load
  171. forwarding stalls.</li>
  172. <li>Use (scalar) SSE2 ops (if the CPU supports it) to speed up slot moves
  173. and FP to integer conversions.</li>
  174. <li>Optimized the two-argument form of <tt>OP_CONCAT</tt> (<tt>a..b</tt>).</li>
  175. <li>Inlined <tt>OP_MOD</tt> (<tt>a%b</tt>).
  176. With better accuracy than the C variant, too.</li>
  177. <li>Inlined <tt>OP_POW</tt> (<tt>a^b</tt>). Unroll <tt>x^k</tt> or
  178. use <tt>k^x = 2^(log2(k)*x)</tt> or call <tt>pow()</tt>.</li>
  179. </ul></li>
  180. <li>Changes in the optimizer:
  181. <ul>
  182. <li>Improved hinting for table keys derived from table values
  183. (<tt>t1[t2[x]]</tt>).</li>
  184. <li>Lookup hinting now works with arbitrary object types and
  185. supports index chains, too.</li>
  186. <li>Generate type hints for arithmetic and comparison operators,
  187. OP_LEN, OP_CONCAT and OP_FORPREP.</li>
  188. <li>Remove several hint definitions in favour of a generic COMBINE hint.</li>
  189. <li>Complete rewrite of <tt>jit.opt_inline</tt> module
  190. (ex <tt>jit.opt_lib</tt>).</li>
  191. </ul></li>
  192. <li>Use adaptive deoptimization:
  193. <ul>
  194. <li>If runtime verification of a contract fails, the affected
  195. instruction is recompiled and patched on-the-fly.
  196. Regular programs will trigger deoptimization only occasionally.</li>
  197. <li>This avoids generating code for uncommon fallback cases
  198. most of the time. Generated code is up to 30% smaller compared to
  199. LuaJIT&nbsp;1.0.3.</li>
  200. <li>Deoptimization is used for many opcodes and contracts:
  201. <ul>
  202. <li>OP_CALL, OP_TAILCALL: type mismatch for callable.</li>
  203. <li>Inlined calls: closure mismatch, parameter number and type mismatches.</li>
  204. <li>OP_GETTABLE, OP_SETTABLE: table or key type and range mismatches.</li>
  205. <li>All arithmetic and comparison operators, OP_LEN, OP_CONCAT,
  206. OP_FORPREP: operand type and range mismatches.</li>
  207. </ul></li>
  208. <li>Complete redesign of the debug and traceback info
  209. (bytecode &harr; mcode) to support deoptimization.
  210. Much more flexible and needs only 50% of the space.</li>
  211. <li>The modules <tt>jit.trace</tt>, <tt>jit.dumphints</tt> and
  212. <tt>jit.dump</tt> handle deoptimization.</li>
  213. </ul></li>
  214. <li>Inlined many popular library functions
  215. (for commonly used arguments only):
  216. <ul>
  217. <li>Most <tt>math.*</tt> functions (the 18 most used ones)
  218. [2x-10x faster].</li>
  219. <li><tt>string.len</tt>, <tt>string.sub</tt> and <tt>string.char</tt>
  220. [2x-10x faster].</li>
  221. <li><tt>table.insert</tt>, <tt>table.remove</tt> and <tt>table.getn</tt>
  222. [3x-5x faster].</li>
  223. <li><tt>coroutine.yield</tt> and <tt>coroutine.resume</tt>
  224. [3x-5x faster].</li>
  225. <li><tt>pairs</tt>, <tt>ipairs</tt> and the corresponding iterators
  226. [8x-15x faster].</li>
  227. </ul></li>
  228. <li>Changes in the core and loadable modules and the stand-alone executable:
  229. <ul>
  230. <li>Added <tt>jit.version</tt>, <tt>jit.version_num</tt>
  231. and <tt>jit.arch</tt>.</li>
  232. <li>Reorganized some internal API functions (<tt>jit.util.*mcode*</tt>).</li>
  233. <li>The <tt>-j dump</tt> output now shows JSUB names, too.</li>
  234. <li>New x86 disassembler module written in pure Lua. No dependency
  235. on ndisasm anymore. Flexible API, very compact (500 lines)
  236. and complete (x87, MMX, SSE, SSE2, SSE3, SSSE3, privileged instructions).</li>
  237. <li><tt>luajit -v</tt> prints the LuaJIT version and copyright
  238. on a separate line.</li>
  239. </ul></li>
  240. <li>Added SSE, SSE2, SSE3 and SSSE3 support to DynASM.</li>
  241. <li>Miscellaneous doc changes. Added a section about
  242. <a href="install.html#embedding">embedding LuaJIT</a>.</li>
  243. </ul>
  244. <p>
  245. This release is in sync with Coco 1.1.0 (see the
  246. <a href="http://coco.luajit.org/changes.html"><span class="ext">&raquo;</span>&nbsp;Coco Change History</a>).
  247. </p>
  248. </div>
  249. <div class="major" style="background: #ffffd0;">
  250. <h2 id="LuaJIT-1.0.3">LuaJIT 1.0.3 &mdash; 2005-09-08</h2>
  251. <ul>
  252. <li>Even more docs.</li>
  253. <li>Unified closure checks in <tt>jit.*</tt>.</li>
  254. <li>Fixed some range checks in <tt>jit.util.*</tt>.</li>
  255. <li>Fixed __newindex call originating from <tt>jit_settable_str()</tt>.</li>
  256. <li>Merged with Lua 5.1 alpha (including early bugfixes).</li>
  257. </ul>
  258. <p>
  259. This is the first public release of LuaJIT.
  260. </p>
  261. <h2 id="LuaJIT-1.0.2">LuaJIT 1.0.2 &mdash; 2005-09-02</h2>
  262. <ul>
  263. <li>Add support for flushing the Valgrind translation cache <br>
  264. (<tt>MYCFLAGS= -DUSE_VALGRIND</tt>).</li>
  265. <li>Add support for freeing executable mcode memory to the <tt>mmap()</tt>-based
  266. variant for POSIX systems.</li>
  267. <li>Reorganized the C&nbsp;function signature handling in
  268. <tt>jit.opt_lib</tt>.</li>
  269. <li>Changed to index-based hints for inlining C&nbsp;functions.
  270. Still no support in the backend for inlining.</li>
  271. <li>Hardcode <tt>HEAP_CREATE_ENABLE_EXECUTE</tt> value if undefined.</li>
  272. <li>Misc. changes to the <tt>jit.*</tt> modules.</li>
  273. <li>Misc. changes to the Makefiles.</li>
  274. <li>Lots of new docs.</li>
  275. <li>Complete doc reorg.</li>
  276. </ul>
  277. <p>
  278. Not released because Lua 5.1 alpha came out today.
  279. </p>
  280. <h2 id="LuaJIT-1.0.1">LuaJIT 1.0.1 &mdash; 2005-08-31</h2>
  281. <ul>
  282. <li>Missing GC step in <tt>OP_CONCAT</tt>.</li>
  283. <li>Fix result handling for C &ndash;> JIT calls.</li>
  284. <li>Detect CPU feature bits.</li>
  285. <li>Encode conditional moves (<tt>fucomip</tt>) only when supported.</li>
  286. <li>Add fallback instructions for FP compares.</li>
  287. <li>Add support for <tt>LUA_COMPAT_VARARG</tt>. Still disabled by default.</li>
  288. <li>MSVC needs a specific place for the <tt>CALLBACK</tt> attribute
  289. (David Burgess).</li>
  290. <li>Misc. doc updates.</li>
  291. </ul>
  292. <p>
  293. Interim non-public release.
  294. Special thanks to Adam D. Moss for reporting most of the bugs.
  295. </p>
  296. <h2 id="LuaJIT-1.0.0">LuaJIT 1.0.0 &mdash; 2005-08-29</h2>
  297. <p>
  298. This is the initial non-public release of LuaJIT.
  299. </p>
  300. </div>
  301. <br class="flush">
  302. </div>
  303. <div id="foot">
  304. <hr class="hide">
  305. Copyright &copy; 2005-2010 Mike Pall
  306. <span class="noprint">
  307. &middot;
  308. <a href="contact.html">Contact</a>
  309. </span>
  310. </div>
  311. </body>
  312. </html>