mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Documentation cleanup and reorganization.
This commit is contained in:
parent
a0ee70de6d
commit
d70d77549b
@ -23,6 +23,8 @@ div.major { max-width: 600px; padding: 1em; margin: 1em 0 1em 0; }
|
|||||||
<ul><li>
|
<ul><li>
|
||||||
<a href="luajit.html">LuaJIT</a>
|
<a href="luajit.html">LuaJIT</a>
|
||||||
<ul><li>
|
<ul><li>
|
||||||
|
<a href="http://luajit.org/download.html">Download <span class="ext">»</span></a>
|
||||||
|
</li><li>
|
||||||
<a href="install.html">Installation</a>
|
<a href="install.html">Installation</a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a href="running.html">Running</a>
|
<a href="running.html">Running</a>
|
||||||
@ -53,8 +55,6 @@ div.major { max-width: 600px; padding: 1em; margin: 1em 0 1em 0; }
|
|||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/performance.html">Performance <span class="ext">»</span></a>
|
<a href="http://luajit.org/performance.html">Performance <span class="ext">»</span></a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/download.html">Download <span class="ext">»</span></a>
|
|
||||||
</li><li>
|
|
||||||
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
<a href="http://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||||
|
@ -20,6 +20,8 @@
|
|||||||
<ul><li>
|
<ul><li>
|
||||||
<a href="luajit.html">LuaJIT</a>
|
<a href="luajit.html">LuaJIT</a>
|
||||||
<ul><li>
|
<ul><li>
|
||||||
|
<a href="http://luajit.org/download.html">Download <span class="ext">»</span></a>
|
||||||
|
</li><li>
|
||||||
<a href="install.html">Installation</a>
|
<a href="install.html">Installation</a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a href="running.html">Running</a>
|
<a href="running.html">Running</a>
|
||||||
@ -50,8 +52,6 @@
|
|||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/performance.html">Performance <span class="ext">»</span></a>
|
<a href="http://luajit.org/performance.html">Performance <span class="ext">»</span></a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/download.html">Download <span class="ext">»</span></a>
|
|
||||||
</li><li>
|
|
||||||
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
<a href="http://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||||
|
@ -20,6 +20,8 @@
|
|||||||
<ul><li>
|
<ul><li>
|
||||||
<a href="luajit.html">LuaJIT</a>
|
<a href="luajit.html">LuaJIT</a>
|
||||||
<ul><li>
|
<ul><li>
|
||||||
|
<a href="http://luajit.org/download.html">Download <span class="ext">»</span></a>
|
||||||
|
</li><li>
|
||||||
<a href="install.html">Installation</a>
|
<a href="install.html">Installation</a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a href="running.html">Running</a>
|
<a href="running.html">Running</a>
|
||||||
@ -50,8 +52,6 @@
|
|||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/performance.html">Performance <span class="ext">»</span></a>
|
<a href="http://luajit.org/performance.html">Performance <span class="ext">»</span></a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/download.html">Download <span class="ext">»</span></a>
|
|
||||||
</li><li>
|
|
||||||
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
<a href="http://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||||
|
@ -20,6 +20,8 @@
|
|||||||
<ul><li>
|
<ul><li>
|
||||||
<a href="luajit.html">LuaJIT</a>
|
<a href="luajit.html">LuaJIT</a>
|
||||||
<ul><li>
|
<ul><li>
|
||||||
|
<a href="http://luajit.org/download.html">Download <span class="ext">»</span></a>
|
||||||
|
</li><li>
|
||||||
<a href="install.html">Installation</a>
|
<a href="install.html">Installation</a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a href="running.html">Running</a>
|
<a href="running.html">Running</a>
|
||||||
@ -50,8 +52,6 @@
|
|||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/performance.html">Performance <span class="ext">»</span></a>
|
<a href="http://luajit.org/performance.html">Performance <span class="ext">»</span></a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/download.html">Download <span class="ext">»</span></a>
|
|
||||||
</li><li>
|
|
||||||
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
<a href="http://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||||
|
@ -25,6 +25,8 @@ td.abiparam { font-weight: bold; width: 6em; }
|
|||||||
<ul><li>
|
<ul><li>
|
||||||
<a href="luajit.html">LuaJIT</a>
|
<a href="luajit.html">LuaJIT</a>
|
||||||
<ul><li>
|
<ul><li>
|
||||||
|
<a href="http://luajit.org/download.html">Download <span class="ext">»</span></a>
|
||||||
|
</li><li>
|
||||||
<a href="install.html">Installation</a>
|
<a href="install.html">Installation</a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a href="running.html">Running</a>
|
<a href="running.html">Running</a>
|
||||||
@ -55,8 +57,6 @@ td.abiparam { font-weight: bold; width: 6em; }
|
|||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/performance.html">Performance <span class="ext">»</span></a>
|
<a href="http://luajit.org/performance.html">Performance <span class="ext">»</span></a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/download.html">Download <span class="ext">»</span></a>
|
|
||||||
</li><li>
|
|
||||||
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
<a href="http://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||||
|
@ -25,6 +25,8 @@ td.convop { font-style: italic; width: 40%; }
|
|||||||
<ul><li>
|
<ul><li>
|
||||||
<a href="luajit.html">LuaJIT</a>
|
<a href="luajit.html">LuaJIT</a>
|
||||||
<ul><li>
|
<ul><li>
|
||||||
|
<a href="http://luajit.org/download.html">Download <span class="ext">»</span></a>
|
||||||
|
</li><li>
|
||||||
<a href="install.html">Installation</a>
|
<a href="install.html">Installation</a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a href="running.html">Running</a>
|
<a href="running.html">Running</a>
|
||||||
@ -55,8 +57,6 @@ td.convop { font-style: italic; width: 40%; }
|
|||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/performance.html">Performance <span class="ext">»</span></a>
|
<a href="http://luajit.org/performance.html">Performance <span class="ext">»</span></a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/download.html">Download <span class="ext">»</span></a>
|
|
||||||
</li><li>
|
|
||||||
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
<a href="http://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||||
|
@ -27,6 +27,8 @@ td.idiomlua b { font-weight: normal; color: #2142bf; }
|
|||||||
<ul><li>
|
<ul><li>
|
||||||
<a href="luajit.html">LuaJIT</a>
|
<a href="luajit.html">LuaJIT</a>
|
||||||
<ul><li>
|
<ul><li>
|
||||||
|
<a href="http://luajit.org/download.html">Download <span class="ext">»</span></a>
|
||||||
|
</li><li>
|
||||||
<a href="install.html">Installation</a>
|
<a href="install.html">Installation</a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a href="running.html">Running</a>
|
<a href="running.html">Running</a>
|
||||||
@ -57,8 +59,6 @@ td.idiomlua b { font-weight: normal; color: #2142bf; }
|
|||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/performance.html">Performance <span class="ext">»</span></a>
|
<a href="http://luajit.org/performance.html">Performance <span class="ext">»</span></a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/download.html">Download <span class="ext">»</span></a>
|
|
||||||
</li><li>
|
|
||||||
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
<a href="http://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||||
|
@ -20,6 +20,8 @@
|
|||||||
<ul><li>
|
<ul><li>
|
||||||
<a href="luajit.html">LuaJIT</a>
|
<a href="luajit.html">LuaJIT</a>
|
||||||
<ul><li>
|
<ul><li>
|
||||||
|
<a href="http://luajit.org/download.html">Download <span class="ext">»</span></a>
|
||||||
|
</li><li>
|
||||||
<a href="install.html">Installation</a>
|
<a href="install.html">Installation</a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a href="running.html">Running</a>
|
<a href="running.html">Running</a>
|
||||||
@ -50,8 +52,6 @@
|
|||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/performance.html">Performance <span class="ext">»</span></a>
|
<a href="http://luajit.org/performance.html">Performance <span class="ext">»</span></a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/download.html">Download <span class="ext">»</span></a>
|
|
||||||
</li><li>
|
|
||||||
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
<a href="http://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||||
|
@ -37,6 +37,8 @@ td.excinterop {
|
|||||||
<ul><li>
|
<ul><li>
|
||||||
<a href="luajit.html">LuaJIT</a>
|
<a href="luajit.html">LuaJIT</a>
|
||||||
<ul><li>
|
<ul><li>
|
||||||
|
<a href="http://luajit.org/download.html">Download <span class="ext">»</span></a>
|
||||||
|
</li><li>
|
||||||
<a href="install.html">Installation</a>
|
<a href="install.html">Installation</a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a href="running.html">Running</a>
|
<a href="running.html">Running</a>
|
||||||
@ -67,8 +69,6 @@ td.excinterop {
|
|||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/performance.html">Performance <span class="ext">»</span></a>
|
<a href="http://luajit.org/performance.html">Performance <span class="ext">»</span></a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/download.html">Download <span class="ext">»</span></a>
|
|
||||||
</li><li>
|
|
||||||
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
<a href="http://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||||
@ -90,7 +90,7 @@ or LuaJIT.
|
|||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
LuaJIT extends the standard Lua VM with new functionality and adds
|
LuaJIT extends the standard Lua VM with new functionality and adds
|
||||||
several extension modules. Please note that this page is only about
|
several extension modules. Please note this page is only about
|
||||||
<em>functional</em> enhancements and not about performance enhancements,
|
<em>functional</em> enhancements and not about performance enhancements,
|
||||||
such as the optimized VM, the faster interpreter or the JIT compiler.
|
such as the optimized VM, the faster interpreter or the JIT compiler.
|
||||||
</p>
|
</p>
|
||||||
@ -236,6 +236,70 @@ across arbitrary C functions. Keep this in mind when
|
|||||||
upgrading from LuaJIT 1.x.
|
upgrading from LuaJIT 1.x.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<h2 id="lua52">Extensions from Lua 5.2</h2>
|
||||||
|
<p>
|
||||||
|
LuaJIT supports some language and library extensions from Lua 5.2.
|
||||||
|
Features that are unlikely to break existing code are unconditionally
|
||||||
|
enabled:
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li><tt>goto</tt> and <tt>::labels::</tt>.</li>
|
||||||
|
<li>Hex escapes <tt>'\x3F'</tt> and <tt>'\*'</tt> escape in strings.</li>
|
||||||
|
<li><tt>load(string|reader, chunkname [,mode [,env]])</tt>.
|
||||||
|
<tt>loadstring()</tt> is an alias.</li>
|
||||||
|
<li><tt>math.log(x [,base])</tt>.
|
||||||
|
<li><tt>string.rep(s, n [,sep])</tt>.
|
||||||
|
<li><tt>string.format()</tt>: <tt>%q</tt> reversible.
|
||||||
|
<tt>%s</tt> checks <tt>__tostring</tt>.
|
||||||
|
<tt>%a</tt> and <tt>"%A</tt> added.</li>
|
||||||
|
<li>String matching pattern <tt>%g</tt> added.</li>
|
||||||
|
<li><tt>io.read("*L")</tt>.</li>
|
||||||
|
<li><tt>io.lines()</tt> and <tt>file:lines()</tt> process
|
||||||
|
<tt>io.read()</tt> options.</li>
|
||||||
|
<li><tt>os.exit(status|true|false [,close])</tt>.</li>
|
||||||
|
<li><tt>package.searchpath(name, path [, sep [, rep]])</tt>.</li>
|
||||||
|
<li><tt>package.loadlib(name, "*")</tt>.</li>
|
||||||
|
<li><tt>debug.getinfo()</tt> returns <tt>nparams</tt> and <tt>isvararg</tt>
|
||||||
|
for option <tt>"u"</tt>.</li>
|
||||||
|
<li><tt>debug.getlocal()</tt> accepts function instead of level.</li>
|
||||||
|
<li><tt>debug.getlocal()</tt> and <tt>debug.setlocal()</tt> accept negative
|
||||||
|
indexes for varargs.</li>
|
||||||
|
<li><tt>debug.getupvalue()</tt> and <tt>debug.setupvalue()</tt> handle
|
||||||
|
C functions.</li>
|
||||||
|
<li><tt>debug.upvalueid()</tt> and <tt>debug.upvaluejoin()</tt>.</li>
|
||||||
|
<li>Command line option <tt>-E</tt>.</li>
|
||||||
|
<li>Command line checks <tt>__tostring</tt> for errors.</li>
|
||||||
|
</ul>
|
||||||
|
<p>
|
||||||
|
Other features are only enabled, if LuaJIT is built with
|
||||||
|
<tt>-DLUAJIT_ENABLE_LUA52COMPAT</tt>:
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li><tt>goto</tt> is a keyword and not a valid variable name anymore.</li>
|
||||||
|
<li><tt>break</tt> can be placed anywhere. Empty statements (<tt>;;</tt>)
|
||||||
|
are allowed.</li>
|
||||||
|
<li><tt>__lt</tt>, <tt>__le</tt> are invoked for mixed types.</li>
|
||||||
|
<li><tt>__len</tt> for tables. <tt>rawlen()</tt> library function.</li>
|
||||||
|
<li><tt>pairs()</tt> and <tt>ipairs()</tt> check for <tt>__pairs</tt> and
|
||||||
|
<tt>__ipairs</tt>.</li>
|
||||||
|
<li><tt>coroutine.running()</tt> returns two results.</li>
|
||||||
|
<li><tt>table.pack()</tt> and <tt>table.unpack()</tt>
|
||||||
|
(same as <tt>unpack()</tt>).</li>
|
||||||
|
<li><tt>io.write()</tt> and <tt>file:write()</tt> return file handle
|
||||||
|
instead of <tt>true</tt>.</li>
|
||||||
|
<li><tt>os.execute()</tt> and <tt>pipe:close()</tt> return detailed
|
||||||
|
exit status.</li>
|
||||||
|
<li><tt>debug.setmetatable()</tt> returns object.</li>
|
||||||
|
<li><tt>debug.getuservalue()</tt> and <tt>debug.setuservalue()</tt>.</li>
|
||||||
|
<li>Remove <tt>math.mod()</tt>, <tt>string.gfind()</tt>.
|
||||||
|
</ul>
|
||||||
|
<p>
|
||||||
|
Note: this provides only partial compatibility with Lua 5.2 at the
|
||||||
|
language and Lua library level. LuaJIT is API+ABI-compatible with
|
||||||
|
Lua 5.1, which prevents implementing features that would otherwise
|
||||||
|
break the Lua/C API and ABI (e.g. <tt>_ENV</tt>).
|
||||||
|
</p>
|
||||||
|
|
||||||
<h2 id="exceptions">C++ Exception Interoperability</h2>
|
<h2 id="exceptions">C++ Exception Interoperability</h2>
|
||||||
<p>
|
<p>
|
||||||
LuaJIT has built-in support for interoperating with C++ exceptions.
|
LuaJIT has built-in support for interoperating with C++ exceptions.
|
||||||
|
@ -23,6 +23,8 @@ dd { margin-left: 1.5em; }
|
|||||||
<ul><li>
|
<ul><li>
|
||||||
<a href="luajit.html">LuaJIT</a>
|
<a href="luajit.html">LuaJIT</a>
|
||||||
<ul><li>
|
<ul><li>
|
||||||
|
<a href="http://luajit.org/download.html">Download <span class="ext">»</span></a>
|
||||||
|
</li><li>
|
||||||
<a href="install.html">Installation</a>
|
<a href="install.html">Installation</a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a href="running.html">Running</a>
|
<a href="running.html">Running</a>
|
||||||
@ -53,8 +55,6 @@ dd { margin-left: 1.5em; }
|
|||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/performance.html">Performance <span class="ext">»</span></a>
|
<a href="http://luajit.org/performance.html">Performance <span class="ext">»</span></a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/download.html">Download <span class="ext">»</span></a>
|
|
||||||
</li><li>
|
|
||||||
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
<a href="http://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||||
|
@ -48,6 +48,8 @@ td.compatno {
|
|||||||
<ul><li>
|
<ul><li>
|
||||||
<a href="luajit.html">LuaJIT</a>
|
<a href="luajit.html">LuaJIT</a>
|
||||||
<ul><li>
|
<ul><li>
|
||||||
|
<a href="http://luajit.org/download.html">Download <span class="ext">»</span></a>
|
||||||
|
</li><li>
|
||||||
<a class="current" href="install.html">Installation</a>
|
<a class="current" href="install.html">Installation</a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a href="running.html">Running</a>
|
<a href="running.html">Running</a>
|
||||||
@ -78,8 +80,6 @@ td.compatno {
|
|||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/performance.html">Performance <span class="ext">»</span></a>
|
<a href="http://luajit.org/performance.html">Performance <span class="ext">»</span></a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/download.html">Download <span class="ext">»</span></a>
|
|
||||||
</li><li>
|
|
||||||
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
<a href="http://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||||
|
182
doc/luajit.html
182
doc/luajit.html
@ -9,6 +9,87 @@
|
|||||||
<link rel="stylesheet" type="text/css" href="bluequad.css" media="screen">
|
<link rel="stylesheet" type="text/css" href="bluequad.css" media="screen">
|
||||||
<link rel="stylesheet" type="text/css" href="bluequad-print.css" media="print">
|
<link rel="stylesheet" type="text/css" href="bluequad-print.css" media="print">
|
||||||
<meta name="description" content="LuaJIT is a Just-In-Time (JIT) compiler for the Lua language.">
|
<meta name="description" content="LuaJIT is a Just-In-Time (JIT) compiler for the Lua language.">
|
||||||
|
<style type="text/css">
|
||||||
|
table.feature {
|
||||||
|
width: inherit;
|
||||||
|
line-height: 1.2;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
table.feature td {
|
||||||
|
width: 80px;
|
||||||
|
height: 40px;
|
||||||
|
vertical-align: middle;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: bold;
|
||||||
|
border: 4px solid #e6ecff;
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
|
table.os td {
|
||||||
|
background: #7080d0;
|
||||||
|
background-image: linear-gradient(#4060c0 10%, #b0b0ff 95%);
|
||||||
|
background-image: -moz-linear-gradient(#4060c0 10%, #b0b0ff 95%);
|
||||||
|
background-image: -webkit-linear-gradient(#4060c0 10%, #b0b0ff 95%);
|
||||||
|
background-image: -o-linear-gradient(#4060c0 10%, #b0b0ff 95%);
|
||||||
|
background-image: -ms-linear-gradient(#4060c0 10%, #b0b0ff 95%);
|
||||||
|
}
|
||||||
|
table.os1 td {
|
||||||
|
color: #ffff80;
|
||||||
|
}
|
||||||
|
table.os2 td {
|
||||||
|
color: #ffa040;
|
||||||
|
}
|
||||||
|
table.compiler td {
|
||||||
|
color: #2080ff;
|
||||||
|
background: #62bf41;
|
||||||
|
background-image: linear-gradient(#62bf41 10%, #b0ffb0 95%);
|
||||||
|
background-image: -moz-linear-gradient(#62bf41 10%, #b0ffb0 95%);
|
||||||
|
background-image: -webkit-linear-gradient(#62bf41 10%, #b0ffb0 95%);
|
||||||
|
background-image: -o-linear-gradient(#62bf41 10%, #b0ffb0 95%);
|
||||||
|
background-image: -ms-linear-gradient(#62bf41 10%, #b0ffb0 95%);
|
||||||
|
}
|
||||||
|
table.cpu td {
|
||||||
|
color: #ffff00;
|
||||||
|
background: #cf7251;
|
||||||
|
background-image: linear-gradient(#bf6241 10%, #ffb0b0 95%);
|
||||||
|
background-image: -moz-linear-gradient(#bf6241 10%, #ffb0b0 95%);
|
||||||
|
background-image: -webkit-linear-gradient(#bf6241 10%, #ffb0b0 95%);
|
||||||
|
background-image: -o-linear-gradient(#bf6241 10%, #ffb0b0 95%);
|
||||||
|
background-image: -ms-linear-gradient(#bf6241 10%, #ffb0b0 95%);
|
||||||
|
}
|
||||||
|
table.fcompat td {
|
||||||
|
color: #2060e0;
|
||||||
|
background: #61cfcf;
|
||||||
|
background-image: linear-gradient(#41bfbf 10%, #b0ffff 95%);
|
||||||
|
background-image: -moz-linear-gradient(#41bfbf 10%, #b0ffff 95%);
|
||||||
|
background-image: -webkit-linear-gradient(#41bfbf 10%, #b0ffff 95%);
|
||||||
|
background-image: -o-linear-gradient(#41bfbf 10%, #b0ffff 95%);
|
||||||
|
background-image: -ms-linear-gradient(#41bfbf 10%, #b0ffff 95%);
|
||||||
|
}
|
||||||
|
table.stats td {
|
||||||
|
color: #ffffff;
|
||||||
|
background: #a0a0a0;
|
||||||
|
background-image: linear-gradient(#808080 10%, #d0d0d0 95%);
|
||||||
|
background-image: -moz-linear-gradient(#808080 10%, #d0d0d0 95%);
|
||||||
|
background-image: -webkit-linear-gradient(#808080 10%, #d0d0d0 95%);
|
||||||
|
background-image: -o-linear-gradient(#808080 10%, #d0d0d0 95%);
|
||||||
|
background-image: -ms-linear-gradient(#808080 10%, #d0d0d0 95%);
|
||||||
|
}
|
||||||
|
table.stats td.speed {
|
||||||
|
color: #ff4020;
|
||||||
|
}
|
||||||
|
table.stats td.kb {
|
||||||
|
color: #ffff80;
|
||||||
|
background: #808080;
|
||||||
|
background-image: linear-gradient(#606060 10%, #c0c0c0 95%);
|
||||||
|
background-image: -moz-linear-gradient(#606060 10%, #c0c0c0 95%);
|
||||||
|
background-image: -webkit-linear-gradient(#606060 10%, #c0c0c0 95%);
|
||||||
|
background-image: -o-linear-gradient(#606060 10%, #c0c0c0 95%);
|
||||||
|
background-image: -ms-linear-gradient(#606060 10%, #c0c0c0 95%);
|
||||||
|
}
|
||||||
|
table.feature small {
|
||||||
|
font-size: 50%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="site">
|
<div id="site">
|
||||||
@ -21,6 +102,8 @@
|
|||||||
<ul><li>
|
<ul><li>
|
||||||
<a class="current" href="luajit.html">LuaJIT</a>
|
<a class="current" href="luajit.html">LuaJIT</a>
|
||||||
<ul><li>
|
<ul><li>
|
||||||
|
<a href="http://luajit.org/download.html">Download <span class="ext">»</span></a>
|
||||||
|
</li><li>
|
||||||
<a href="install.html">Installation</a>
|
<a href="install.html">Installation</a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a href="running.html">Running</a>
|
<a href="running.html">Running</a>
|
||||||
@ -51,8 +134,6 @@
|
|||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/performance.html">Performance <span class="ext">»</span></a>
|
<a href="http://luajit.org/performance.html">Performance <span class="ext">»</span></a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/download.html">Download <span class="ext">»</span></a>
|
|
||||||
</li><li>
|
|
||||||
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
<a href="http://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||||
@ -60,77 +141,78 @@
|
|||||||
</div>
|
</div>
|
||||||
<div id="main">
|
<div id="main">
|
||||||
<p>
|
<p>
|
||||||
LuaJIT is a <b>Just-In-Time Compiler</b> for the Lua<sup>*</sup>
|
LuaJIT is a <b>Just-In-Time Compiler</b> (JIT) for the
|
||||||
programming language.
|
<a href="http://www.lua.org/"><span class="ext">»</span> Lua</a> programming language.
|
||||||
|
Lua is a powerful, dynamic and light-weight programming language.
|
||||||
|
It may be embedded or used as a general-purpose, stand-alone language.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
LuaJIT is Copyright © 2005-2012 Mike Pall.
|
LuaJIT is Copyright © 2005-2012 Mike Pall, released under the
|
||||||
LuaJIT is open source software, released under the
|
<a href="http://www.opensource.org/licenses/mit-license.php"><span class="ext">»</span> MIT open source license</a>.
|
||||||
<a href="http://www.opensource.org/licenses/mit-license.php"><span class="ext">»</span> MIT license</a>.
|
|
||||||
</p>
|
|
||||||
<p class="indent" style="color: #606060;">
|
|
||||||
* Lua is a powerful, dynamic and light-weight programming language
|
|
||||||
designed for extending applications. Lua is also frequently used as a
|
|
||||||
general-purpose, stand-alone language. More information about
|
|
||||||
Lua can be found at: <a href="http://www.lua.org/"><span class="ext">»</span> http://www.lua.org/</a>
|
|
||||||
</p>
|
|
||||||
<h2>Compatibility</h2>
|
|
||||||
<p>
|
|
||||||
LuaJIT implements the full set of language features defined by Lua 5.1.
|
|
||||||
The virtual machine (VM) is <b>API- and ABI-compatible</b> to the
|
|
||||||
standard Lua interpreter and can be deployed as a drop-in replacement.
|
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
LuaJIT offers more performance, at the expense of portability. It
|
|
||||||
currently runs on all popular operating systems based on
|
|
||||||
<b>x86</b> or <b>x64</b> CPUs (Linux, Windows, OSX etc.) or embedded
|
|
||||||
systems based on <b>ARM</b> (Android, iOS), <b>PPC</b> or <b>MIPS</b> CPUs.
|
|
||||||
Other platforms will be supported in the future, based on user demand
|
|
||||||
and sponsoring.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<h2>Compatibility</h2>
|
||||||
|
<table class="feature os os1">
|
||||||
|
<tr><td>Windows</td><td>Linux</td><td>BSD</td><td>OSX</td><td>POSIX</td></tr>
|
||||||
|
</table>
|
||||||
|
<table class="feature os os2">
|
||||||
|
<tr><td><span style="font-size:90%;">Embedded</span></td><td>Android</td><td>iOS</td><td>PS3</td></tr>
|
||||||
|
</table>
|
||||||
|
<table class="feature compiler">
|
||||||
|
<tr><td>GCC</td><td>CLANG<br>LLVM</td><td>MSVC</td></tr>
|
||||||
|
</table>
|
||||||
|
<table class="feature cpu">
|
||||||
|
<tr><td>x86</td><td>x64</td><td>ARM</td><td>PPC</td><td>e500</td><td>MIPS</td></tr>
|
||||||
|
</table>
|
||||||
|
<table class="feature fcompat">
|
||||||
|
<tr><td>Lua 5.1<br>API+ABI</td><td>+ JIT</td><td>+ BitOp</td><td>+ FFI</td><td>Drop-in<br>DLL/.so</td></tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
<h2>Overview</h2>
|
<h2>Overview</h2>
|
||||||
<p>
|
<table class="feature stats">
|
||||||
|
<tr>
|
||||||
|
<td class="speed">3x<br>- 100x</td>
|
||||||
|
<td class="kb">115 <small>KB</small><br>VM</td>
|
||||||
|
<td class="kb">90 <small>KB</small><br>JIT</td>
|
||||||
|
<td class="kloc">73 <small>KLOC</small><br>C</td>
|
||||||
|
<td class="kloc">24 <small>KLOC</small><br>ASM</td>
|
||||||
|
<td class="kloc">11 <small>KLOC</small><br>Lua</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<p style="margin-top: 1em;">
|
||||||
LuaJIT has been successfully used as a <b>scripting middleware</b> in
|
LuaJIT has been successfully used as a <b>scripting middleware</b> in
|
||||||
games, 3D modellers, numerical simulations, trading platforms and many
|
games, appliances, network and graphics apps, numerical simulations,
|
||||||
other specialty applications. It combines high flexibility with high
|
trading platforms and many other specialty applications. It scales from
|
||||||
performance and an unmatched <b>low memory footprint</b>: less than
|
embedded devices, smartphones, desktops up to server farms. It combines
|
||||||
<b>125K</b> for the VM plus less than <b>85K</b> for the JIT compiler (on x86).
|
high flexibility with <a href="http://luajit.org/performance.html"><span class="ext">»</span> high performance</a>
|
||||||
|
and an unmatched <b>low memory footprint</b>.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
LuaJIT has been in continuous development since 2005. It's widely
|
LuaJIT has been in continuous development since 2005. It's widely
|
||||||
considered to be <b>one of the fastest dynamic language
|
considered to be <b>one of the fastest dynamic language
|
||||||
implementations</b>. It has outperformed other dynamic languages on many
|
implementations</b>. It has outperformed other dynamic languages on many
|
||||||
cross-language benchmarks since its first release — often by a
|
cross-language benchmarks since its first release — often by a
|
||||||
substantial margin. In 2009 other dynamic language VMs started to catch up
|
substantial margin.
|
||||||
with the performance of LuaJIT 1.x. Well, I couldn't let that slide. ;-)
|
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
2009 also marks the first release of the long-awaited <b>LuaJIT 2.0</b>.
|
For <b>LuaJIT 2.0</b> the whole VM has been rewritten from the ground up
|
||||||
The whole VM has been rewritten from the ground up and relentlessly
|
and relentlessly optimized for performance. It combines a <b>high-speed
|
||||||
optimized for performance. It combines a high-speed interpreter,
|
interpreter</b>, written in assembler, with a <b>state-of-the-art JIT
|
||||||
written in assembler, with a state-of-the-art JIT compiler.
|
compiler</b>.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
An innovative <b>trace compiler</b> is integrated with advanced,
|
An innovative <b>trace compiler</b> is integrated with advanced,
|
||||||
SSA-based optimizations and a highly tuned code generation backend. This
|
SSA-based optimizations and highly tuned code generation backends.
|
||||||
allows a substantial reduction of the overhead associated with dynamic
|
A substantial reduction of the overhead associated with dynamic languages
|
||||||
language features.
|
allows it to break into the performance range traditionally reserved for
|
||||||
</p>
|
offline, static language compilers.
|
||||||
<p>
|
|
||||||
It's destined to break into the <a href="http://luajit.org/performance.html"><span class="ext">»</span> performance</a>
|
|
||||||
range traditionally reserved for offline, static language compilers.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2>More ...</h2>
|
<h2>More ...</h2>
|
||||||
<p>
|
<p>
|
||||||
Click on the LuaJIT sub-topics in the navigation bar to learn more
|
Please select a sub-topic in the navigation bar to learn more about LuaJIT.
|
||||||
about LuaJIT.
|
|
||||||
</p>
|
|
||||||
<p><p>
|
|
||||||
Click on the Logo in the upper left corner to visit
|
|
||||||
the LuaJIT project page on the web. All other links to online
|
|
||||||
resources are marked with a '<span class="ext">»</span>'.
|
|
||||||
</p>
|
</p>
|
||||||
<br class="flush">
|
<br class="flush">
|
||||||
</div>
|
</div>
|
||||||
|
@ -42,6 +42,8 @@ td.param_default {
|
|||||||
<ul><li>
|
<ul><li>
|
||||||
<a href="luajit.html">LuaJIT</a>
|
<a href="luajit.html">LuaJIT</a>
|
||||||
<ul><li>
|
<ul><li>
|
||||||
|
<a href="http://luajit.org/download.html">Download <span class="ext">»</span></a>
|
||||||
|
</li><li>
|
||||||
<a href="install.html">Installation</a>
|
<a href="install.html">Installation</a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a class="current" href="running.html">Running</a>
|
<a class="current" href="running.html">Running</a>
|
||||||
@ -72,8 +74,6 @@ td.param_default {
|
|||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/performance.html">Performance <span class="ext">»</span></a>
|
<a href="http://luajit.org/performance.html">Performance <span class="ext">»</span></a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/download.html">Download <span class="ext">»</span></a>
|
|
||||||
</li><li>
|
|
||||||
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
<a href="http://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||||
|
156
doc/status.html
156
doc/status.html
@ -23,6 +23,8 @@ ul li { padding-bottom: 0.3em; }
|
|||||||
<ul><li>
|
<ul><li>
|
||||||
<a href="luajit.html">LuaJIT</a>
|
<a href="luajit.html">LuaJIT</a>
|
||||||
<ul><li>
|
<ul><li>
|
||||||
|
<a href="http://luajit.org/download.html">Download <span class="ext">»</span></a>
|
||||||
|
</li><li>
|
||||||
<a href="install.html">Installation</a>
|
<a href="install.html">Installation</a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a href="running.html">Running</a>
|
<a href="running.html">Running</a>
|
||||||
@ -53,8 +55,6 @@ ul li { padding-bottom: 0.3em; }
|
|||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/performance.html">Performance <span class="ext">»</span></a>
|
<a href="http://luajit.org/performance.html">Performance <span class="ext">»</span></a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/download.html">Download <span class="ext">»</span></a>
|
|
||||||
</li><li>
|
|
||||||
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
<a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a>
|
||||||
</li><li>
|
</li><li>
|
||||||
<a href="http://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
<a href="http://luajit.org/list.html">Mailing List <span class="ext">»</span></a>
|
||||||
@ -62,7 +62,7 @@ ul li { padding-bottom: 0.3em; }
|
|||||||
</div>
|
</div>
|
||||||
<div id="main">
|
<div id="main">
|
||||||
<p>
|
<p>
|
||||||
The <span style="color: #0000c0;">LuaJIT 1.x</span> series represents
|
The <span style="color: #0000c0;">LuaJIT 1.x</span> series represents
|
||||||
the current <span style="color: #0000c0;">stable branch</span>.
|
the current <span style="color: #0000c0;">stable branch</span>.
|
||||||
Only a single bug has been discovered in the last three years. So, if
|
Only a single bug has been discovered in the last three years. So, if
|
||||||
you need a rock-solid VM, you are encouraged to fetch the latest
|
you need a rock-solid VM, you are encouraged to fetch the latest
|
||||||
@ -70,85 +70,34 @@ release of LuaJIT 1.x from the <a href="http://luajit.org/download.html"><span c
|
|||||||
page.
|
page.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<span style="color: #c00000;">LuaJIT 2.0</span> is the currently active
|
<span style="color: #c00000;">LuaJIT 2.0</span> is the currently active
|
||||||
<span style="color: #c00000;">development branch</span>.
|
<span style="color: #c00000;">development branch</span> in beta test.
|
||||||
It still has <b>Beta Test</b> status, but it's not undergoing substantial
|
It has <a href="http://luajit.org/performance.html"><span class="ext">»</span> much better performance</a> than
|
||||||
changes anymore.
|
LuaJIT 1.x and runs on many more platforms and architectures.
|
||||||
It has <a href="http://luajit.org/performance.html"><span class="ext">»</span> much better performance</a> than LuaJIT 1.x.
|
It's nearing a stable release, so you should definitely
|
||||||
It's nearly feature-complete, so you should definitely
|
|
||||||
start to evaluate it for new projects right now.
|
start to evaluate it for new projects right now.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2>Current Status</h2>
|
<h2>Current Status</h2>
|
||||||
<p>
|
<p>
|
||||||
This is a list of the things you should know about the LuaJIT 2.0 beta test:
|
LuaJIT ought to run all Lua 5.1-compatible source code just fine.
|
||||||
|
It's considered a serious bug if the VM crashes or produces unexpected
|
||||||
|
results — please report this.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Known incompatibilities and issues in LuaJIT 2.0:
|
||||||
</p>
|
</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
Obviously there will be some <b>bugs</b> in a VM which has been
|
There are some differences in <b>implementation-defined</b> behavior.
|
||||||
rewritten from the ground up. Please report your findings together with
|
These either have a good reason, are arbitrary design choices
|
||||||
the circumstances needed to reproduce the bug. If possible, reduce the
|
|
||||||
problem down to a simple test case.<br>
|
|
||||||
There is no formal bug tracker at the moment. The best place for
|
|
||||||
discussion is the <a href="http://luajit.org/list.html"><span class="ext">»</span> LuaJIT mailing list</a>. Of course
|
|
||||||
you may also send your bug reports <a href="contact.html">directly to me</a>,
|
|
||||||
especially when they contain lengthy debug output or if you require
|
|
||||||
confidentiality.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
The x86 JIT compiler only generates code for CPUs with support for
|
|
||||||
<b>SSE2</b> instructions. I.e. you need at least a P4, Core 2/i3/i5/i7,
|
|
||||||
Atom or K8/K10 to get the full benefit.<br>
|
|
||||||
If you run LuaJIT on older CPUs without SSE2 support, the JIT compiler
|
|
||||||
is disabled and the VM falls back to the LuaJIT interpreter. This is faster
|
|
||||||
than the Lua interpreter, but not nearly as fast as the JIT compiler of course.
|
|
||||||
Run the command line executable without arguments to show the current status
|
|
||||||
(<tt>JIT: ON</tt> or <tt>JIT: OFF</tt>).
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
The VM is complete in the sense that it <b>should</b> run all Lua code
|
|
||||||
just fine. It's considered a serious bug if the VM crashes or produces
|
|
||||||
unexpected results — please report this. There are only very few
|
|
||||||
known incompatibilities with standard Lua:
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
The Lua <b>debug API</b> is missing a couple of features (return
|
|
||||||
hooks for non-Lua functions) and shows slightly different behavior
|
|
||||||
(no per-coroutine hooks, no tail call counting).
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
Some of the <b>configuration options</b> of Lua 5.1 are not supported:
|
|
||||||
<ul>
|
|
||||||
<li>The <b>number type</b> cannot be changed (it's always a <tt>double</tt>).</li>
|
|
||||||
<li>The stand-alone executable cannot be linked with <b>readline</b>
|
|
||||||
to enable line editing. It's planned to add support for loading it
|
|
||||||
on-demand.</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
Most other issues you're likely to find (e.g. with the existing test
|
|
||||||
suites) are differences in the <b>implementation-defined</b> behavior.
|
|
||||||
These either have a good reason (like early tail call resolving which
|
|
||||||
may cause differences in error reporting), are arbitrary design choices
|
|
||||||
or are due to quirks in the VM. The latter cases may get fixed if a
|
or are due to quirks in the VM. The latter cases may get fixed if a
|
||||||
demonstrable need is shown.
|
demonstrable need is shown.
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li>
|
<li>
|
||||||
The <b>JIT compiler</b> falls back to the
|
The Lua <b>debug API</b> is missing a couple of features (return
|
||||||
interpreter in some cases. All of this works transparently, so unless
|
hooks for non-Lua functions) and shows slightly different behavior
|
||||||
you use <tt>-jv</tt>, you'll probably never notice (the interpreter is
|
in LuaJIT (no per-coroutine hooks, no tail call counting).
|
||||||
<a href="http://luajit.org/performance.html"><span class="ext">»</span> quite fast</a>, too). Here are the known issues:
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
Most known issues cause a <b>NYI</b> (not yet implemented) trace abort
|
|
||||||
message. E.g. for calls to some internal library
|
|
||||||
functions. Reporting these is only mildly useful, except if you have good
|
|
||||||
example code that shows the problem. Obviously, reports accompanied with
|
|
||||||
a patch to fix the issue are more than welcome. But please check back
|
|
||||||
with me, before writing major improvements, to avoid duplication of
|
|
||||||
effort.
|
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
Some checks are missing in the JIT-compiled code for obscure situations
|
Some checks are missing in the JIT-compiled code for obscure situations
|
||||||
@ -159,10 +108,8 @@ this.
|
|||||||
<li>
|
<li>
|
||||||
Currently some <b>out-of-memory</b> errors from <b>on-trace code</b> are not
|
Currently some <b>out-of-memory</b> errors from <b>on-trace code</b> are not
|
||||||
handled correctly. The error may fall through an on-trace
|
handled correctly. The error may fall through an on-trace
|
||||||
<tt>pcall</tt> (x86) or it may be passed on to the function set with
|
<tt>pcall</tt> or it may be passed on to the function set with
|
||||||
<tt>lua_atpanic</tt> (x64).
|
<tt>lua_atpanic</tt> on x64. This issue will be fixed in LuaJIT 2.1.
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -170,65 +117,10 @@ handled correctly. The error may fall through an on-trace
|
|||||||
<p>
|
<p>
|
||||||
Please refer to the
|
Please refer to the
|
||||||
<a href="http://www.freelists.org/post/luajit/LuaJIT-Roadmap-20122013"><span class="ext">»</span> LuaJIT
|
<a href="http://www.freelists.org/post/luajit/LuaJIT-Roadmap-20122013"><span class="ext">»</span> LuaJIT
|
||||||
Roadmap 2012/2013</a> for the latest release plan. Here's the general
|
Roadmap 2012/2013</a> for details.
|
||||||
project plan for LuaJIT 2.0:
|
</p>
|
||||||
|
<p>
|
||||||
</p>
|
</p>
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
The main goal right now is to stabilize LuaJIT 2.0 and get it out of
|
|
||||||
beta test. <b>Correctness</b> has priority over completeness. This
|
|
||||||
implies the first stable release will certainly NOT compile every
|
|
||||||
library function call and will fall back to the interpreter from time
|
|
||||||
to time. This is perfectly ok, since it still executes all Lua code,
|
|
||||||
just not at the highest possible speed.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
The next step is to get it to compile more library functions and handle
|
|
||||||
more cases where the compiler currently bails out. This doesn't mean it
|
|
||||||
will compile every corner case. It's much more important that it
|
|
||||||
performs well in a majority of use cases. Every compiler has to make
|
|
||||||
these trade-offs — <b>completeness</b> just cannot be the
|
|
||||||
overriding goal for a low-footprint, low-overhead JIT compiler.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
More <b>optimizations</b> will be added in parallel to the last step on
|
|
||||||
an as-needed basis. Sinking of stores
|
|
||||||
to aggregates and sinking of allocations are high on the list.
|
|
||||||
More complex optimizations with less pay-off, such as value-range-propagation
|
|
||||||
(VRP) will have to wait.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
LuaJIT 2.0 has been designed with <b>portability</b> in mind.
|
|
||||||
Nonetheless, it compiles to native code and needs to be adapted to each
|
|
||||||
architecture. The two major work items are porting the the fast interpreter,
|
|
||||||
which is written in assembler, and porting the compiler backend.
|
|
||||||
Most other portability issues like endianess or 32 vs. 64 bit CPUs
|
|
||||||
have already been taken care of.<br>
|
|
||||||
Several ports are already available, thanks to the
|
|
||||||
<a href="http://luajit.org/sponsors.html"><span class="ext">»</span> LuaJIT sponsorship program</a>.
|
|
||||||
More ports will follow in the future — companies which are
|
|
||||||
interested in sponsoring a port to a particular architecture, please
|
|
||||||
use the given contact address.
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<b>Documentation</b> about the <b>internals</b> of LuaJIT is still sorely
|
|
||||||
missing. Although the source code is included and is IMHO well
|
|
||||||
commented, many basic design decisions are in need of an explanation.
|
|
||||||
The rather un-traditional compiler architecture and the many highly
|
|
||||||
optimized data structures are a barrier for outside participation in
|
|
||||||
the development. Alas, as I've repeatedly stated, I'm better at
|
|
||||||
writing code than papers and I'm not in need of any academic merits.
|
|
||||||
Someday I will find the time for it. :-)
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
Producing good code for unbiased branches is a key problem for trace
|
|
||||||
compilers. This is the main cause for "trace explosion".
|
|
||||||
<b>Hyperblock scheduling</b> promises to solve this nicely at the
|
|
||||||
price of a major redesign of the compiler. This would also pave the
|
|
||||||
way for emitting predicated instructions, which is a prerequisite
|
|
||||||
for efficient <b>vectorization</b>.
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<br class="flush">
|
<br class="flush">
|
||||||
</div>
|
</div>
|
||||||
<div id="foot">
|
<div id="foot">
|
||||||
|
Loading…
Reference in New Issue
Block a user