summaryrefslogtreecommitdiff
path: root/doc/faq.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/faq.html')
-rw-r--r--doc/faq.html141
1 files changed, 141 insertions, 0 deletions
diff --git a/doc/faq.html b/doc/faq.html
new file mode 100644
index 00000000..6f62e1eb
--- /dev/null
+++ b/doc/faq.html
@@ -0,0 +1,141 @@
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2<html>
3<head>
4<title>Frequently Asked Questions (FAQ)</title>
5<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6<meta name="Author" content="Mike Pall">
7<meta name="Copyright" content="Copyright (C) 2005-2009, Mike Pall">
8<meta name="Language" content="en">
9<link rel="stylesheet" type="text/css" href="bluequad.css" media="screen">
10<link rel="stylesheet" type="text/css" href="bluequad-print.css" media="print">
11<style type="text/css">
12dd { margin-left: 1.5em; }
13</style>
14</head>
15<body>
16<div id="site">
17<a href="http://luajit.org"><span>Lua<span id="logo">JIT</span></span></a>
18</div>
19<div id="head">
20<h1>Frequently Asked Questions (FAQ)</h1>
21</div>
22<div id="nav">
23<ul><li>
24<a href="luajit.html">LuaJIT</a>
25<ul><li>
26<a href="install.html">Installation</a>
27</li><li>
28<a href="running.html">Running</a>
29</li><li>
30<a href="api.html">API Extensions</a>
31</li></ul>
32</li><li>
33<a href="status.html">Status</a>
34<ul><li>
35<a href="changes.html">Changes</a>
36</li></ul>
37</li><li>
38<a class="current" href="faq.html">FAQ</a>
39</li><li>
40<a href="http://luajit.org/download.html">Download <span class="ext">&raquo;</span></a>
41</li></ul>
42</div>
43<div id="main">
44<dl>
45<dt>Q: Where can I learn more about Lua and LuaJIT?</dt>
46<dd>
47<ul style="padding: 0;">
48<li>The <a href="http://lua.org"><span class="ext">&raquo;</span>&nbsp;main Lua.org site</a> has complete
49<a href="http://www.lua.org/docs.html"><span class="ext">&raquo;</span>&nbsp;documentation</a> of the language
50and links to books and papers about Lua.</li>
51<li>The community-managed <a href="http://lua-users.org/wiki/"><span class="ext">&raquo;</span>&nbsp;Lua Wiki</a>
52has information about diverse topics.</li>
53<li>The primary source of information for the latest developments surrounding
54Lua is the <a href="http://www.lua.org/lua-l.html"><span class="ext">&raquo;</span>&nbsp;Lua mailing list</a>.
55You can check out the <a href="http://lua-users.org/lists/lua-l/"><span class="ext">&raquo;</span>&nbsp;mailing
56list archive</a> or
57<a href="http://bazar2.conectiva.com.br/mailman/listinfo/lua"><span class="ext">&raquo;</span>&nbsp;subscribe</a>
58to the list (you need to be subscribed before posting).<br>
59This is also the place where announcements and discussions about LuaJIT
60take place.</li>
61</ul>
62</dl>
63
64<dl>
65<dt>Q: Where can I learn more about the compiler technology used by LuaJIT?</dt>
66<dd>
67I'm planning to write more documentation about the internals of LuaJIT.
68In the meantime, please use the following Google Scholar searches
69to find relevant papers:<br>
70Search for: <a href="http://scholar.google.com/scholar?q=Trace+Compiler"><span class="ext">&raquo;</span>&nbsp;Trace Compiler</a><br>
71Search for: <a href="http://scholar.google.com/scholar?q=JIT+Compiler"><span class="ext">&raquo;</span>&nbsp;JIT Compiler</a><br>
72Search for: <a href="http://scholar.google.com/scholar?q=Dynamic+Language+Optimizations"><span class="ext">&raquo;</span>&nbsp;Dynamic Language Optimizations</a><br>
73Search for: <a href="http://scholar.google.com/scholar?q=SSA+Form"><span class="ext">&raquo;</span>&nbsp;SSA Form</a><br>
74Search for: <a href="http://scholar.google.com/scholar?q=Linear+Scan+Register+Allocation"><span class="ext">&raquo;</span>&nbsp;Linear Scan Register Allocation</a><br>
75And, you know, reading the source is of course the only way to enlightenment. :-)
76</dd>
77</dl>
78
79<dl>
80<dt>Q: Why do I get this error: "attempt to index global 'arg' (a nil value)"?<br>
81Q: My vararg functions fail after switching to LuaJIT!</dt>
82<dd>LuaJIT is compatible to the Lua 5.1 language standard. It doesn't
83support the implicit <tt>arg</tt> parameter for old-style vararg
84functions from Lua 5.0.<br>Please convert your code to the
85<a href="http://www.lua.org/manual/5.1/manual.html#2.5.9"><span class="ext">&raquo;</span>&nbsp;Lua 5.1
86vararg syntax</a>.</dd>
87</dl>
88
89<dl>
90<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
92currently ignored by compiled code (this will eventually be fixed). If
93your program is running in a tight loop and never falls back to the
94interpreter, the debug hook never runs and can't throw the
95"interrupted!" error.<br> In the meantime you have to press Ctrl-C
96twice to get stop your program. That's similar to when it's stuck
97running inside a C function under the Lua interpreter.</dd>
98</dl>
99
100<dl>
101<dt>Q: Why doesn't my favorite power-patch for Lua apply against LuaJIT?</dt>
102<dd>Because it's a completely redesigned VM and has very little code
103in common with Lua anymore. Also, if the patch introduces changes to
104the Lua semantics, this would need to be reflected everywhere in the
105VM, from the interpreter up to all stages of the compiler.<br> Please
106use only standard Lua language constructs. For many common needs you
107can use source transformations or use wrapper or proxy functions.
108The compiler will happily optimize away such indirections.</dd>
109</dl>
110
111<dl>
112<dt>Q: Lua runs everywhere. Why doesn't LuaJIT support my CPU?</dt>
113<dd>Because it's a compiler &mdash; it needs to generate native
114machine code. This means the code generator must be ported to each
115architecture. And the fast interpreter is written in assembler and
116must be ported, too. This is quite an undertaking.<br> Currently only
117x86 CPUs are supported. x64 support is in the works. Other
118architectures will follow with sufficient demand and/or
119sponsoring.</dd>
120</dl>
121
122<dl>
123<dt>Q: When will feature X be added? When will the next version be released?</dt>
124<dd>When it's ready.<br>
125C'mon, it's open source &mdash; I'm doing it on my own time and you're
126getting it for free. You can either contribute a patch or sponsor
127the development of certain features, if they are important to you.
128</dd>
129</dl>
130<br class="flush">
131</div>
132<div id="foot">
133<hr class="hide">
134Copyright &copy; 2005-2009 Mike Pall
135<span class="noprint">
136&middot;
137<a href="contact.html">Contact</a>
138</span>
139</div>
140</body>
141</html>