diff options
| author | Mike Pall <mike> | 2012-10-14 21:48:04 +0200 |
|---|---|---|
| committer | Mike Pall <mike> | 2012-10-14 21:48:04 +0200 |
| commit | d70d77549b397a8b9ebeed199f32e7827214c00b (patch) | |
| tree | 9337bcd70521cf80f1e39971abe2e0efc32082ef /doc/status.html | |
| parent | a0ee70de6de0ade39de17b5678b23bf311d20d9e (diff) | |
| download | luajit-d70d77549b397a8b9ebeed199f32e7827214c00b.tar.gz luajit-d70d77549b397a8b9ebeed199f32e7827214c00b.tar.bz2 luajit-d70d77549b397a8b9ebeed199f32e7827214c00b.zip | |
Documentation cleanup and reorganization.
Diffstat (limited to 'doc/status.html')
| -rw-r--r-- | doc/status.html | 156 |
1 files changed, 24 insertions, 132 deletions
diff --git a/doc/status.html b/doc/status.html index eae43966..6bb4df89 100644 --- a/doc/status.html +++ b/doc/status.html | |||
| @@ -23,6 +23,8 @@ ul li { padding-bottom: 0.3em; } | |||
| 23 | <ul><li> | 23 | <ul><li> |
| 24 | <a href="luajit.html">LuaJIT</a> | 24 | <a href="luajit.html">LuaJIT</a> |
| 25 | <ul><li> | 25 | <ul><li> |
| 26 | <a href="http://luajit.org/download.html">Download <span class="ext">»</span></a> | ||
| 27 | </li><li> | ||
| 26 | <a href="install.html">Installation</a> | 28 | <a href="install.html">Installation</a> |
| 27 | </li><li> | 29 | </li><li> |
| 28 | <a href="running.html">Running</a> | 30 | <a href="running.html">Running</a> |
| @@ -53,8 +55,6 @@ ul li { padding-bottom: 0.3em; } | |||
| 53 | </li><li> | 55 | </li><li> |
| 54 | <a href="http://luajit.org/performance.html">Performance <span class="ext">»</span></a> | 56 | <a href="http://luajit.org/performance.html">Performance <span class="ext">»</span></a> |
| 55 | </li><li> | 57 | </li><li> |
| 56 | <a href="http://luajit.org/download.html">Download <span class="ext">»</span></a> | ||
| 57 | </li><li> | ||
| 58 | <a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a> | 58 | <a href="http://wiki.luajit.org/">Wiki <span class="ext">»</span></a> |
| 59 | </li><li> | 59 | </li><li> |
| 60 | <a href="http://luajit.org/list.html">Mailing List <span class="ext">»</span></a> | 60 | <a href="http://luajit.org/list.html">Mailing List <span class="ext">»</span></a> |
| @@ -62,7 +62,7 @@ ul li { padding-bottom: 0.3em; } | |||
| 62 | </div> | 62 | </div> |
| 63 | <div id="main"> | 63 | <div id="main"> |
| 64 | <p> | 64 | <p> |
| 65 | The <span style="color: #0000c0;">LuaJIT 1.x</span> series represents | 65 | The <span style="color: #0000c0;">LuaJIT 1.x</span> series represents |
| 66 | the current <span style="color: #0000c0;">stable branch</span>. | 66 | the current <span style="color: #0000c0;">stable branch</span>. |
| 67 | Only a single bug has been discovered in the last three years. So, if | 67 | Only a single bug has been discovered in the last three years. So, if |
| 68 | you need a rock-solid VM, you are encouraged to fetch the latest | 68 | 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 | |||
| 70 | page. | 70 | page. |
| 71 | </p> | 71 | </p> |
| 72 | <p> | 72 | <p> |
| 73 | <span style="color: #c00000;">LuaJIT 2.0</span> is the currently active | 73 | <span style="color: #c00000;">LuaJIT 2.0</span> is the currently active |
| 74 | <span style="color: #c00000;">development branch</span>. | 74 | <span style="color: #c00000;">development branch</span> in beta test. |
| 75 | It still has <b>Beta Test</b> status, but it's not undergoing substantial | 75 | It has <a href="http://luajit.org/performance.html"><span class="ext">»</span> much better performance</a> than |
| 76 | changes anymore. | 76 | LuaJIT 1.x and runs on many more platforms and architectures. |
| 77 | It has <a href="http://luajit.org/performance.html"><span class="ext">»</span> much better performance</a> than LuaJIT 1.x. | 77 | It's nearing a stable release, so you should definitely |
| 78 | It's nearly feature-complete, so you should definitely | ||
| 79 | start to evaluate it for new projects right now. | 78 | start to evaluate it for new projects right now. |
| 80 | </p> | 79 | </p> |
| 81 | 80 | ||
| 82 | <h2>Current Status</h2> | 81 | <h2>Current Status</h2> |
| 83 | <p> | 82 | <p> |
| 84 | This is a list of the things you should know about the LuaJIT 2.0 beta test: | 83 | LuaJIT ought to run all Lua 5.1-compatible source code just fine. |
| 84 | It's considered a serious bug if the VM crashes or produces unexpected | ||
| 85 | results — please report this. | ||
| 86 | </p> | ||
| 87 | <p> | ||
| 88 | Known incompatibilities and issues in LuaJIT 2.0: | ||
| 85 | </p> | 89 | </p> |
| 86 | <ul> | 90 | <ul> |
| 87 | <li> | 91 | <li> |
| 88 | Obviously there will be some <b>bugs</b> in a VM which has been | 92 | There are some differences in <b>implementation-defined</b> behavior. |
| 89 | rewritten from the ground up. Please report your findings together with | 93 | These either have a good reason, are arbitrary design choices |
| 90 | the circumstances needed to reproduce the bug. If possible, reduce the | ||
| 91 | problem down to a simple test case.<br> | ||
| 92 | There is no formal bug tracker at the moment. The best place for | ||
| 93 | discussion is the <a href="http://luajit.org/list.html"><span class="ext">»</span> LuaJIT mailing list</a>. Of course | ||
| 94 | you may also send your bug reports <a href="contact.html">directly to me</a>, | ||
| 95 | especially when they contain lengthy debug output or if you require | ||
| 96 | confidentiality. | ||
| 97 | </li> | ||
| 98 | <li> | ||
| 99 | The x86 JIT compiler only generates code for CPUs with support for | ||
| 100 | <b>SSE2</b> instructions. I.e. you need at least a P4, Core 2/i3/i5/i7, | ||
| 101 | Atom or K8/K10 to get the full benefit.<br> | ||
| 102 | If you run LuaJIT on older CPUs without SSE2 support, the JIT compiler | ||
| 103 | is disabled and the VM falls back to the LuaJIT interpreter. This is faster | ||
| 104 | than the Lua interpreter, but not nearly as fast as the JIT compiler of course. | ||
| 105 | Run the command line executable without arguments to show the current status | ||
| 106 | (<tt>JIT: ON</tt> or <tt>JIT: OFF</tt>). | ||
| 107 | </li> | ||
| 108 | <li> | ||
| 109 | The VM is complete in the sense that it <b>should</b> run all Lua code | ||
| 110 | just fine. It's considered a serious bug if the VM crashes or produces | ||
| 111 | unexpected results — please report this. There are only very few | ||
| 112 | known incompatibilities with standard Lua: | ||
| 113 | <ul> | ||
| 114 | <li> | ||
| 115 | The Lua <b>debug API</b> is missing a couple of features (return | ||
| 116 | hooks for non-Lua functions) and shows slightly different behavior | ||
| 117 | (no per-coroutine hooks, no tail call counting). | ||
| 118 | </li> | ||
| 119 | <li> | ||
| 120 | Some of the <b>configuration options</b> of Lua 5.1 are not supported: | ||
| 121 | <ul> | ||
| 122 | <li>The <b>number type</b> cannot be changed (it's always a <tt>double</tt>).</li> | ||
| 123 | <li>The stand-alone executable cannot be linked with <b>readline</b> | ||
| 124 | to enable line editing. It's planned to add support for loading it | ||
| 125 | on-demand.</li> | ||
| 126 | </ul> | ||
| 127 | </li> | ||
| 128 | <li> | ||
| 129 | Most other issues you're likely to find (e.g. with the existing test | ||
| 130 | suites) are differences in the <b>implementation-defined</b> behavior. | ||
| 131 | These either have a good reason (like early tail call resolving which | ||
| 132 | may cause differences in error reporting), are arbitrary design choices | ||
| 133 | or are due to quirks in the VM. The latter cases may get fixed if a | 94 | or are due to quirks in the VM. The latter cases may get fixed if a |
| 134 | demonstrable need is shown. | 95 | demonstrable need is shown. |
| 135 | </li> | 96 | </li> |
| 136 | </ul> | ||
| 137 | </li> | ||
| 138 | <li> | 97 | <li> |
| 139 | The <b>JIT compiler</b> falls back to the | 98 | The Lua <b>debug API</b> is missing a couple of features (return |
| 140 | interpreter in some cases. All of this works transparently, so unless | 99 | hooks for non-Lua functions) and shows slightly different behavior |
| 141 | you use <tt>-jv</tt>, you'll probably never notice (the interpreter is | 100 | in LuaJIT (no per-coroutine hooks, no tail call counting). |
| 142 | <a href="http://luajit.org/performance.html"><span class="ext">»</span> quite fast</a>, too). Here are the known issues: | ||
| 143 | <ul> | ||
| 144 | <li> | ||
| 145 | Most known issues cause a <b>NYI</b> (not yet implemented) trace abort | ||
| 146 | message. E.g. for calls to some internal library | ||
| 147 | functions. Reporting these is only mildly useful, except if you have good | ||
| 148 | example code that shows the problem. Obviously, reports accompanied with | ||
| 149 | a patch to fix the issue are more than welcome. But please check back | ||
| 150 | with me, before writing major improvements, to avoid duplication of | ||
| 151 | effort. | ||
| 152 | </li> | 101 | </li> |
| 153 | <li> | 102 | <li> |
| 154 | Some checks are missing in the JIT-compiled code for obscure situations | 103 | Some checks are missing in the JIT-compiled code for obscure situations |
| @@ -159,10 +108,8 @@ this. | |||
| 159 | <li> | 108 | <li> |
| 160 | Currently some <b>out-of-memory</b> errors from <b>on-trace code</b> are not | 109 | Currently some <b>out-of-memory</b> errors from <b>on-trace code</b> are not |
| 161 | handled correctly. The error may fall through an on-trace | 110 | handled correctly. The error may fall through an on-trace |
| 162 | <tt>pcall</tt> (x86) or it may be passed on to the function set with | 111 | <tt>pcall</tt> or it may be passed on to the function set with |
| 163 | <tt>lua_atpanic</tt> (x64). | 112 | <tt>lua_atpanic</tt> on x64. This issue will be fixed in LuaJIT 2.1. |
| 164 | </li> | ||
| 165 | </ul> | ||
| 166 | </li> | 113 | </li> |
| 167 | </ul> | 114 | </ul> |
| 168 | 115 | ||
| @@ -170,65 +117,10 @@ handled correctly. The error may fall through an on-trace | |||
| 170 | <p> | 117 | <p> |
| 171 | Please refer to the | 118 | Please refer to the |
| 172 | <a href="http://www.freelists.org/post/luajit/LuaJIT-Roadmap-20122013"><span class="ext">»</span> LuaJIT | 119 | <a href="http://www.freelists.org/post/luajit/LuaJIT-Roadmap-20122013"><span class="ext">»</span> LuaJIT |
| 173 | Roadmap 2012/2013</a> for the latest release plan. Here's the general | 120 | Roadmap 2012/2013</a> for details. |
| 174 | project plan for LuaJIT 2.0: | 121 | </p> |
| 122 | <p> | ||
| 175 | </p> | 123 | </p> |
| 176 | <ul> | ||
| 177 | <li> | ||
| 178 | The main goal right now is to stabilize LuaJIT 2.0 and get it out of | ||
| 179 | beta test. <b>Correctness</b> has priority over completeness. This | ||
| 180 | implies the first stable release will certainly NOT compile every | ||
| 181 | library function call and will fall back to the interpreter from time | ||
| 182 | to time. This is perfectly ok, since it still executes all Lua code, | ||
| 183 | just not at the highest possible speed. | ||
| 184 | </li> | ||
| 185 | <li> | ||
| 186 | The next step is to get it to compile more library functions and handle | ||
| 187 | more cases where the compiler currently bails out. This doesn't mean it | ||
| 188 | will compile every corner case. It's much more important that it | ||
| 189 | performs well in a majority of use cases. Every compiler has to make | ||
| 190 | these trade-offs — <b>completeness</b> just cannot be the | ||
| 191 | overriding goal for a low-footprint, low-overhead JIT compiler. | ||
| 192 | </li> | ||
| 193 | <li> | ||
| 194 | More <b>optimizations</b> will be added in parallel to the last step on | ||
| 195 | an as-needed basis. Sinking of stores | ||
| 196 | to aggregates and sinking of allocations are high on the list. | ||
| 197 | More complex optimizations with less pay-off, such as value-range-propagation | ||
| 198 | (VRP) will have to wait. | ||
| 199 | </li> | ||
| 200 | <li> | ||
| 201 | LuaJIT 2.0 has been designed with <b>portability</b> in mind. | ||
| 202 | Nonetheless, it compiles to native code and needs to be adapted to each | ||
| 203 | architecture. The two major work items are porting the the fast interpreter, | ||
| 204 | which is written in assembler, and porting the compiler backend. | ||
| 205 | Most other portability issues like endianess or 32 vs. 64 bit CPUs | ||
| 206 | have already been taken care of.<br> | ||
| 207 | Several ports are already available, thanks to the | ||
| 208 | <a href="http://luajit.org/sponsors.html"><span class="ext">»</span> LuaJIT sponsorship program</a>. | ||
| 209 | More ports will follow in the future — companies which are | ||
| 210 | interested in sponsoring a port to a particular architecture, please | ||
| 211 | use the given contact address. | ||
| 212 | </li> | ||
| 213 | <li> | ||
| 214 | <b>Documentation</b> about the <b>internals</b> of LuaJIT is still sorely | ||
| 215 | missing. Although the source code is included and is IMHO well | ||
| 216 | commented, many basic design decisions are in need of an explanation. | ||
| 217 | The rather un-traditional compiler architecture and the many highly | ||
| 218 | optimized data structures are a barrier for outside participation in | ||
| 219 | the development. Alas, as I've repeatedly stated, I'm better at | ||
| 220 | writing code than papers and I'm not in need of any academic merits. | ||
| 221 | Someday I will find the time for it. :-) | ||
| 222 | </li> | ||
| 223 | <li> | ||
| 224 | Producing good code for unbiased branches is a key problem for trace | ||
| 225 | compilers. This is the main cause for "trace explosion". | ||
| 226 | <b>Hyperblock scheduling</b> promises to solve this nicely at the | ||
| 227 | price of a major redesign of the compiler. This would also pave the | ||
| 228 | way for emitting predicated instructions, which is a prerequisite | ||
| 229 | for efficient <b>vectorization</b>. | ||
| 230 | </li> | ||
| 231 | </ul> | ||
| 232 | <br class="flush"> | 124 | <br class="flush"> |
| 233 | </div> | 125 | </div> |
| 234 | <div id="foot"> | 126 | <div id="foot"> |
