This is a list of changes between the released versions of LuaJIT.
-The current development version is LuaJIT 2.0.0-beta1.
+The current development version is LuaJIT 2.0.0-beta2.
The current stable version is LuaJIT 1.1.5.
@@ -53,6 +53,36 @@ to see whether newer versions are available.
LuaJIT 2.0.0-beta2 — 2009-11-09
+-
+
- Reorganize build system. Build static+shared library on POSIX. +
- Allow C++ exception conversion on all platforms +using a wrapper function. +
- Automatically catch C++ exceptions and rethrow Lua error +(ELF/DWARF2 only). +
- Check for the correct x87 FPU precision at strategic points. +
- Always use wrappers for libm functions. +
- Resurrect metamethod name strings before copying them. +
- Mark current trace, even if compiler is idle. +
- Ensure FILE metatable is created only once. +
- Fix type comparisons when different integer types are involved. +
- Fix getmetatable() recording. +
- Fix TDUP with dead keys in template table. +
- jit.flush(tr) returns status. +Prevent manual flush of a trace that's still linked. +
- Improve register allocation heuristics for invariant references. +
- Compile the push/pop variants of table.insert() and +table.remove(). +
- Compatibility with MSVC link /debug. +
- Fix lua_iscfunction(). +
- Fix math.random() when compiled with -fpic (OSX). +
- Fix table.maxn(). +
- Bump MACOSX_DEPLOYMENT_TARGET to 10.4 +
- luaL_check*() and luaL_opt*() now support
+negative arguments, too.
+This matches the behavior of Lua 5.1, but not the specification.
+
LuaJIT 2.0.0-beta1 — 2009-10-31
- This is the first public release of LuaJIT 2.0. 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: » Dynamic Language Optimizations
- Q: Why do I get this error: "bad FPU precision"?
+- Q: I get weird behavior after initializing Direct3D.
+- Q: Some FPU operations crash after I load a Delphi DLL.
+
+ - Q: I get weird behavior after initializing Direct3D.
-
+
+DirectX/Direct3D (up to version 9) sets the x87 FPU to single-precision
+mode by default. This violates the Windows ABI and interferes with the
+operation of many programs — LuaJIT is affected, too. Please make
+sure you always use the D3DCREATE_FPU_PRESERVE flag when
+initializing Direct3D.
+ +Direct3D version 10 or higher do not show this behavior anymore. +Consider testing your application with older versions, too.
+ +Similarly, the Borland/Delphi runtime modifies the FPU control word and +enables FP exceptions. Of course this violates the Windows ABI, too. +Please check the Delphi docs for the Set8087CW method. + + - Q: Sometimes Ctrl-C fails to stop my Lua program. Why?
- The interrupt signal handler sets a Lua debug hook. But this is
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.
Configuring LuaJIT
The standard configuration should work fine for most installations. -Usually there is no need to tweak the settings, except when you want to -install to a non-standard path. The following three files hold all -user-configurable settings: +Usually there is no need to tweak the settings. The following files +hold all user-configurable settings:
-
-
- src/luaconf.h sets some configuration variables, in -particular the default paths for loading modules. -
- Makefile has settings for installing LuaJIT (POSIX +
- src/luaconf.h sets some configuration variables. +
- Makefile has settings for installing LuaJIT (POSIX only). -
- src/Makefile has settings for compiling LuaJIT under POSIX, -MinGW and Cygwin. +
- src/Makefile has settings for compiling LuaJIT +under POSIX, MinGW and Cygwin.
- src/msvcbuild.bat has settings for compiling LuaJIT with MSVC.
-tar zxf LuaJIT-2.0.0-beta1.tar.gz -cd LuaJIT-2.0.0-beta1 -
+tar zxf LuaJIT-2.0.0-beta2.tar.gz +cd LuaJIT-2.0.0-beta2Building LuaJIT
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:
make
++By default modules are only searched under the prefix /usr/local. +You can add an extra prefix to the search paths by appending the +PREFIX option, e.g.: +
++make PREFIX=/home/myself/lj2 +
++Note for OSX: MACOSX_DEPLOYMENT_TARGET is set to 10.4 +in src/Makefile. Change it, if you want to build on an older version. +
Installing LuaJIT
The top-level Makefile installs LuaJIT by default under @@ -124,20 +133,19 @@ sudo make install Otherwise specify the directory prefix as an absolute path, e.g.:
-sudo make install PREFIX=/opt/lj2 +make install PREFIX=/home/myself/lj2
-But note that the installation prefix and the prefix for the module paths -(configured in src/luaconf.h) must match. +Obviously the prefixes given during build and installation need to be the same.
Note: to avoid overwriting a previous version, the beta test releases only install the LuaJIT executable under the versioned name (i.e. -luajit-2.0.0-beta1). You probably want to create a symlink +luajit-2.0.0-beta2). You probably want to create a symlink for convenience, with a command like this:
-sudo ln -sf luajit-2.0.0-beta1 /usr/local/bin/luajit +sudo ln -sf luajit-2.0.0-beta2 /usr/local/bin/luajit
Windows Systems
@@ -145,8 +153,8 @@ sudo ln -sf luajit-2.0.0-beta1 /usr/local/bin/luajitEither install one of the open source SDKs (» MinGW or -» Cygwin) which come with modified -versions of GCC plus the required development headers. +» Cygwin), which come with a modified +GCC plus the required development headers.
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
Building with MSVC
-Open a "Visual Studio .NET Command Prompt" and cd to the -directory where you've unpacked the sources. Then run this command: +Open a "Visual Studio .NET Command Prompt", cd to the +directory where you've unpacked the sources and run these commands:
cd src @@ -176,14 +184,12 @@ are in your path. Then cd to the directory where you've unpacked the sources and run this command for MinGW:
-cd src mingw32-make
Or this command for Cygwin:
-cd src make
@@ -191,10 +197,11 @@ Then follow the installation instructions below.
Installing LuaJIT
-Copy luajit.exe and lua51.dll -to a newly created directory (any location is ok). Add lua -and lua\jit directories below it and copy all Lua files -from the lib directory of the distribution to the latter directory. +Copy luajit.exe and lua51.dll (built in the src +directory) to a newly created directory (any location is ok). +Add lua and lua\jit directories below it and copy +all Lua files from the lib directory of the distribution +to the latter directory.
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.
Note: the beta test releases only install under the versioned name on POSIX systems (to avoid overwriting a previous version). You either need -to type luajit-2.0.0-beta1 to start it or create a symlink +to type luajit-2.0.0-beta2 to start it or create a symlink with a command like this:
-sudo ln -sf luajit-2.0.0-beta1 /usr/local/bin/luajit +sudo ln -sf luajit-2.0.0-beta2 /usr/local/bin/luajit
Unlike previous versions optimization is turned on by default in @@ -119,7 +119,7 @@ itself. For a description of their options and output format, please read the comment block at the start of their source. They can be found in the lib directory of the source distribution or installed under the jit directory. By default -this is /usr/local/share/luajit-2.0.0-beta1/jit on POSIX +this is /usr/local/share/luajit-2.0.0-beta2/jit on POSIX systems.
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:- The Lua debug API is missing a couple of features (call/return -hooks) and shows slightly different behavior (no per-coroutine hooks). +hooks) and shows slightly different behavior (no per-coroutine hooks, +no tail call counting). + +
- +Bytecode currently cannot be loaded or dumped. Note that +the bytecode format differs from Lua 5.1 — loading foreign +bytecode is not supported at all. + +
-
+Some of the configuration options of Lua 5.1 are not supported:
+
-
+
- The number type cannot be changed (it's always a double). +
- The stand-alone executable cannot be linked with readline +to enable line editing. It's planned to add support for loading it +on-demand. +
- Most other issues you're likely to find (e.g. with the existing test @@ -105,7 +120,7 @@ demonstrable need is shown.
-
The JIT compiler is not complete (yet) and falls back to the
interpreter in some cases. All of this works transparently, so unless
-you use -jv, you'll probably never notice (the interpreter is quite
+you use -jv, you'll probably never notice (the interpreter is quite
fast, too). Here are the known issues:
- @@ -119,7 +134,7 @@ effort.
- Recursion is not traced yet. Often no trace will be generated at -all or some unroll limit will catch it and aborts the trace. +all or some unroll limit will catch it and abort the trace.
- The trace compiler currently does not back off specialization for -- cgit v1.2.3-55-g6feb
Search for: » SSA Form
Search for: » Linear Scan Register Allocation
+Here is a list of the » innovative features in LuaJIT.
And, you know, reading the source is of course the only way to enlightenment. :-) @@ -86,6 +87,28 @@ functions from Lua 5.0.
Please convert your code to the vararg syntax. +
-
+