aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/LuaJIT-1.1.7/jitdoc/luajit_run.html
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-01-23 23:36:30 +1000
committerDavid Walter Seikel2012-01-23 23:36:30 +1000
commit6523585c66c04cea54df50013df8886b589847d8 (patch)
tree0b22aee7064166d88595eda260ca2d17c0773da5 /libraries/LuaJIT-1.1.7/jitdoc/luajit_run.html
parentUpdate the EFL to what I'm actually using, coz I'm using some stuff not yet r... (diff)
downloadSledjHamr-6523585c66c04cea54df50013df8886b589847d8.zip
SledjHamr-6523585c66c04cea54df50013df8886b589847d8.tar.gz
SledjHamr-6523585c66c04cea54df50013df8886b589847d8.tar.bz2
SledjHamr-6523585c66c04cea54df50013df8886b589847d8.tar.xz
Add luaproc and LuaJIT libraries.
Two versions of LuaJIT, the stable release, and the dev version. Try the dev version first, until ih fails badly.
Diffstat (limited to 'libraries/LuaJIT-1.1.7/jitdoc/luajit_run.html')
-rw-r--r--libraries/LuaJIT-1.1.7/jitdoc/luajit_run.html159
1 files changed, 159 insertions, 0 deletions
diff --git a/libraries/LuaJIT-1.1.7/jitdoc/luajit_run.html b/libraries/LuaJIT-1.1.7/jitdoc/luajit_run.html
new file mode 100644
index 0000000..bc9105b
--- /dev/null
+++ b/libraries/LuaJIT-1.1.7/jitdoc/luajit_run.html
@@ -0,0 +1,159 @@
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2<html>
3<head>
4<title>Running LuaJIT</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-2011, 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</head>
12<body>
13<div id="site">
14<a href="http://luajit.org/"><span>Lua<span id="logo">JIT</span></span></a>
15</div>
16<div id="head">
17<h1>Running LuaJIT</h1>
18</div>
19<div id="nav">
20<ul><li>
21<a href="index.html">Index</a>
22</li><li>
23<a href="luajit.html">LuaJIT</a>
24<ul><li>
25<a href="luajit_features.html">Features</a>
26</li><li>
27<a href="luajit_install.html">Installation</a>
28</li><li>
29<a class="current" href="luajit_run.html">Running</a>
30</li><li>
31<a href="luajit_api.html">API Extensions</a>
32</li><li>
33<a href="luajit_intro.html">Introduction</a>
34</li><li>
35<a href="luajit_performance.html">Performance</a>
36</li><li>
37<a href="luajit_debug.html">Debugging</a>
38</li><li>
39<a href="luajit_changes.html">Changes</a>
40</li></ul>
41</li><li>
42<a href="coco.html">Coco</a>
43<ul><li>
44<a href="coco_portability.html">Portability</a>
45</li><li>
46<a href="coco_api.html">API Extensions</a>
47</li><li>
48<a href="coco_changes.html">Changes</a>
49</li></ul>
50</li><li>
51<a href="dynasm.html">DynASM</a>
52<ul><li>
53<a href="dynasm_features.html">Features</a>
54</li><li>
55<a href="dynasm_examples.html">Examples</a>
56</li></ul>
57</li><li>
58<a href="http://luajit.org/download.html">Download <span class="ext">&raquo;</span></a>
59</li></ul>
60</div>
61<div id="main">
62<p>
63LuaJIT has only a single stand-alone executable, called <tt>luajit</tt>.
64It can be used to run simple Lua statements or whole Lua applications
65from the command line. It has an interactive mode, too.
66</p>
67<p>
68<em>Note: The optimizer is not activated by default because it resides
69in an external module
70(see <a href="luajit_install.html">Installing LuaJIT</a>).
71It's recommended to always use the optimizer, i.e.:</em> <tt>luajit -O</tt>
72</p>
73
74<h2 id="options">Command Line Options</h2>
75<p>
76The <tt>luajit</tt> stand-alone executable is just a slightly modified
77version of the regular <tt>lua</tt> stand-alone executable.
78It supports the same basic options, too. Please have a look at the
79<a href="../doc/lua.html">Manual Page</a>
80for the regular <tt>lua</tt> stand-alone executable.
81</p>
82<p>
83Two additional options control LuaJIT behaviour:
84</p>
85
86<h3 id="opt_j"><tt>-j cmd[=value]</tt></h3>
87<p>
88This option performs a LuaJIT control command. LuaJIT has a small
89but extensible set of control commands. It's easy to add your own.
90</p>
91<p>
92The command is first searched for in the <tt>jit.*</tt> library.
93If no matching function is found, a module named <tt>jit.&lt;cmd&gt;</tt>
94is loaded. The module table must provide a <tt>start()</tt> function.
95</p>
96<p>
97For the <tt>-j cmd</tt> form the function is called without an argument.
98Otherwise the <tt>value</tt> is passed as the first argument (a string).
99</p>
100<p>
101Here are the built-in LuaJIT control commands:
102</p>
103<ul>
104<li id="j_on"><tt>-j on</tt> &mdash; Turns the JIT engine on (default).</li>
105<li id="j_off"><tt>-j off</tt> &mdash; Turns the JIT engine off.</li>
106<li id="j_debug"><tt>-j debug[=level]</tt> &mdash; Set debug level. See
107<a href="luajit_api.html#jit_debug">jit.debug()</a>.</li>
108</ul>
109<p>
110The following control commands are loaded from add-on modules:
111</p>
112<ul>
113<li id="j_trace"><tt>-j trace[=file]</tt> &mdash; Trace the progress of the JIT compiler.</li>
114<li id="j_dumphints"><tt>-j dumphints[=file]</tt> &mdash; Dump bytecode + hints before compilation.</li>
115<li id="j_dump"><tt>-j dump[=file]</tt> &mdash; Dump machine code after compilation.</li>
116</ul>
117
118<!--
119<h3 id="opt_O"><tt>-O[level|ext]</tt></h3>
120-->
121<h3 id="opt_O"><tt>-O[level]</tt></h3>
122<p>
123This option loads and runs the optimizer module <tt>jit.opt</tt>.
124The optimizer generates hints for the compiler backend to improve
125the performance of the compiled code. The optimizer slows down
126compilation slightly, but the end result should make up for it
127in almost every case.
128</p>
129<p>
130The <tt>-O</tt> form sets the default optimizer level, which is
131currently <tt>2</tt> (this may change in future versions
132of LuaJIT).
133</p>
134<p>
135The <tt>-Olevel</tt> form explicitly sets the optimizer level:
136</p>
137<ul>
138<li><tt>-O0</tt> &mdash; disable the optimizer but leave it attached.</li>
139<li><tt>-O1</tt> &mdash; perform standard optimizations (like hints for table lookups).</li>
140<li><tt>-O2</tt> &mdash; like <tt>-O1</tt> but also loads <tt>jit.opt_inline</tt> to enable result hints and inlining for standard library functions.</li>
141</ul>
142<!--
143<p>
144The <tt>-Oext</tt> form loads optimizer extension modules
145from <tt>jit.opt_&lt;ext&gt;</tt>.
146</p>
147-->
148<br class="flush">
149</div>
150<div id="foot">
151<hr class="hide">
152Copyright &copy; 2005-2011 Mike Pall
153<span class="noprint">
154&middot;
155<a href="contact.html">Contact</a>
156</span>
157</div>
158</body>
159</html>