diff options
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/api.html | 147 | ||||
| -rw-r--r-- | doc/changes.html | 32 | ||||
| -rw-r--r-- | doc/faq.html | 23 | ||||
| -rw-r--r-- | doc/install.html | 59 | ||||
| -rw-r--r-- | doc/running.html | 6 | ||||
| -rw-r--r-- | doc/status.html | 21 |
6 files changed, 249 insertions, 39 deletions
diff --git a/doc/api.html b/doc/api.html index 79788d95..3bb10967 100644 --- a/doc/api.html +++ b/doc/api.html | |||
| @@ -100,12 +100,6 @@ These functions are typically used with the command line options | |||
| 100 | Flushes the whole cache of compiled code. | 100 | Flushes the whole cache of compiled code. |
| 101 | </p> | 101 | </p> |
| 102 | 102 | ||
| 103 | <h3 id="jit_flush_tr"><tt>jit.flush(tr)</tt></h3> | ||
| 104 | <p> | ||
| 105 | Flushes the code for the specified root trace and all of its | ||
| 106 | side traces from the cache. | ||
| 107 | </p> | ||
| 108 | |||
| 109 | <h3 id="jit_onoff_func"><tt>jit.on(func|true [,true|false])<br> | 103 | <h3 id="jit_onoff_func"><tt>jit.on(func|true [,true|false])<br> |
| 110 | jit.off(func|true [,true|false])<br> | 104 | jit.off(func|true [,true|false])<br> |
| 111 | jit.flush(func|true [,true|false])</tt></h3> | 105 | jit.flush(func|true [,true|false])</tt></h3> |
| @@ -142,6 +136,13 @@ of a module to turn off JIT compilation for the whole module for | |||
| 142 | debugging purposes. | 136 | debugging purposes. |
| 143 | </p> | 137 | </p> |
| 144 | 138 | ||
| 139 | <h3 id="jit_flush_tr"><tt>status = jit.flush(tr)</tt></h3> | ||
| 140 | <p> | ||
| 141 | Tries to flush the code for the specified trace and all of its | ||
| 142 | side traces from the cache. Returns <tt>true</tt> on success. | ||
| 143 | Returns <tt>false</tt> if there are still links to this trace. | ||
| 144 | </p> | ||
| 145 | |||
| 145 | <h3 id="jit_version"><tt>jit.version</tt></h3> | 146 | <h3 id="jit_version"><tt>jit.version</tt></h3> |
| 146 | <p> | 147 | <p> |
| 147 | Contains the LuaJIT version string. | 148 | Contains the LuaJIT version string. |
| @@ -189,6 +190,140 @@ The debug modules <tt>-jbc</tt>, <tt>-jv</tt> and <tt>-jdump</tt> make | |||
| 189 | extensive use of these functions. Please check out their source code, | 190 | extensive use of these functions. Please check out their source code, |
| 190 | if you want to know more. | 191 | if you want to know more. |
| 191 | </p> | 192 | </p> |
| 193 | |||
| 194 | <h2 id="c_api">C API extensions</h2> | ||
| 195 | <p> | ||
| 196 | LuaJIT adds some extensions to the Lua/C API. The LuaJIT include | ||
| 197 | directory must be in the compiler search path (<tt>-I<i>path</i></tt>) | ||
| 198 | to be able to include the required header for C code: | ||
| 199 | </p> | ||
| 200 | <pre class="code"> | ||
| 201 | #include "luajit.h" | ||
| 202 | </pre> | ||
| 203 | <p> | ||
| 204 | Or for C++ code: | ||
| 205 | </p> | ||
| 206 | <pre class="code"> | ||
| 207 | #include "lua.hpp" | ||
| 208 | </pre> | ||
| 209 | |||
| 210 | <h2 id="luaJIT_setmode"><tt>luaJIT_setmode(L, idx, mode)</tt> | ||
| 211 | — Control VM</h2> | ||
| 212 | <p> | ||
| 213 | This is a C API extension to allow control of the VM from C code. The | ||
| 214 | full prototype of <tt>LuaJIT_setmode</tt> is: | ||
| 215 | </p> | ||
| 216 | <pre class="code"> | ||
| 217 | LUA_API int luaJIT_setmode(lua_State *L, int idx, int mode); | ||
| 218 | </pre> | ||
| 219 | <p> | ||
| 220 | The returned status is either success (<tt>1</tt>) or failure (<tt>0</tt>). | ||
| 221 | The second argument is either <tt>0</tt> or a stack index (similar to the | ||
| 222 | other Lua/C API functions). | ||
| 223 | </p> | ||
| 224 | <p> | ||
| 225 | The third argument specifies the mode, which is 'or'ed with a flag. | ||
| 226 | The flag can be <tt>LUAJIT_MODE_OFF</tt> to turn a feature on, | ||
| 227 | <tt>LUAJIT_MODE_ON</tt> to turn a feature off, or | ||
| 228 | <tt>LUAJIT_MODE_FLUSH</tt> to flush cached code. | ||
| 229 | </p> | ||
| 230 | <p> | ||
| 231 | The following modes are defined: | ||
| 232 | </p> | ||
| 233 | |||
| 234 | <h3 id="mode_engine"><tt>luaJIT_setmode(L, 0, LUAJIT_MODE_ENGINE|flag)</tt></h3> | ||
| 235 | <p> | ||
| 236 | Turn the whole JIT compiler on or off or flush the whole cache of compiled code. | ||
| 237 | </p> | ||
| 238 | |||
| 239 | <h3 id="mode_func"><tt>luaJIT_setmode(L, idx, LUAJIT_MODE_FUNC|flag)</tt><br> | ||
| 240 | <tt>luaJIT_setmode(L, idx, LUAJIT_MODE_ALLFUNC|flag)</tt><br> | ||
| 241 | <tt>luaJIT_setmode(L, idx, LUAJIT_MODE_ALLSUBFUNC|flag)</tt></h3> | ||
| 242 | <p> | ||
| 243 | This sets the mode for the function at the stack index <tt>idx</tt> or | ||
| 244 | the parent of the calling function (<tt>idx = 0</tt>). It either | ||
| 245 | enables JIT compilation for a function, disables it and flushes any | ||
| 246 | already compiled code or only flushes already compiled code. This | ||
| 247 | applies recursively to all subfunctions of the function with | ||
| 248 | <tt>LUAJIT_MODE_ALLFUNC</tt> or only to the subfunctions with | ||
| 249 | <tt>LUAJIT_MODE_ALLSUBFUNC</tt>. | ||
| 250 | </p> | ||
| 251 | |||
| 252 | <h3 id="mode_engine"><tt>luaJIT_setmode(L, trace,<br> | ||
| 253 | LUAJIT_MODE_TRACE|LUAJIT_MODE_FLUSH)</tt></h3> | ||
| 254 | <p> | ||
| 255 | Tries to flush the code for the specified trace and all of its | ||
| 256 | side traces from the cache. | ||
| 257 | </p> | ||
| 258 | |||
| 259 | <h3 id="mode_engine"><tt>luaJIT_setmode(L, idx, LUAJIT_MODE_WRAPCFUNC|flag)</tt></h3> | ||
| 260 | <p> | ||
| 261 | This mode defines a wrapper function for calls to C functions. The | ||
| 262 | first time this is called with <tt>LUAJIT_MODE_ON</tt>, the stack | ||
| 263 | index at <tt>idx</tt> must be a <tt>lightuserdata</tt> object holding | ||
| 264 | a pointer to the wrapper function. All <b>subsequently created C | ||
| 265 | functions</b> are called through the wrapper functions. After the initial | ||
| 266 | definition <tt>idx</tt> can be left at <tt>0</tt> when turning the mode | ||
| 267 | on or off. | ||
| 268 | </p> | ||
| 269 | <p> | ||
| 270 | The wrapper function can be used for debugging purposes or to catch | ||
| 271 | and convert foreign exceptions. Recommended usage can be seen in this | ||
| 272 | C++ code excerpt: | ||
| 273 | </p> | ||
| 274 | <pre class="code"> | ||
| 275 | #include <exception> | ||
| 276 | #include "lua.hpp" | ||
| 277 | |||
| 278 | // Catch C++ exceptions and convert them to Lua error messages. | ||
| 279 | // Customize as needed for your own exception classes. | ||
| 280 | static int wrap_exceptions(lua_State *L, lua_CFunction f) | ||
| 281 | { | ||
| 282 | try { | ||
| 283 | return f(L); // Call wrapped function and return result. | ||
| 284 | } catch (const char *s) { // Catch and convert exceptions. | ||
| 285 | lua_pushstring(L, s); | ||
| 286 | } catch (std::exception& e) { | ||
| 287 | lua_pushstring(L, e.what()); | ||
| 288 | } catch (...) { | ||
| 289 | lua_pushliteral(L, "caught (...)"); | ||
| 290 | } | ||
| 291 | return lua_error(L); // Rethrow as a Lua error. | ||
| 292 | } | ||
| 293 | |||
| 294 | static int myregister(lua_State *L) | ||
| 295 | { | ||
| 296 | ... | ||
| 297 | // Define wrapper function and enable it. | ||
| 298 | lua_pushlightuserdata(L, (void *)wrap_exceptions); | ||
| 299 | luaJIT_setmode(L, -1, LUAJIT_MODE_WRAPCFUNC|LUAJIT_MODE_ON); | ||
| 300 | lua_pop(L, 1); | ||
| 301 | luaL_register(L, "mymodule", myfuncs); // Pass luaL_Reg list. | ||
| 302 | luaJIT_setmode(L, 0, LUAJIT_MODE_WRAPCFUNC|LUAJIT_MODE_OFF); | ||
| 303 | ... | ||
| 304 | // Wrap some more C++ functions which might throw an exception. | ||
| 305 | luaJIT_setmode(L, 0, LUAJIT_MODE_WRAPCFUNC|LUAJIT_MODE_ON); | ||
| 306 | lua_pushcfunction(L, mythrowingfunc1); | ||
| 307 | lua_pushcclosure(L, mythrowingfunc2, 1); | ||
| 308 | luaJIT_setmode(L, 0, LUAJIT_MODE_WRAPCFUNC|LUAJIT_MODE_OFF); | ||
| 309 | ... | ||
| 310 | } | ||
| 311 | </pre> | ||
| 312 | <p> | ||
| 313 | Note that you can only define <b>a single global wrapper function</b>, | ||
| 314 | so be careful when using this mechanism from multiple C++ modules. | ||
| 315 | Also note that this mechanism is not without overhead. It should only | ||
| 316 | be enabled for definitions of C++ functions that can actually throw | ||
| 317 | exceptions. If you're embedding LuaJIT into an application, only | ||
| 318 | enable it <b>after</b> running <tt>luaL_openlibs</tt>. | ||
| 319 | </p> | ||
| 320 | <p> | ||
| 321 | LuaJIT already intercepts exception handling for systems using | ||
| 322 | ELF/DWARF2 stack unwinding (e.g. Linux). This is a zero-cost mechanism | ||
| 323 | and always enabled. You don't need to use any wrapper functions, | ||
| 324 | except when you want to get a more specific error message than | ||
| 325 | <tt>"C++ exception"</tt>. | ||
| 326 | </p> | ||
| 192 | <br class="flush"> | 327 | <br class="flush"> |
| 193 | </div> | 328 | </div> |
| 194 | <div id="foot"> | 329 | <div id="foot"> |
diff --git a/doc/changes.html b/doc/changes.html index 6c34b8be..641f1e28 100644 --- a/doc/changes.html +++ b/doc/changes.html | |||
| @@ -43,7 +43,7 @@ div.major { max-width: 600px; padding: 1em; margin: 1em 0 1em 0; } | |||
| 43 | <div id="main"> | 43 | <div id="main"> |
| 44 | <p> | 44 | <p> |
| 45 | This is a list of changes between the released versions of LuaJIT.<br> | 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 2.0.0-beta1</strong>.<br> | 46 | The current <span style="color: #c00000;">development version</span> is <strong>LuaJIT 2.0.0-beta2</strong>.<br> |
| 47 | The current <span style="color: #0000c0;">stable version</span> is <strong>LuaJIT 1.1.5</strong>. | 47 | The current <span style="color: #0000c0;">stable version</span> is <strong>LuaJIT 1.1.5</strong>. |
| 48 | </p> | 48 | </p> |
| 49 | <p> | 49 | <p> |
| @@ -53,6 +53,36 @@ to see whether newer versions are available. | |||
| 53 | </p> | 53 | </p> |
| 54 | 54 | ||
| 55 | <div class="major" style="background: #ffd0d0;"> | 55 | <div class="major" style="background: #ffd0d0;"> |
| 56 | <h2 id="LuaJIT-2.0.0-beta2">LuaJIT 2.0.0-beta2 — 2009-11-09</h2> | ||
| 57 | <ul> | ||
| 58 | <li>Reorganize build system. Build static+shared library on POSIX.</li> | ||
| 59 | <li>Allow C++ exception conversion on all platforms | ||
| 60 | using a wrapper function.</li> | ||
| 61 | <li>Automatically catch C++ exceptions and rethrow Lua error | ||
| 62 | (ELF/DWARF2 only).</li> | ||
| 63 | <li>Check for the correct x87 FPU precision at strategic points.</li> | ||
| 64 | <li>Always use wrappers for libm functions.</li> | ||
| 65 | <li>Resurrect metamethod name strings before copying them.</li> | ||
| 66 | <li>Mark current trace, even if compiler is idle.</li> | ||
| 67 | <li>Ensure FILE metatable is created only once.</li> | ||
| 68 | <li>Fix type comparisons when different integer types are involved.</li> | ||
| 69 | <li>Fix getmetatable() recording.</li> | ||
| 70 | <li>Fix TDUP with dead keys in template table.</li> | ||
| 71 | <li><tt>jit.flush(tr)</tt> returns status. | ||
| 72 | Prevent manual flush of a trace that's still linked.</li> | ||
| 73 | <li>Improve register allocation heuristics for invariant references.</li> | ||
| 74 | <li>Compile the push/pop variants of <tt>table.insert()</tt> and | ||
| 75 | <tt>table.remove()</tt>.</li> | ||
| 76 | <li>Compatibility with MSVC <tt>link /debug</tt>.</li> | ||
| 77 | <li>Fix <tt>lua_iscfunction()</tt>.</li> | ||
| 78 | <li>Fix <tt>math.random()</tt> when compiled with <tt>-fpic</tt> (OSX).</li> | ||
| 79 | <li>Fix <tt>table.maxn()</tt>.</li> | ||
| 80 | <li>Bump <tt>MACOSX_DEPLOYMENT_TARGET</tt> to <tt>10.4</tt></li> | ||
| 81 | <li><tt>luaL_check*()</tt> and <tt>luaL_opt*()</tt> now support | ||
| 82 | negative arguments, too.<br> | ||
| 83 | This matches the behavior of Lua 5.1, but not the specification.</li> | ||
| 84 | </ul> | ||
| 85 | |||
| 56 | <h2 id="LuaJIT-2.0.0-beta1">LuaJIT 2.0.0-beta1 — 2009-10-31</h2> | 86 | <h2 id="LuaJIT-2.0.0-beta1">LuaJIT 2.0.0-beta1 — 2009-10-31</h2> |
| 57 | <ul> | 87 | <ul> |
| 58 | <li>This is the first public release of LuaJIT 2.0.</li> | 88 | <li>This is the first public release of LuaJIT 2.0.</li> |
diff --git a/doc/faq.html b/doc/faq.html index 6f62e1eb..f76308a1 100644 --- a/doc/faq.html +++ b/doc/faq.html | |||
| @@ -72,6 +72,7 @@ Search for: <a href="http://scholar.google.com/scholar?q=JIT+Compiler"><span cla | |||
| 72 | Search for: <a href="http://scholar.google.com/scholar?q=Dynamic+Language+Optimizations"><span class="ext">»</span> Dynamic Language Optimizations</a><br> | 72 | Search for: <a href="http://scholar.google.com/scholar?q=Dynamic+Language+Optimizations"><span class="ext">»</span> Dynamic Language Optimizations</a><br> |
| 73 | Search for: <a href="http://scholar.google.com/scholar?q=SSA+Form"><span class="ext">»</span> SSA Form</a><br> | 73 | Search for: <a href="http://scholar.google.com/scholar?q=SSA+Form"><span class="ext">»</span> SSA Form</a><br> |
| 74 | Search for: <a href="http://scholar.google.com/scholar?q=Linear+Scan+Register+Allocation"><span class="ext">»</span> Linear Scan Register Allocation</a><br> | 74 | Search for: <a href="http://scholar.google.com/scholar?q=Linear+Scan+Register+Allocation"><span class="ext">»</span> Linear Scan Register Allocation</a><br> |
| 75 | Here is a list of the <a href="http://article.gmane.org/gmane.comp.lang.lua.general/58908"><span class="ext">»</span> innovative features in LuaJIT</a>.<br> | ||
| 75 | And, you know, reading the source is of course the only way to enlightenment. :-) | 76 | And, you know, reading the source is of course the only way to enlightenment. :-) |
| 76 | </dd> | 77 | </dd> |
| 77 | </dl> | 78 | </dl> |
| @@ -87,6 +88,28 @@ vararg syntax</a>.</dd> | |||
| 87 | </dl> | 88 | </dl> |
| 88 | 89 | ||
| 89 | <dl> | 90 | <dl> |
| 91 | <dt>Q: Why do I get this error: "bad FPU precision"?<br> | ||
| 92 | <dt>Q: I get weird behavior after initializing Direct3D.<br> | ||
| 93 | <dt>Q: Some FPU operations crash after I load a Delphi DLL.<br> | ||
| 94 | </dt> | ||
| 95 | <dd> | ||
| 96 | |||
| 97 | DirectX/Direct3D (up to version 9) sets the x87 FPU to single-precision | ||
| 98 | mode by default. This violates the Windows ABI and interferes with the | ||
| 99 | operation of many programs — LuaJIT is affected, too. Please make | ||
| 100 | sure you always use the <tt>D3DCREATE_FPU_PRESERVE</tt> flag when | ||
| 101 | initializing Direct3D.<br> | ||
| 102 | |||
| 103 | Direct3D version 10 or higher do not show this behavior anymore. | ||
| 104 | Consider testing your application with older versions, too.<br> | ||
| 105 | |||
| 106 | Similarly, the Borland/Delphi runtime modifies the FPU control word and | ||
| 107 | enables FP exceptions. Of course this violates the Windows ABI, too. | ||
| 108 | Please check the Delphi docs for the Set8087CW method. | ||
| 109 | |||
| 110 | </dl> | ||
| 111 | |||
| 112 | <dl> | ||
| 90 | <dt>Q: Sometimes Ctrl-C fails to stop my Lua program. Why?</dt> | 113 | <dt>Q: Sometimes Ctrl-C fails to stop my Lua program. Why?</dt> |
| 91 | <dd>The interrupt signal handler sets a Lua debug hook. But this is | 114 | <dd>The interrupt signal handler sets a Lua debug hook. But this is |
| 92 | currently ignored by compiled code (this will eventually be fixed). If | 115 | currently ignored by compiled code (this will eventually be fixed). If |
diff --git a/doc/install.html b/doc/install.html index b7211d21..3aa60f1c 100644 --- a/doc/install.html +++ b/doc/install.html | |||
| @@ -58,17 +58,15 @@ application under x64-based systems, too. | |||
| 58 | <h2>Configuring LuaJIT</h2> | 58 | <h2>Configuring LuaJIT</h2> |
| 59 | <p> | 59 | <p> |
| 60 | The standard configuration should work fine for most installations. | 60 | The standard configuration should work fine for most installations. |
| 61 | Usually there is no need to tweak the settings, except when you want to | 61 | Usually there is no need to tweak the settings. The following files |
| 62 | install to a non-standard path. The following three files hold all | 62 | hold all user-configurable settings: |
| 63 | user-configurable settings: | ||
| 64 | </p> | 63 | </p> |
| 65 | <ul> | 64 | <ul> |
| 66 | <li><tt>src/luaconf.h</tt> sets some configuration variables, in | 65 | <li><tt>src/luaconf.h</tt> sets some configuration variables.</li> |
| 67 | particular the default paths for loading modules.</li> | 66 | <li><tt>Makefile</tt> has settings for <b>installing</b> LuaJIT (POSIX |
| 68 | <li><tt>Makefile</tt> has settings for installing LuaJIT (POSIX | ||
| 69 | only).</li> | 67 | only).</li> |
| 70 | <li><tt>src/Makefile</tt> has settings for compiling LuaJIT under POSIX, | 68 | <li><tt>src/Makefile</tt> has settings for <b>compiling</b> LuaJIT |
| 71 | MinGW and Cygwin.</li> | 69 | under POSIX, MinGW and Cygwin.</li> |
| 72 | <li><tt>src/msvcbuild.bat</tt> has settings for compiling LuaJIT with | 70 | <li><tt>src/msvcbuild.bat</tt> has settings for compiling LuaJIT with |
| 73 | MSVC.</li> | 71 | MSVC.</li> |
| 74 | </ul> | 72 | </ul> |
| @@ -97,9 +95,8 @@ terminal window and change to this directory. Now unpack the archive | |||
| 97 | and change to the newly created directory: | 95 | and change to the newly created directory: |
| 98 | </p> | 96 | </p> |
| 99 | <pre class="code"> | 97 | <pre class="code"> |
| 100 | tar zxf LuaJIT-2.0.0-beta1.tar.gz | 98 | tar zxf LuaJIT-2.0.0-beta2.tar.gz |
| 101 | cd LuaJIT-2.0.0-beta1 | 99 | cd LuaJIT-2.0.0-beta2</pre> |
| 102 | </pre> | ||
| 103 | <h3>Building LuaJIT</h3> | 100 | <h3>Building LuaJIT</h3> |
| 104 | <p> | 101 | <p> |
| 105 | The supplied Makefiles try to auto-detect the settings needed for your | 102 | The supplied Makefiles try to auto-detect the settings needed for your |
| @@ -109,6 +106,18 @@ which is probably the default on your system, anyway. Simply run: | |||
| 109 | <pre class="code"> | 106 | <pre class="code"> |
| 110 | make | 107 | make |
| 111 | </pre> | 108 | </pre> |
| 109 | <p> | ||
| 110 | By default modules are only searched under the prefix <tt>/usr/local</tt>. | ||
| 111 | You can add an extra prefix to the search paths by appending the | ||
| 112 | <tt>PREFIX</tt> option, e.g.: | ||
| 113 | </p> | ||
| 114 | <pre class="code"> | ||
| 115 | make PREFIX=/home/myself/lj2 | ||
| 116 | </pre> | ||
| 117 | <p> | ||
| 118 | Note for OSX: <tt>MACOSX_DEPLOYMENT_TARGET</tt> is set to <tt>10.4</tt> | ||
| 119 | in <tt>src/Makefile</tt>. Change it, if you want to build on an older version. | ||
| 120 | </p> | ||
| 112 | <h3>Installing LuaJIT</h3> | 121 | <h3>Installing LuaJIT</h3> |
| 113 | <p> | 122 | <p> |
| 114 | The top-level Makefile installs LuaJIT by default under | 123 | The top-level Makefile installs LuaJIT by default under |
| @@ -124,20 +133,19 @@ sudo make install | |||
| 124 | Otherwise specify the directory prefix as an absolute path, e.g.: | 133 | Otherwise specify the directory prefix as an absolute path, e.g.: |
| 125 | </p> | 134 | </p> |
| 126 | <pre class="code"> | 135 | <pre class="code"> |
| 127 | sudo make install PREFIX=/opt/lj2 | 136 | make install PREFIX=/home/myself/lj2 |
| 128 | </pre> | 137 | </pre> |
| 129 | <p> | 138 | <p> |
| 130 | But note that the installation prefix and the prefix for the module paths | 139 | Obviously the prefixes given during build and installation need to be the same. |
| 131 | (configured in <tt>src/luaconf.h</tt>) must match. | ||
| 132 | </p> | 140 | </p> |
| 133 | <p style="color: #c00000;"> | 141 | <p style="color: #c00000;"> |
| 134 | Note: to avoid overwriting a previous version, the beta test releases | 142 | Note: to avoid overwriting a previous version, the beta test releases |
| 135 | only install the LuaJIT executable under the versioned name (i.e. | 143 | only install the LuaJIT executable under the versioned name (i.e. |
| 136 | <tt>luajit-2.0.0-beta1</tt>). You probably want to create a symlink | 144 | <tt>luajit-2.0.0-beta2</tt>). You probably want to create a symlink |
| 137 | for convenience, with a command like this: | 145 | for convenience, with a command like this: |
| 138 | </p> | 146 | </p> |
| 139 | <pre class="code" style="color: #c00000;"> | 147 | <pre class="code" style="color: #c00000;"> |
| 140 | sudo ln -sf luajit-2.0.0-beta1 /usr/local/bin/luajit | 148 | sudo ln -sf luajit-2.0.0-beta2 /usr/local/bin/luajit |
| 141 | </pre> | 149 | </pre> |
| 142 | 150 | ||
| 143 | <h2 id="windows">Windows Systems</h2> | 151 | <h2 id="windows">Windows Systems</h2> |
| @@ -145,8 +153,8 @@ sudo ln -sf luajit-2.0.0-beta1 /usr/local/bin/luajit | |||
| 145 | <p> | 153 | <p> |
| 146 | Either install one of the open source SDKs | 154 | Either install one of the open source SDKs |
| 147 | (<a href="http://mingw.org/"><span class="ext">»</span> MinGW</a> or | 155 | (<a href="http://mingw.org/"><span class="ext">»</span> MinGW</a> or |
| 148 | <a href="http://www.cygwin.com/"><span class="ext">»</span> Cygwin</a>) which come with modified | 156 | <a href="http://www.cygwin.com/"><span class="ext">»</span> Cygwin</a>), which come with a modified |
| 149 | versions of GCC plus the required development headers. | 157 | GCC plus the required development headers. |
| 150 | </p> | 158 | </p> |
| 151 | <p> | 159 | <p> |
| 152 | Or install Microsoft's Visual C++ (MSVC) — the freely downloadable | 160 | Or install Microsoft's Visual C++ (MSVC) — the freely downloadable |
| @@ -159,8 +167,8 @@ Next, download the source package and unpack it using an archive manager | |||
| 159 | </p> | 167 | </p> |
| 160 | <h3>Building with MSVC</h3> | 168 | <h3>Building with MSVC</h3> |
| 161 | <p> | 169 | <p> |
| 162 | Open a "Visual Studio .NET Command Prompt" and <tt>cd</tt> to the | 170 | Open a "Visual Studio .NET Command Prompt", <tt>cd</tt> to the |
| 163 | directory where you've unpacked the sources. Then run this command: | 171 | directory where you've unpacked the sources and run these commands: |
| 164 | </p> | 172 | </p> |
| 165 | <pre class="code"> | 173 | <pre class="code"> |
| 166 | cd src | 174 | cd src |
| @@ -176,14 +184,12 @@ are in your path. Then <tt>cd</tt> to the directory where | |||
| 176 | you've unpacked the sources and run this command for MinGW: | 184 | you've unpacked the sources and run this command for MinGW: |
| 177 | </p> | 185 | </p> |
| 178 | <pre class="code"> | 186 | <pre class="code"> |
| 179 | cd src | ||
| 180 | mingw32-make | 187 | mingw32-make |
| 181 | </pre> | 188 | </pre> |
| 182 | <p> | 189 | <p> |
| 183 | Or this command for Cygwin: | 190 | Or this command for Cygwin: |
| 184 | </p> | 191 | </p> |
| 185 | <pre class="code"> | 192 | <pre class="code"> |
| 186 | cd src | ||
| 187 | make | 193 | make |
| 188 | </pre> | 194 | </pre> |
| 189 | <p> | 195 | <p> |
| @@ -191,10 +197,11 @@ Then follow the installation instructions below. | |||
| 191 | </p> | 197 | </p> |
| 192 | <h3>Installing LuaJIT</h3> | 198 | <h3>Installing LuaJIT</h3> |
| 193 | <p> | 199 | <p> |
| 194 | Copy <tt>luajit.exe</tt> and <tt>lua51.dll</tt> | 200 | Copy <tt>luajit.exe</tt> and <tt>lua51.dll</tt> (built in the <tt>src</tt> |
| 195 | to a newly created directory (any location is ok). Add <tt>lua</tt> | 201 | directory) to a newly created directory (any location is ok). |
| 196 | and <tt>lua\jit</tt> directories below it and copy all Lua files | 202 | Add <tt>lua</tt> and <tt>lua\jit</tt> directories below it and copy |
| 197 | from the <tt>lib</tt> directory of the distribution to the latter directory. | 203 | all Lua files from the <tt>lib</tt> directory of the distribution |
| 204 | to the latter directory. | ||
| 198 | </p> | 205 | </p> |
| 199 | <p> | 206 | <p> |
| 200 | There are no hardcoded | 207 | There are no hardcoded |
diff --git a/doc/running.html b/doc/running.html index db69578c..fcb28e85 100644 --- a/doc/running.html +++ b/doc/running.html | |||
| @@ -69,11 +69,11 @@ interactive mode, too. | |||
| 69 | <p class="indent" style="color: #c00000;"> | 69 | <p class="indent" style="color: #c00000;"> |
| 70 | Note: the beta test releases only install under the versioned name on | 70 | Note: the beta test releases only install under the versioned name on |
| 71 | POSIX systems (to avoid overwriting a previous version). You either need | 71 | POSIX systems (to avoid overwriting a previous version). You either need |
| 72 | to type <tt>luajit-2.0.0-beta1</tt> to start it or create a symlink | 72 | to type <tt>luajit-2.0.0-beta2</tt> to start it or create a symlink |
| 73 | with a command like this: | 73 | with a command like this: |
| 74 | </p> | 74 | </p> |
| 75 | <pre class="code" style="color: #c00000;"> | 75 | <pre class="code" style="color: #c00000;"> |
| 76 | sudo ln -sf luajit-2.0.0-beta1 /usr/local/bin/luajit | 76 | sudo ln -sf luajit-2.0.0-beta2 /usr/local/bin/luajit |
| 77 | </pre> | 77 | </pre> |
| 78 | <p> | 78 | <p> |
| 79 | Unlike previous versions <b>optimization is turned on by default</b> in | 79 | Unlike previous versions <b>optimization is turned on by default</b> in |
| @@ -119,7 +119,7 @@ itself. For a description of their options and output format, please | |||
| 119 | read the comment block at the start of their source. | 119 | read the comment block at the start of their source. |
| 120 | They can be found in the <tt>lib</tt> directory of the source | 120 | They can be found in the <tt>lib</tt> directory of the source |
| 121 | distribution or installed under the <tt>jit</tt> directory. By default | 121 | distribution or installed under the <tt>jit</tt> directory. By default |
| 122 | this is <tt>/usr/local/share/luajit-2.0.0-beta1/jit</tt> on POSIX | 122 | this is <tt>/usr/local/share/luajit-2.0.0-beta2/jit</tt> on POSIX |
| 123 | systems. | 123 | systems. |
| 124 | </p> | 124 | </p> |
| 125 | 125 | ||
diff --git a/doc/status.html b/doc/status.html index 23c14c76..aa4a1e26 100644 --- a/doc/status.html +++ b/doc/status.html | |||
| @@ -90,7 +90,22 @@ known incompatibilities with standard Lua: | |||
| 90 | <ul> | 90 | <ul> |
| 91 | <li> | 91 | <li> |
| 92 | The Lua <b>debug API</b> is missing a couple of features (call/return | 92 | The Lua <b>debug API</b> is missing a couple of features (call/return |
| 93 | hooks) and shows slightly different behavior (no per-coroutine hooks). | 93 | hooks) and shows slightly different behavior (no per-coroutine hooks, |
| 94 | no tail call counting). | ||
| 95 | </li> | ||
| 96 | <li> | ||
| 97 | <b>Bytecode</b> currently cannot be loaded or dumped. Note that | ||
| 98 | the bytecode format differs from Lua 5.1 — loading foreign | ||
| 99 | bytecode is not supported at all. | ||
| 100 | </li> | ||
| 101 | <li> | ||
| 102 | Some of the <b>configuration options</b> of Lua 5.1 are not supported: | ||
| 103 | <ul> | ||
| 104 | <li>The <b>number type</b> cannot be changed (it's always a <tt>double</tt>).</li> | ||
| 105 | <li>The stand-alone executable cannot be linked with <b>readline</b> | ||
| 106 | to enable line editing. It's planned to add support for loading it | ||
| 107 | on-demand.</li> | ||
| 108 | </ul> | ||
| 94 | </li> | 109 | </li> |
| 95 | <li> | 110 | <li> |
| 96 | Most other issues you're likely to find (e.g. with the existing test | 111 | Most other issues you're likely to find (e.g. with the existing test |
| @@ -105,7 +120,7 @@ demonstrable need is shown. | |||
| 105 | <li> | 120 | <li> |
| 106 | The <b>JIT compiler</b> is not complete (yet) and falls back to the | 121 | The <b>JIT compiler</b> is not complete (yet) and falls back to the |
| 107 | interpreter in some cases. All of this works transparently, so unless | 122 | interpreter in some cases. All of this works transparently, so unless |
| 108 | you use -jv, you'll probably never notice (the interpreter is quite | 123 | you use <tt>-jv</tt>, you'll probably never notice (the interpreter is quite |
| 109 | fast, too). Here are the known issues: | 124 | fast, too). Here are the known issues: |
| 110 | <ul> | 125 | <ul> |
| 111 | <li> | 126 | <li> |
| @@ -119,7 +134,7 @@ effort. | |||
| 119 | </li> | 134 | </li> |
| 120 | <li> | 135 | <li> |
| 121 | <b>Recursion</b> is not traced yet. Often no trace will be generated at | 136 | <b>Recursion</b> is not traced yet. Often no trace will be generated at |
| 122 | all or some unroll limit will catch it and aborts the trace. | 137 | all or some unroll limit will catch it and abort the trace. |
| 123 | </li> | 138 | </li> |
| 124 | <li> | 139 | <li> |
| 125 | The trace compiler currently does not back off specialization for | 140 | The trace compiler currently does not back off specialization for |
