aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/ext_jit.html2
-rw-r--r--doc/faq.html61
-rw-r--r--doc/install.html42
-rw-r--r--doc/luajit.html2
-rw-r--r--doc/running.html2
-rw-r--r--doc/status.html15
6 files changed, 52 insertions, 72 deletions
diff --git a/doc/ext_jit.html b/doc/ext_jit.html
index 5075a405..fdc97aa1 100644
--- a/doc/ext_jit.html
+++ b/doc/ext_jit.html
@@ -147,7 +147,7 @@ Contains the target OS name:
147<h3 id="jit_arch"><tt>jit.arch</tt></h3> 147<h3 id="jit_arch"><tt>jit.arch</tt></h3>
148<p> 148<p>
149Contains the target architecture name: 149Contains the target architecture name:
150"x86", "x64", "arm", "arm64", "ppc", "mips" or "mips64". 150"x86", "x64", "arm", "arm64", "arm64be", "ppc", "mips", "mipsel", "mips64", "mips64el", "mips64r6", "mips64r6el".
151</p> 151</p>
152 152
153<h2 id="jit_opt"><tt>jit.opt.*</tt> &mdash; JIT compiler optimization control</h2> 153<h2 id="jit_opt"><tt>jit.opt.*</tt> &mdash; JIT compiler optimization control</h2>
diff --git a/doc/faq.html b/doc/faq.html
index acc47bae..484d2f20 100644
--- a/doc/faq.html
+++ b/doc/faq.html
@@ -80,16 +80,14 @@ has information about diverse topics.</li>
80<dl id="tech"> 80<dl id="tech">
81<dt>Q: Where can I learn more about the compiler technology used by LuaJIT?</dt> 81<dt>Q: Where can I learn more about the compiler technology used by LuaJIT?</dt>
82<dd> 82<dd>
83I'm planning to write more documentation about the internals of LuaJIT. 83Please use the following Google Scholar searches to find relevant papers:<br>
84In the meantime, please use the following Google Scholar searches
85to find relevant papers:<br>
86Search for: <a href="https://scholar.google.com/scholar?q=Trace+Compiler"><span class="ext">&raquo;</span>&nbsp;Trace Compiler</a><br> 84Search for: <a href="https://scholar.google.com/scholar?q=Trace+Compiler"><span class="ext">&raquo;</span>&nbsp;Trace Compiler</a><br>
87Search for: <a href="https://scholar.google.com/scholar?q=JIT+Compiler"><span class="ext">&raquo;</span>&nbsp;JIT Compiler</a><br> 85Search for: <a href="https://scholar.google.com/scholar?q=JIT+Compiler"><span class="ext">&raquo;</span>&nbsp;JIT Compiler</a><br>
88Search for: <a href="https://scholar.google.com/scholar?q=Dynamic+Language+Optimizations"><span class="ext">&raquo;</span>&nbsp;Dynamic Language Optimizations</a><br> 86Search for: <a href="https://scholar.google.com/scholar?q=Dynamic+Language+Optimizations"><span class="ext">&raquo;</span>&nbsp;Dynamic Language Optimizations</a><br>
89Search for: <a href="https://scholar.google.com/scholar?q=SSA+Form"><span class="ext">&raquo;</span>&nbsp;SSA Form</a><br> 87Search for: <a href="https://scholar.google.com/scholar?q=SSA+Form"><span class="ext">&raquo;</span>&nbsp;SSA Form</a><br>
90Search for: <a href="https://scholar.google.com/scholar?q=Linear+Scan+Register+Allocation"><span class="ext">&raquo;</span>&nbsp;Linear Scan Register Allocation</a><br> 88Search for: <a href="https://scholar.google.com/scholar?q=Linear+Scan+Register+Allocation"><span class="ext">&raquo;</span>&nbsp;Linear Scan Register Allocation</a><br>
91Here is a list of the <a href="http://lua-users.org/lists/lua-l/2009-11/msg00089.html"><span class="ext">&raquo;</span>&nbsp;innovative features in LuaJIT</a>.<br> 89Here is a list of the <a href="http://lua-users.org/lists/lua-l/2009-11/msg00089.html"><span class="ext">&raquo;</span>&nbsp;innovative features in LuaJIT</a>.<br>
92And, you know, reading the source is of course the only way to enlightenment. :-) 90And, you know, reading the source is of course the only way to enlightenment.
93</dd> 91</dd>
94</dl> 92</dl>
95 93
@@ -128,12 +126,11 @@ Please check the Delphi docs for the Set8087CW method.
128<dl id="ctrlc"> 126<dl id="ctrlc">
129<dt>Q: Sometimes Ctrl-C fails to stop my Lua program. Why?</dt> 127<dt>Q: Sometimes Ctrl-C fails to stop my Lua program. Why?</dt>
130<dd>The interrupt signal handler sets a Lua debug hook. But this is 128<dd>The interrupt signal handler sets a Lua debug hook. But this is
131currently ignored by compiled code (this will eventually be fixed). If 129ignored by compiled code. If your program is running in a tight loop
132your program is running in a tight loop and never falls back to the 130and never falls back to the interpreter, the debug hook never runs and
133interpreter, the debug hook never runs and can't throw the 131can't throw the "interrupted!" error.<br>
134"interrupted!" error.<br> In the meantime you have to press Ctrl-C 132You have to press Ctrl-C twice to get stop your program. That's similar
135twice to get stop your program. That's similar to when it's stuck 133to when it's stuck running inside a C function under the Lua interpreter.</dd>
136running inside a C function under the Lua interpreter.</dd>
137</dl> 134</dl>
138 135
139<dl id="sandbox"> 136<dl id="sandbox">
@@ -147,28 +144,18 @@ it's very hard to get this right even for the Lua core libraries. Of course,
147you'll need to inspect any extension library, too. And there are libraries 144you'll need to inspect any extension library, too. And there are libraries
148that are inherently unsafe, e.g. the <a href="ext_ffi.html">FFI library</a>.<br> 145that are inherently unsafe, e.g. the <a href="ext_ffi.html">FFI library</a>.<br>
149 146
150Relatedly, <b>loading untrusted bytecode is not safe!</b> It's trivial 147More reading material at the <a href="http://lua-users.org/wiki/SandBoxes"><span class="ext">&raquo;</span>&nbsp;Lua Wiki</a> and <a href="https://en.wikipedia.org/wiki/Sandbox_(computer_security)"><span class="ext">&raquo;</span>&nbsp;Wikipedia</a>.<br><br>
151to crash the Lua or LuaJIT VM with maliciously crafted bytecode. This is
152well known and there's no bytecode verification on purpose, so please
153don't report a bug about it. Check the <tt>mode</tt> parameter for the
154<tt>load*()</tt> functions to disable loading of bytecode.<br>
155 148
156In general, the only promising approach is to sandbox Lua code at the 149Relatedly, <b>loading untrusted bytecode is not safe!</b><br>
157process level and not the VM level.<br>
158 150
159More reading material at the <a href="http://lua-users.org/wiki/SandBoxes"><span class="ext">&raquo;</span>&nbsp;Lua Wiki</a> and <a href="https://en.wikipedia.org/wiki/Sandbox_(computer_security)"><span class="ext">&raquo;</span>&nbsp;Wikipedia</a>. 151It's trivial to crash the Lua or LuaJIT VM with maliciously crafted bytecode.
160</dd> 152This is well known and there's no bytecode verification on purpose, so please
161</dl> 153don't report a bug about it. Check the <tt>mode</tt> parameter for the
154<tt>load*()</tt> functions to disable loading of bytecode.<br><br>
162 155
163<dl id="patches"> 156<b>In general, the only promising approach is to sandbox Lua code at the
164<dt>Q: Why doesn't my favorite power-patch for Lua apply against LuaJIT?</dt> 157process level and not the VM level.</b>
165<dd>Because it's a completely redesigned VM and has very little code 158</dd>
166in common with Lua anymore. Also, if the patch introduces changes to
167the Lua semantics, these would need to be reflected everywhere in the
168VM, from the interpreter up to all stages of the compiler.<br> Please
169use only standard Lua language constructs. For many common needs you
170can use source transformations or use wrapper or proxy functions.
171The compiler will happily optimize away such indirections.</dd>
172</dl> 159</dl>
173 160
174<dl id="arch"> 161<dl id="arch">
@@ -178,17 +165,11 @@ machine code. This means the code generator must be ported to each
178architecture. And the fast interpreter is written in assembler and 165architecture. And the fast interpreter is written in assembler and
179must be ported, too. This is quite an undertaking.<br> 166must be ported, too. This is quite an undertaking.<br>
180The <a href="install.html">install documentation</a> shows the supported 167The <a href="install.html">install documentation</a> shows the supported
181architectures. Other architectures will follow based on sufficient user 168architectures.<br>
182demand and/or sponsoring.</dd> 169Other architectures may follow based on sufficient user demand and
183</dl> 170market-relevance of the architecture. Sponsoring is required to develop
184 171the port itself, to integrate it and to continuously maintain it in the
185<dl id="when"> 172actively developed branches.</dd>
186<dt>Q: When will feature X be added? When will the next version be released?</dt>
187<dd>When it's ready.<br>
188C'mon, it's open source &mdash; I'm doing it on my own time and you're
189getting it for free. You can either contribute a patch or sponsor
190the development of certain features, if they are important to you.
191</dd>
192</dl> 173</dl>
193<br class="flush"> 174<br class="flush">
194</div> 175</div>
diff --git a/doc/install.html b/doc/install.html
index 451fdd41..07f0f8a3 100644
--- a/doc/install.html
+++ b/doc/install.html
@@ -103,8 +103,8 @@ operating systems, CPUs and compilers:
103<td class="compatcpu">CPU / OS</td> 103<td class="compatcpu">CPU / OS</td>
104<td class="compatos"><a href="#posix">Linux</a> or<br><a href="#android">Android</a></td> 104<td class="compatos"><a href="#posix">Linux</a> or<br><a href="#android">Android</a></td>
105<td class="compatos"><a href="#posix">*BSD, Other</a></td> 105<td class="compatos"><a href="#posix">*BSD, Other</a></td>
106<td class="compatos"><a href="#posix">OSX 10.4+</a> or<br><a href="#ios">iOS 3.0+</a></td> 106<td class="compatos"><a href="#posix">macOS 10.4+</a> or<br><a href="#ios">iOS 3.0+</a></td>
107<td class="compatos"><a href="#windows">Windows<br>XP/Vista/7</a></td> 107<td class="compatos"><a href="#windows">Windows 7<br>or later</a></td>
108</tr> 108</tr>
109<tr class="odd separate"> 109<tr class="odd separate">
110<td class="compatcpu">x86 (32 bit)</td> 110<td class="compatcpu">x86 (32 bit)</td>
@@ -128,7 +128,7 @@ operating systems, CPUs and compilers:
128<td class="compatos compatno">&nbsp;</td> 128<td class="compatos compatno">&nbsp;</td>
129</tr> 129</tr>
130<tr class="even"> 130<tr class="even">
131<td class="compatcpu"><a href="#cross2">ARM64</a></td> 131<td class="compatcpu"><a href="#cross2">ARM64<br>ARM64be</a></td>
132<td class="compatos">GCC 4.8+</td> 132<td class="compatos">GCC 4.8+</td>
133<td class="compatos compatno">&nbsp;</td> 133<td class="compatos compatno">&nbsp;</td>
134<td class="compatos">XCode 6.0+<br>Clang 3.5+</td> 134<td class="compatos">XCode 6.0+<br>Clang 3.5+</td>
@@ -142,7 +142,7 @@ operating systems, CPUs and compilers:
142<td class="compatos">XEDK (<a href="#xbox360">Xbox 360</a>)</td> 142<td class="compatos">XEDK (<a href="#xbox360">Xbox 360</a>)</td>
143</tr> 143</tr>
144<tr class="even"> 144<tr class="even">
145<td class="compatcpu"><a href="#cross2">MIPS32<br>MIPS64</a></td> 145<td class="compatcpu"><a href="#cross2">MIPS32<br>MIPS64<br>MIPS64r6</a></td>
146<td class="compatos">GCC 4.3+</td> 146<td class="compatos">GCC 4.3+</td>
147<td class="compatos">GCC 4.3+</td> 147<td class="compatos">GCC 4.3+</td>
148<td class="compatos compatno">&nbsp;</td> 148<td class="compatos compatno">&nbsp;</td>
@@ -177,7 +177,7 @@ Please check the note about the
177<a href="extensions.html#string_dump">bytecode format</a> differences, too. 177<a href="extensions.html#string_dump">bytecode format</a> differences, too.
178</p> 178</p>
179 179
180<h2 id="posix">POSIX Systems (Linux, OSX, *BSD etc.)</h2> 180<h2 id="posix">POSIX Systems (Linux, macOS, *BSD etc.)</h2>
181<h3>Prerequisites</h3> 181<h3>Prerequisites</h3>
182<p> 182<p>
183Depending on your distribution, you may need to install a package for 183Depending on your distribution, you may need to install a package for
@@ -185,14 +185,15 @@ GCC, the development headers and/or a complete SDK. E.g. on a current
185Debian/Ubuntu, install <tt>libc6-dev</tt> with the package manager. 185Debian/Ubuntu, install <tt>libc6-dev</tt> with the package manager.
186</p> 186</p>
187<p> 187<p>
188Download the current source package of LuaJIT (pick the .tar.gz), 188The recommended way to fetch the latest version is to do a pull from
189if you haven't already done so. Move it to a directory of your choice, 189the git repository. Alternatively download the latest source package of
190LuaJIT (pick the .tar.gz). Move it to a directory of your choice,
190open a terminal window and change to this directory. Now unpack the archive 191open a terminal window and change to this directory. Now unpack the archive
191and change to the newly created directory: 192and change to the newly created directory:
192</p> 193</p>
193<pre class="code"> 194<pre class="code">
194tar zxf LuaJIT-2.0.5.tar.gz 195tar zxf LuaJIT-2.1.0-beta3.tar.gz
195cd LuaJIT-2.0.5</pre> 196cd LuaJIT-2.1.0-beta3</pre>
196<h3>Building LuaJIT</h3> 197<h3>Building LuaJIT</h3>
197<p> 198<p>
198The supplied Makefiles try to auto-detect the settings needed for your 199The supplied Makefiles try to auto-detect the settings needed for your
@@ -216,7 +217,7 @@ You can add an extra prefix to the search paths by appending the
216make PREFIX=/home/myself/lj2 217make PREFIX=/home/myself/lj2
217</pre> 218</pre>
218<p> 219<p>
219Note for OSX: you must set the <tt>MACOSX_DEPLOYMENT_TARGET</tt> 220Note for macOS: you must set the <tt>MACOSX_DEPLOYMENT_TARGET</tt>
220environment variable to a value supported by your toolchain. 221environment variable to a value supported by your toolchain.
221</p> 222</p>
222<h3>Installing LuaJIT</h3> 223<h3>Installing LuaJIT</h3>
@@ -250,8 +251,9 @@ GCC plus the required development headers.
250Or install Microsoft's Visual Studio (MSVC). 251Or install Microsoft's Visual Studio (MSVC).
251</p> 252</p>
252<p> 253<p>
253Next, download the source package and unpack it using an archive manager 254Next, pull from the git repository or download the source package and
254(e.g. the Windows Explorer) to a directory of your choice. 255unpack it using an archive manager (e.g. the Windows Explorer) to
256a directory of your choice.
255</p> 257</p>
256<h3>Building with MSVC</h3> 258<h3>Building with MSVC</h3>
257<p> 259<p>
@@ -269,8 +271,8 @@ Then follow the installation instructions below.
269<h3>Building with MinGW or Cygwin</h3> 271<h3>Building with MinGW or Cygwin</h3>
270<p> 272<p>
271Open a command prompt window and make sure the MinGW or Cygwin programs 273Open a command prompt window and make sure the MinGW or Cygwin programs
272are in your path. Then <tt>cd</tt> to the directory where 274are in your path. Then <tt>cd</tt> to the directory of the git repository
273you've unpacked the sources and run this command for MinGW: 275or where you've unpacked the sources. Then run this command for MinGW:
274</p> 276</p>
275<pre class="code"> 277<pre class="code">
276mingw32-make 278mingw32-make
@@ -325,7 +327,7 @@ You need to specify <tt>TARGET_SYS</tt> whenever the host OS and the
325target OS differ, or you'll get assembler or linker errors: 327target OS differ, or you'll get assembler or linker errors:
326</p> 328</p>
327<ul> 329<ul>
328<li>E.g. if you're compiling on a Windows or OSX host for embedded Linux or Android, you need to add <tt>TARGET_SYS=Linux</tt> to the examples below.</li> 330<li>E.g. if you're compiling on a Windows or macOS host for embedded Linux or Android, you need to add <tt>TARGET_SYS=Linux</tt> to the examples below.</li>
329<li>For a minimal target OS, you may need to disable the built-in allocator in <tt>src/Makefile</tt> and use <tt>TARGET_SYS=Other</tt>.</li> 331<li>For a minimal target OS, you may need to disable the built-in allocator in <tt>src/Makefile</tt> and use <tt>TARGET_SYS=Other</tt>.</li>
330<li>Don't forget to specify the same <tt>TARGET_SYS</tt> for the install step, too.</li> 332<li>Don't forget to specify the same <tt>TARGET_SYS</tt> for the install step, too.</li>
331</ul> 333</ul>
@@ -522,14 +524,6 @@ the DLL). You may link LuaJIT statically on Windows only if you don't
522intend to load Lua/C modules at runtime. 524intend to load Lua/C modules at runtime.
523</li></ul> 525</li></ul>
524</li> 526</li>
525<li>
526If you're building a 64 bit application on OSX which links directly or
527indirectly against LuaJIT which is not built for <tt>LJ_GC64</tt> mode,
528you need to link your main executable with these flags:
529<pre class="code">
530-pagezero_size 10000 -image_base 100000000
531</pre>
532</li>
533</ul> 527</ul>
534<p>Additional hints for initializing LuaJIT using the C API functions:</p> 528<p>Additional hints for initializing LuaJIT using the C API functions:</p>
535<ul> 529<ul>
@@ -538,7 +532,7 @@ you need to link your main executable with these flags:
538for embedding Lua or LuaJIT into your application.</li> 532for embedding Lua or LuaJIT into your application.</li>
539<li>Make sure you use <tt>luaL_newstate</tt>. Avoid using 533<li>Make sure you use <tt>luaL_newstate</tt>. Avoid using
540<tt>lua_newstate</tt>, since this uses the (slower) default memory 534<tt>lua_newstate</tt>, since this uses the (slower) default memory
541allocator from your system (no support for this on x64).</li> 535allocator from your system (no support for this on 64&nbsp;bit architectures).</li>
542<li>Make sure you use <tt>luaL_openlibs</tt> and not the old Lua 5.0 style 536<li>Make sure you use <tt>luaL_openlibs</tt> and not the old Lua 5.0 style
543of calling <tt>luaopen_base</tt> etc. directly.</li> 537of calling <tt>luaopen_base</tt> etc. directly.</li>
544<li>To change or extend the list of standard libraries to load, copy 538<li>To change or extend the list of standard libraries to load, copy
diff --git a/doc/luajit.html b/doc/luajit.html
index ab768053..dd50674d 100644
--- a/doc/luajit.html
+++ b/doc/luajit.html
@@ -154,7 +154,7 @@ LuaJIT is Copyright &copy; 2005-2020 Mike Pall, released under the
154 154
155<h2>Compatibility</h2> 155<h2>Compatibility</h2>
156<table class="feature os os1"> 156<table class="feature os os1">
157<tr><td>Windows</td><td>Linux</td><td>BSD</td><td>OSX</td><td>POSIX</td></tr> 157<tr><td>Windows</td><td>Linux</td><td>BSD</td><td>macOS</td><td>POSIX</td></tr>
158</table> 158</table>
159<table class="feature os os2"> 159<table class="feature os os2">
160<tr><td><span style="font-size:90%;">Embedded</span></td><td>Android</td><td>iOS</td></tr> 160<tr><td><span style="font-size:90%;">Embedded</span></td><td>Android</td><td>iOS</td></tr>
diff --git a/doc/running.html b/doc/running.html
index f34f1f5f..686d8d90 100644
--- a/doc/running.html
+++ b/doc/running.html
@@ -183,7 +183,7 @@ itself. For a description of their options and output format, please
183read the comment block at the start of their source. 183read the comment block at the start of their source.
184They can be found in the <tt>lib</tt> directory of the source 184They can be found in the <tt>lib</tt> directory of the source
185distribution or installed under the <tt>jit</tt> directory. By default 185distribution or installed under the <tt>jit</tt> directory. By default
186this is <tt>/usr/local/share/luajit-2.0.5/jit</tt> on POSIX 186this is <tt>/usr/local/share/luajit-2.1.0-beta3/jit</tt> on POSIX
187systems. 187systems.
188</p> 188</p>
189 189
diff --git a/doc/status.html b/doc/status.html
index fd0ae8ba..1a8c473c 100644
--- a/doc/status.html
+++ b/doc/status.html
@@ -58,9 +58,15 @@ ul li { padding-bottom: 0.3em; }
58</div> 58</div>
59<div id="main"> 59<div id="main">
60<p> 60<p>
61<span style="color: #0000c0;">LuaJIT&nbsp;2.0</span> is the current 61This documentation is for LuaJIT 2.1.0-beta3. Please check the <tt>doc</tt>
62<span style="color: #0000c0;">stable branch</span>. This branch is in 62directory in each git branch for the version-specific documentation.
63feature-freeze &mdash; new features will only be added to LuaJIT&nbsp;2.1. 63</p>
64<p>
65The currently developed branches are LuaJIT&nbsp;2.1 and LuaJIT&nbsp;2.0.
66</p>
67<p>
68LuaJIT&nbsp;2.0 is in feature-freeze &mdash; new features will only
69be added to LuaJIT&nbsp;2.1.
64</p> 70</p>
65 71
66<h2>Current Status</h2> 72<h2>Current Status</h2>
@@ -88,8 +94,7 @@ in LuaJIT (no per-coroutine hooks, no tail call counting).
88Currently some <b>out-of-memory</b> errors from <b>on-trace code</b> are not 94Currently some <b>out-of-memory</b> errors from <b>on-trace code</b> are not
89handled correctly. The error may fall through an on-trace 95handled correctly. The error may fall through an on-trace
90<tt>pcall</tt> or it may be passed on to the function set with 96<tt>pcall</tt> or it may be passed on to the function set with
91<tt>lua_atpanic</tt> on x64. This issue will be fixed with the new 97<tt>lua_atpanic</tt> on x64.
92garbage collector.
93</li> 98</li>
94</ul> 99</ul>
95<br class="flush"> 100<br class="flush">