Update #1
10
.cvsignore → .gitignore
vendored
10
.cvsignore → .gitignore
vendored
@@ -1,8 +1,8 @@
|
|||||||
bin
|
bin/
|
||||||
target
|
target/
|
||||||
build
|
build/
|
||||||
lib
|
lib/
|
||||||
jit
|
jit/
|
||||||
*.ser
|
*.ser
|
||||||
*.gz
|
*.gz
|
||||||
*.jar
|
*.jar
|
||||||
226
README.html
226
README.html
@@ -1,10 +1,9 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
<!DOCTYPE HTML>
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title>Getting Started with LuaJ</title>
|
<title>Getting Started with LuaJ</title>
|
||||||
<link rel="stylesheet" type="text/css" href="http://www.lua.org/lua.css">
|
<link rel="stylesheet" type="text/css" href="http://www.lua.org/lua.css">
|
||||||
<META HTTP-EQUIV="content-type" CONTENT="text/html; charset=iso-8859-1">
|
<META HTTP-EQUIV="content-type" CONTENT="text/html; charset=utf-8;">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
@@ -92,16 +91,19 @@ Good performance is a major goal of luaj.
|
|||||||
The following table provides measured execution times on a subset of benchmarks from
|
The following table provides measured execution times on a subset of benchmarks from
|
||||||
<a href="http://shootout.alioth.debian.org/">the computer language benchmarks game</a>
|
<a href="http://shootout.alioth.debian.org/">the computer language benchmarks game</a>
|
||||||
in comparison with the standard C distribution.
|
in comparison with the standard C distribution.
|
||||||
<table cellspacing="10"><tr><td><table>
|
<table cellspacing="10">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<table>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<td><u>Project</td>
|
<td>Project</td>
|
||||||
<td><u>Version</td>
|
<td>Version</td>
|
||||||
<td><u>Mode</td>
|
<td>Mode/td>
|
||||||
<td rowspan="9"> </td>
|
<td rowspan="9"> </td>
|
||||||
<td colspan="4" align="center"><u>Benchmark execution time (sec)</td>
|
<td colspan="4" align="center">Benchmark execution time (sec)</td>
|
||||||
<td rowspan="9"> </td>
|
<td rowspan="9"> </td>
|
||||||
<td><u>Language</td>
|
<td>Language</td>
|
||||||
<td><u>Sample command</td>
|
<td>Sample command</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<td colspan="2"></td>
|
<td colspan="2"></td>
|
||||||
@@ -120,7 +122,8 @@ in comparison with the standard C distribution.
|
|||||||
<td>16.794</td>
|
<td>16.794</td>
|
||||||
<td>11.274</td>
|
<td>11.274</td>
|
||||||
<td>Java</td>
|
<td>Java</td>
|
||||||
<td>java -cp luaj-jse-3.0.1.jar;bcel-5.2.jar lua <b>-b</b> fannkuch.lua 10</td></tr>
|
<td>java -cp luaj-jse-3.0.1.jar;bcel-5.2.jar lua <b>-b</b> fannkuch.lua 10</td>
|
||||||
|
</tr>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
@@ -130,7 +133,8 @@ in comparison with the standard C distribution.
|
|||||||
<td>36.894</td>
|
<td>36.894</td>
|
||||||
<td>15.163</td>
|
<td>15.163</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td>java -cp luaj-jse-3.0.1.jar lua -n fannkuch.lua 10</td></tr>
|
<td>java -cp luaj-jse-3.0.1.jar lua -n fannkuch.lua 10</td>
|
||||||
|
</tr>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<td>lua</td>
|
<td>lua</td>
|
||||||
<td>5.1.4</td>
|
<td>5.1.4</td>
|
||||||
@@ -140,7 +144,8 @@ in comparison with the standard C distribution.
|
|||||||
<td>15.201</td>
|
<td>15.201</td>
|
||||||
<td>5.477</td>
|
<td>5.477</td>
|
||||||
<td>C</td>
|
<td>C</td>
|
||||||
<td>lua fannkuch.lua 10</td></tr>
|
<td>lua fannkuch.lua 10</td>
|
||||||
|
</tr>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<td>jill</td>
|
<td>jill</td>
|
||||||
<td>1.0.1</td>
|
<td>1.0.1</td>
|
||||||
@@ -150,7 +155,8 @@ in comparison with the standard C distribution.
|
|||||||
<td>72.172</td>
|
<td>72.172</td>
|
||||||
<td>20.779</td>
|
<td>20.779</td>
|
||||||
<td>Java</td>
|
<td>Java</td>
|
||||||
<td></td></tr>
|
<td></td>
|
||||||
|
</tr>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<td>kahlua</td>
|
<td>kahlua</td>
|
||||||
<td>1.0</td>
|
<td>1.0</td>
|
||||||
@@ -160,7 +166,8 @@ in comparison with the standard C distribution.
|
|||||||
<td>68.223</td>
|
<td>68.223</td>
|
||||||
<td>21.529</td>
|
<td>21.529</td>
|
||||||
<td>Java</td>
|
<td>Java</td>
|
||||||
<td></td></tr>
|
<td></td>
|
||||||
|
</tr>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<td>mochalua</td>
|
<td>mochalua</td>
|
||||||
<td>1.0</td>
|
<td>1.0</td>
|
||||||
@@ -170,8 +177,12 @@ in comparison with the standard C distribution.
|
|||||||
<td>82.868</td>
|
<td>82.868</td>
|
||||||
<td>41.262</td>
|
<td>41.262</td>
|
||||||
<td>Java</td>
|
<td>Java</td>
|
||||||
<td></td></tr>
|
<td></td>
|
||||||
</table></td></tr></table>
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
Luaj in interpreted mode performs well for the benchmarks, and even better when
|
Luaj in interpreted mode performs well for the benchmarks, and even better when
|
||||||
the lua-to-java-bytecode (luajc) compiler is used,
|
the lua-to-java-bytecode (luajc) compiler is used,
|
||||||
@@ -202,7 +213,8 @@ To see how luaj can be used to acccess most Java API's including swing, try:
|
|||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Links to sources:<pre>
|
Links to sources:
|
||||||
|
<pre>
|
||||||
<a href="examples/lua/hello.lua">examples/lua/hello.lua</a>
|
<a href="examples/lua/hello.lua">examples/lua/hello.lua</a>
|
||||||
<a href="examples/lua/swingapp.lua">examples/lua/swingapp.lua</a>
|
<a href="examples/lua/swingapp.lua">examples/lua/swingapp.lua</a>
|
||||||
</pre>
|
</pre>
|
||||||
@@ -224,7 +236,8 @@ The compiled output "luac.out" is lua bytecode and should run and produce the sa
|
|||||||
<h2>Compile lua source or bytecode to java bytecode</h2>
|
<h2>Compile lua source or bytecode to java bytecode</h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Luaj can compile lua sources or binaries directly to java bytecode if the bcel library is on the class path. From the main distribution directory line type:
|
Luaj can compile lua sources or binaries directly to java bytecode if the bcel library is on the class path. From
|
||||||
|
the main distribution directory line type:
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
ant bcel-lib
|
ant bcel-lib
|
||||||
@@ -235,10 +248,12 @@ Luaj can compile lua sources or binaries directly to java bytecode if the bcel l
|
|||||||
<p>
|
<p>
|
||||||
The output <em>hello.class</em> is Java bytecode, should run and produce the same result.
|
The output <em>hello.class</em> is Java bytecode, should run and produce the same result.
|
||||||
There is no runtime dependency on the bcel library,
|
There is no runtime dependency on the bcel library,
|
||||||
but the compiled classes must be in the class path at runtime, unless runtime jit-compiling via luajc and bcel are desired (see later sections).
|
but the compiled classes must be in the class path at runtime, unless runtime jit-compiling via luajc and bcel are
|
||||||
|
desired (see later sections).
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Lua scripts can also be run directly in this mode without precompiling using the <em>lua</em> command with the <b><em>-b</em></b> option and providing the <em>bcel</em> library in the class path:
|
Lua scripts can also be run directly in this mode without precompiling using the <em>lua</em> command with the
|
||||||
|
<b><em>-b</em></b> option and providing the <em>bcel</em> library in the class path:
|
||||||
<pre>
|
<pre>
|
||||||
java -cp "lib/luaj-jse-3.0.1.jar;lib/bcel-5.2.jar" lua -b examples/lua/hello.lua
|
java -cp "lib/luaj-jse-3.0.1.jar;lib/bcel-5.2.jar" lua -b examples/lua/hello.lua
|
||||||
</pre>
|
</pre>
|
||||||
@@ -461,7 +476,8 @@ For an example of loading allocating per-thread Globals and invoking scripts in
|
|||||||
multiple threads see <a href="examples/jse/SampleMultiThreaded.java">examples/jse/SampleMultiThreaded.java</a>
|
multiple threads see <a href="examples/jse/SampleMultiThreaded.java">examples/jse/SampleMultiThreaded.java</a>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
As an alternative, the JSR-223 scripting interface can be used, and should always provide a separate Globals instance
|
As an alternative, the JSR-223 scripting interface can be used, and should always provide a separate Globals
|
||||||
|
instance
|
||||||
per script engine instance by using a ThreadLocal internally.
|
per script engine instance by using a ThreadLocal internally.
|
||||||
|
|
||||||
<h2>Sandboxing</h2>
|
<h2>Sandboxing</h2>
|
||||||
@@ -469,7 +485,8 @@ Lua and luaj are allow for easy sandboxing of scripts in a server environment.
|
|||||||
<P>
|
<P>
|
||||||
Considerations include
|
Considerations include
|
||||||
<ul>
|
<ul>
|
||||||
<li>The <em>debug</em> and <em>luajava</em> library give unfettered access to the luaj vm and java vm so can be abused
|
<li>The <em>debug</em> and <em>luajava</em> library give unfettered access to the luaj vm and java vm so can be
|
||||||
|
abused
|
||||||
<li>Portions of the <em>os</em>, <em>io</em>, and <em>coroutine</em> libraries are prone to abuse
|
<li>Portions of the <em>os</em>, <em>io</em>, and <em>coroutine</em> libraries are prone to abuse
|
||||||
<li>Rogue scripts may need to be throttled or killed
|
<li>Rogue scripts may need to be throttled or killed
|
||||||
<li>Shared metatables (string, booleans, etc.) need to be made read-only or isolated via class loaders
|
<li>Shared metatables (string, booleans, etc.) need to be made read-only or isolated via class loaders
|
||||||
@@ -512,7 +529,8 @@ The <em>JsePlatform.standardGlobals()</em> globals also include:
|
|||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The <em>JsePlatform.debugGlobals()</em> and <em>JsePlatform.debugGlobals()</em> functions produce globals that include:
|
The <em>JsePlatform.debugGlobals()</em> and <em>JsePlatform.debugGlobals()</em> functions produce globals that
|
||||||
|
include:
|
||||||
<pre> debug
|
<pre> debug
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
@@ -576,7 +594,8 @@ The <em>lua</em> command line utility includes the <em>debug</em> library by def
|
|||||||
|
|
||||||
|
|
||||||
<h3><a name="luajava">The Luajava Library</a></h3>
|
<h3><a name="luajava">The Luajava Library</a></h3>
|
||||||
The <em>JsePlatform.standardGlobals()</em> includes the <em>luajava</em> library, which simplifies binding to Java classes and methods.
|
The <em>JsePlatform.standardGlobals()</em> includes the <em>luajava</em> library, which simplifies binding to Java
|
||||||
|
classes and methods.
|
||||||
It is patterned after the original <a href="http://www.keplerproject.org/luajava/">luajava project</a>.
|
It is patterned after the original <a href="http://www.keplerproject.org/luajava/">luajava project</a>.
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -590,14 +609,16 @@ The following lua script will open a swing frame on Java SE:
|
|||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
See a longer sample in <em>examples/lua/swingapp.lua</em> for details, including a simple animation loop, rendering graphics, mouse and key handling, and image loading.
|
See a longer sample in <em>examples/lua/swingapp.lua</em> for details, including a simple animation loop, rendering
|
||||||
|
graphics, mouse and key handling, and image loading.
|
||||||
Or try running it using:
|
Or try running it using:
|
||||||
<pre>
|
<pre>
|
||||||
java -cp lib/luaj-jse-3.0.1.jar lua examples/lua/swingapp.lua
|
java -cp lib/luaj-jse-3.0.1.jar lua examples/lua/swingapp.lua
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The Java ME platform does not include this library, and it cannot be made to work because of the lack of a reflection API in Java ME.
|
The Java ME platform does not include this library, and it cannot be made to work because of the lack of a
|
||||||
|
reflection API in Java ME.
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The <em>lua</em> connand line tool includes <em>luajava</em>.
|
The <em>lua</em> connand line tool includes <em>luajava</em>.
|
||||||
@@ -784,7 +805,8 @@ javadoc for details on using that class directly.
|
|||||||
|
|
||||||
<h2>Javacc Grammar</h2>
|
<h2>Javacc Grammar</h2>
|
||||||
A Javacc grammar was developed to simplify the creation of Java-based parsers for the lua language.
|
A Javacc grammar was developed to simplify the creation of Java-based parsers for the lua language.
|
||||||
The grammar is specified for <a href="https://javacc.dev.java.net/">javacc version 5.0</a> because that tool generates standalone
|
The grammar is specified for <a href="https://javacc.dev.java.net/">javacc version 5.0</a> because that tool generates
|
||||||
|
standalone
|
||||||
parsers that do not require a separate runtime.
|
parsers that do not require a separate runtime.
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -797,7 +819,8 @@ while a grammar that generates a typed parse tree is in
|
|||||||
The default lu compiler does a single-pass compile of lua source to lua bytecode, so no explicit parse tree is produced.
|
The default lu compiler does a single-pass compile of lua source to lua bytecode, so no explicit parse tree is produced.
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
To simplify the creation of abstract syntax trees from lua sources, the LuaParser class is generated as part of the JME build.
|
To simplify the creation of abstract syntax trees from lua sources, the LuaParser class is generated as part of the
|
||||||
|
JME build.
|
||||||
To use it, provide an input stream, and invoke the root generator, which will return a Chunk if the file is valid,
|
To use it, provide an input stream, and invoke the root generator, which will return a Chunk if the file is valid,
|
||||||
or throw a ParseException if there is a syntax error.
|
or throw a ParseException if there is a syntax error.
|
||||||
|
|
||||||
@@ -829,12 +852,14 @@ An example that prints locations of all function definitions in a file may be fo
|
|||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
See the <a href="http://luaj.org/luaj/3.0/api/org/luaj/vm2/ast/package-summary.html">org.luaj.vm2.ast package</a> javadoc for the API relating to the syntax tree that is produced.
|
See the <a href="http://luaj.org/luaj/3.0/api/org/luaj/vm2/ast/package-summary.html">org.luaj.vm2.ast package</a>
|
||||||
|
javadoc for the API relating to the syntax tree that is produced.
|
||||||
|
|
||||||
<h1>7 - <a name="7">Building and Testing</a></h1>
|
<h1>7 - <a name="7">Building and Testing</a></h1>
|
||||||
|
|
||||||
<h2><a name="maven">Maven integration</a></h2>
|
<h2><a name="maven">Maven integration</a></h2>
|
||||||
The main jar files are now deployed in the maven central repository. To use them in your maven-based project, list them as a dependency:
|
The main jar files are now deployed in the maven central repository. To use them in your maven-based project, list them
|
||||||
|
as a dependency:
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
For JSE projects, add this dependency for the luaj-jse jar:
|
For JSE projects, add this dependency for the luaj-jse jar:
|
||||||
@@ -911,55 +936,97 @@ Files are no longer hosted at LuaForge.
|
|||||||
<h1>9 - <a name="9">Release Notes</a></h1>
|
<h1>9 - <a name="9">Release Notes</a></h1>
|
||||||
|
|
||||||
<h2>Main Changes by Version</h2>
|
<h2>Main Changes by Version</h2>
|
||||||
<table cellspacing="10"><tr><td><table cellspacing="4">
|
<table cellspacing="10">
|
||||||
<tr valign="top"><td> <b>2.0</b></td><td><ul>
|
<tr>
|
||||||
|
<td>
|
||||||
|
<table cellspacing="4">
|
||||||
|
<tr valign="top">
|
||||||
|
<td> <b>2.0</b></td>
|
||||||
|
<td>
|
||||||
|
<ul>
|
||||||
<li>Initial release of 2.0 version</li>
|
<li>Initial release of 2.0 version</li>
|
||||||
</ul></td></tr>
|
</ul>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr valign="top"><td> <b>2.0.1</b></td><td><ul>
|
<tr valign="top">
|
||||||
|
<td> <b>2.0.1</b></td>
|
||||||
|
<td>
|
||||||
|
<ul>
|
||||||
<li>Improve correctness of singleton construction related to static initialization</li>
|
<li>Improve correctness of singleton construction related to static initialization</li>
|
||||||
<li>Fix nan-related error in constant folding logic that was failing on some JVMs</li>
|
<li>Fix nan-related error in constant folding logic that was failing on some JVMs</li>
|
||||||
<li>JSR-223 fixes: add META-INF/services entry in jse jar, improve bindings implementation </li>
|
<li>JSR-223 fixes: add META-INF/services entry in jse jar, improve bindings implementation
|
||||||
</ul></td></tr>
|
</li>
|
||||||
|
</ul>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr valign="top"><td> <b>2.0.2</b></td><td><ul>
|
<tr valign="top">
|
||||||
|
<td> <b>2.0.2</b></td>
|
||||||
|
<td>
|
||||||
|
<ul>
|
||||||
<li>JSR-223 bindings change: non Java-primitives will now be passed as LuaValue</li>
|
<li>JSR-223 bindings change: non Java-primitives will now be passed as LuaValue</li>
|
||||||
<li>JSR-223 enhancement: allow both ".lua" and "lua" as extensions in getScriptEngine()</li>
|
<li>JSR-223 enhancement: allow both ".lua" and "lua" as extensions in getScriptEngine()</li>
|
||||||
<li>JSR-223 fix: use system class loader to support using luaj as JRE extension</li>
|
<li>JSR-223 fix: use system class loader to support using luaj as JRE extension</li>
|
||||||
<li>Improve selection logic when binding to overloaded functions using luajava</li>
|
<li>Improve selection logic when binding to overloaded functions using luajava</li>
|
||||||
<li>Enhance javadoc, put it <a href="docs/api/index.html">in distribution</a>
|
<li>Enhance javadoc, put it <a href="docs/api/index.html">in distribution</a>
|
||||||
and at <a href="http://luaj.sourceforge.net/api/2.0/index.html">http://luaj.sourceforge.net/api/2.0/</a></li>
|
and at <a href="http://luaj.sourceforge.net/api/2.0/index.html">http://luaj.sourceforge.net/api/2.0/</a>
|
||||||
|
</li>
|
||||||
<li>Major refactor of luajava type coercion logic, improve method selection.</li>
|
<li>Major refactor of luajava type coercion logic, improve method selection.</li>
|
||||||
<li>Add lib/luaj-sources-2.0.2.jar for easier integration into an IDE such as Netbeans</li>
|
<li>Add lib/luaj-sources-2.0.2.jar for easier integration into an IDE such as Netbeans</li>
|
||||||
|
|
||||||
<tr valign="top"><td> <b>2.0.3</b></td><td><ul>
|
<tr valign="top">
|
||||||
<li>Improve coroutine state logic including let unreferenced coroutines be garbage collected </li>
|
<td> <b>2.0.3</b></td>
|
||||||
<li>Fix lua command vararg values passed into main script to match what is in global arg table </li>
|
<td>
|
||||||
<li>Add arithmetic metatag processing when left hand side is a number and right hand side has metatable </li>
|
<ul>
|
||||||
|
<li>Improve coroutine state logic including let unreferenced coroutines be garbage
|
||||||
|
collected
|
||||||
|
</li>
|
||||||
|
<li>Fix lua command vararg values passed into main script to match what is in global arg
|
||||||
|
table
|
||||||
|
</li>
|
||||||
|
<li>Add arithmetic metatag processing when left hand side is a number and right hand side
|
||||||
|
has metatable
|
||||||
|
</li>
|
||||||
<li>Fix load(func) when mutiple string fragments are supplied by calls to func</li>
|
<li>Fix load(func) when mutiple string fragments are supplied by calls to func</li>
|
||||||
<li>Allow access to public members of private inner classes where possible</li>
|
<li>Allow access to public members of private inner classes where possible</li>
|
||||||
<li>Turn on error reporting in LuaParser so line numbers ar available in ParseException</li>
|
<li>Turn on error reporting in LuaParser so line numbers ar available in ParseException</li>
|
||||||
<li>Improve compatibility of table.remove()</li>
|
<li>Improve compatibility of table.remove()</li>
|
||||||
<li>Disallow base library setfenv() calls on Java functions</li>
|
<li>Disallow base library setfenv() calls on Java functions</li>
|
||||||
|
|
||||||
<tr valign="top"><td> <b>3.0</b></td><td><ul>
|
<tr valign="top">
|
||||||
|
<td> <b>3.0</b></td>
|
||||||
|
<td>
|
||||||
|
<ul>
|
||||||
<li>Convert internal and external API's to match lua 5.2.x environment changes</li>
|
<li>Convert internal and external API's to match lua 5.2.x environment changes</li>
|
||||||
<li>Add bit32 library</li>
|
<li>Add bit32 library</li>
|
||||||
<li>Add explicit Globals object to manage global state, especially to imrpove thread safety </li>
|
<li>Add explicit Globals object to manage global state, especially to imrpove thread
|
||||||
<li>Drop support for lua source to java surce (lua2java) in favor of direct java bytecode output (luajc) </li>
|
safety
|
||||||
<li>Remove compatibility functions like table.getn(), table.maxn(), table.foreach(), and math.log10() </li>
|
</li>
|
||||||
<li>Add ability to create runnable jar file from lua script with sample build file build-app.xml </li>
|
<li>Drop support for lua source to java surce (lua2java) in favor of direct java bytecode
|
||||||
|
output (luajc)
|
||||||
|
</li>
|
||||||
|
<li>Remove compatibility functions like table.getn(), table.maxn(), table.foreach(), and
|
||||||
|
math.log10()
|
||||||
|
</li>
|
||||||
|
<li>Add ability to create runnable jar file from lua script with sample build file
|
||||||
|
build-app.xml
|
||||||
|
</li>
|
||||||
<li>Supply environment as second argument to LibFunction when loading via require()</li>
|
<li>Supply environment as second argument to LibFunction when loading via require()</li>
|
||||||
<li>Fix bug 3597515 memory leak due to string caching by simplifying caching logic.</li>
|
<li>Fix bug 3597515 memory leak due to string caching by simplifying caching logic.</li>
|
||||||
<li>Fix bug 3565008 so that short substrings are backed by short arrays.</li>
|
<li>Fix bug 3565008 so that short substrings are backed by short arrays.</li>
|
||||||
<li>Fix bug 3495802 to return correct offset of substrings from string.find().</li>
|
<li>Fix bug 3495802 to return correct offset of substrings from string.find().</li>
|
||||||
<li>Add artifacts to Maven central repository.</li>
|
<li>Add artifacts to Maven central repository.</li>
|
||||||
<li>Limit pluggable scripting to use compatible bindings and contexts, implement redirection.</li>
|
<li>Limit pluggable scripting to use compatible bindings and contexts, implement
|
||||||
|
redirection.
|
||||||
|
</li>
|
||||||
<li>Fix bug that didn't read package.path from environment.</li>
|
<li>Fix bug that didn't read package.path from environment.</li>
|
||||||
<li>Fix pluggable scripting engine lookup, simplify implementation, and add unit tests.</li>
|
<li>Fix pluggable scripting engine lookup, simplify implementation, and add unit tests.</li>
|
||||||
<li>Coerce script engine eval() return values to Java.</li>
|
<li>Coerce script engine eval() return values to Java.</li>
|
||||||
<li>Fix Lua to Java coercion directly on Java classes.</li>
|
<li>Fix Lua to Java coercion directly on Java classes.</li>
|
||||||
<li>Fix Globals.load() to call the library with an empty modname and the globals as the environment.</li>
|
<li>Fix Globals.load() to call the library with an empty modname and the globals as the
|
||||||
|
environment.
|
||||||
|
</li>
|
||||||
<li>Fix hash codes of double.</li>
|
<li>Fix hash codes of double.</li>
|
||||||
<li>Fix bug in luajava overload resolution.</li>
|
<li>Fix bug in luajava overload resolution.</li>
|
||||||
<li>Fix luastring bug where parsing did not check for overflow.</li>
|
<li>Fix luastring bug where parsing did not check for overflow.</li>
|
||||||
@@ -971,12 +1038,17 @@ and at <a href="http://luaj.sourceforge.net/api/2.0/index.html">http://luaj.sour
|
|||||||
<li>Fix os.time() to return a number of seconds instead of milliseconds.</li>
|
<li>Fix os.time() to return a number of seconds instead of milliseconds.</li>
|
||||||
<li>Implement formatting with os.date(), and table argument for os.time().</li>
|
<li>Implement formatting with os.date(), and table argument for os.time().</li>
|
||||||
<li>LuaValue.checkfunction() now returns LuaFunction.</li>
|
<li>LuaValue.checkfunction() now returns LuaFunction.</li>
|
||||||
<li>Refactor APIs related to compiling and loading scripts to provide methods on Globals.</li>
|
<li>Refactor APIs related to compiling and loading scripts to provide methods on Globals.
|
||||||
|
</li>
|
||||||
<li>Add API to compile from Readers as well as InputStreams.</li>
|
<li>Add API to compile from Readers as well as InputStreams.</li>
|
||||||
<li>Add optional -c encoding flag to lua, luac, and luajc tools to control source encoding.</li>
|
<li>Add optional -c encoding flag to lua, luac, and luajc tools to control source
|
||||||
|
encoding.
|
||||||
|
</li>
|
||||||
<li>Let errors thrown in debug hooks bubble up to the running coroutine.</li>
|
<li>Let errors thrown in debug hooks bubble up to the running coroutine.</li>
|
||||||
<li>Make error message handler function in xpcall per-thread instead of per-globals.</li>
|
<li>Make error message handler function in xpcall per-thread instead of per-globals.</li>
|
||||||
<li>Establish "org.luaj.debug" and "org.luaj.luajc" system properties to configure scripting engine.</li>
|
<li>Establish "org.luaj.debug" and "org.luaj.luajc" system properties to configure scripting
|
||||||
|
engine.
|
||||||
|
</li>
|
||||||
<li>Add sample code for Android Application that uses luaj.</li>
|
<li>Add sample code for Android Application that uses luaj.</li>
|
||||||
<li>Add sample code for Applet that uses luaj.</li>
|
<li>Add sample code for Applet that uses luaj.</li>
|
||||||
<li>Fix balanced match for empty string (fixes issue #23).</li>
|
<li>Fix balanced match for empty string (fixes issue #23).</li>
|
||||||
@@ -989,7 +1061,10 @@ and at <a href="http://luaj.sourceforge.net/api/2.0/index.html">http://luaj.sour
|
|||||||
<li>In CoerceJavaToLua.coerse(), coerce LuaValue to same value (fixes issue #29).</li>
|
<li>In CoerceJavaToLua.coerse(), coerce LuaValue to same value (fixes issue #29).</li>
|
||||||
<li>Fix line number reporting in debug stack traces (fixes issue #30).</li>
|
<li>Fix line number reporting in debug stack traces (fixes issue #30).</li>
|
||||||
|
|
||||||
<tr valign="top"><td> <b>3.0.1</b></td><td><ul>
|
<tr valign="top">
|
||||||
|
<td> <b>3.0.1</b></td>
|
||||||
|
<td>
|
||||||
|
<ul>
|
||||||
<li>Fix __len metatag processing for tables.</li>
|
<li>Fix __len metatag processing for tables.</li>
|
||||||
<li>Add fallback to __lt when pocessing __le metatag.</li>
|
<li>Add fallback to __lt when pocessing __le metatag.</li>
|
||||||
<li>Convert anonymous classes to inner classes (gradle build support).</li>
|
<li>Convert anonymous classes to inner classes (gradle build support).</li>
|
||||||
@@ -1001,24 +1076,44 @@ and at <a href="http://luaj.sourceforge.net/api/2.0/index.html">http://luaj.sour
|
|||||||
<li>Allow access to Java inner classes using lua field syntax (fixes issue #40).</li>
|
<li>Allow access to Java inner classes using lua field syntax (fixes issue #40).</li>
|
||||||
<li>List keyeq() and keyindex() methods as abstract on LuaTable.Entry (issue #37).</li>
|
<li>List keyeq() and keyindex() methods as abstract on LuaTable.Entry (issue #37).</li>
|
||||||
<li>Fix return value for table.remove() and table.insert() (fixes issue #39)</li>
|
<li>Fix return value for table.remove() and table.insert() (fixes issue #39)</li>
|
||||||
<li>Fix aliasing issue for some multiple assignments from varargs return values (fixes issue #38)</li>
|
<li>Fix aliasing issue for some multiple assignments from varargs return values (fixes issue
|
||||||
<li>Let os.getenv() return System.getenv() values first for JSE, then fall back to properties (fixes issue #25)</li>
|
#38)
|
||||||
<li>Improve garbage collection of orphaned coroutines when yielding from debug hook functions (fixes issue #32).</li>
|
</li>
|
||||||
<li>LuaScriptEngineFactory.getScriptEngine() now returns new instance of LuaScriptEngine for each call.</li>
|
<li>Let os.getenv() return System.getenv() values first for JSE, then fall back to
|
||||||
|
properties (fixes issue #25)
|
||||||
|
</li>
|
||||||
|
<li>Improve garbage collection of orphaned coroutines when yielding from debug hook
|
||||||
|
functions (fixes issue #32).
|
||||||
|
</li>
|
||||||
|
<li>LuaScriptEngineFactory.getScriptEngine() now returns new instance of LuaScriptEngine for
|
||||||
|
each call.
|
||||||
|
</li>
|
||||||
<li>Fix os.date("*t") to return hour in 24 hour format (fixes issue #45)</li>
|
<li>Fix os.date("*t") to return hour in 24 hour format (fixes issue #45)</li>
|
||||||
<li>Add SampleSandboxed.java example code to illustrate sandboxing techniques in Java.</li>
|
<li>Add SampleSandboxed.java example code to illustrate sandboxing techniques in Java.</li>
|
||||||
<li>Add samplesandboxed.lua example code to illustrate sandboxing techniques in lua.</li>
|
<li>Add samplesandboxed.lua example code to illustrate sandboxing techniques in lua.</li>
|
||||||
<li>Add CollectingOrphanedCoroutines.java example code to show how to deal with orphaned lua threads.</li>
|
<li>Add CollectingOrphanedCoroutines.java example code to show how to deal with orphaned lua
|
||||||
<li>Add LuajClassLoader.java and Launcher.java to simplify loading via custom class loader.</li>
|
threads.
|
||||||
<li>Add SampleUsingClassLoader.java example code to demonstrate loading using custom class loader.</li>
|
</li>
|
||||||
|
<li>Add LuajClassLoader.java and Launcher.java to simplify loading via custom class
|
||||||
|
loader.
|
||||||
|
</li>
|
||||||
|
<li>Add SampleUsingClassLoader.java example code to demonstrate loading using custom class
|
||||||
|
loader.
|
||||||
|
</li>
|
||||||
<li>Make shared string metatable an actual metatable.</li>
|
<li>Make shared string metatable an actual metatable.</li>
|
||||||
<li>Add sample code that illustrates techniques in creating sandboxed environments.</li>
|
<li>Add sample code that illustrates techniques in creating sandboxed environments.</li>
|
||||||
<li>Add convenience methods to Global to load string scripts with custom environment.</li>
|
<li>Add convenience methods to Global to load string scripts with custom environment.</li>
|
||||||
<li>Move online docs to <a href="http://luaj.org/luaj/3.0/api/index.html">http://luaj.org/luaj/3.0/api/</a></li>
|
<li>Move online docs to <a href="http://luaj.org/luaj/3.0/api/index.html">http://luaj.org/luaj/3.0/api/</a>
|
||||||
|
</li>
|
||||||
<li>Fix os.time() conversions for pm times.</li>
|
<li>Fix os.time() conversions for pm times.</li>
|
||||||
|
|
||||||
</ul></td></tr>
|
</ul>
|
||||||
</table></td></tr></table>
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
<h2>Known Issues</h2>
|
<h2>Known Issues</h2>
|
||||||
<h3>Limitations</h3>
|
<h3>Limitations</h3>
|
||||||
@@ -1045,9 +1140,12 @@ For a non ASCII-compatible encoding such as EBSDIC, however, there are restricti
|
|||||||
<li>string literals with quoted characters may not produce the expected values in generated code
|
<li>string literals with quoted characters may not produce the expected values in generated code
|
||||||
<li>command-line tools lua, luac, and luajc will require <em>-c Cp037</em> to specify the encoding
|
<li>command-line tools lua, luac, and luajc will require <em>-c Cp037</em> to specify the encoding
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
These restrictions are mainly a side effect of how the language is defined as allowing byte literals
|
These restrictions are mainly a side effect of how the language is defined as allowing byte literals
|
||||||
within literal strings in source files.
|
within literal strings in source files.
|
||||||
|
|
||||||
Code that is generated on the fly within lua and compiled with lua's <em>load()</em> function
|
Code that is generated on the fly within lua and compiled with lua's <em>load()</em> function
|
||||||
should work as expected, since these strings will never be represented with the
|
should work as expected, since these strings will never be represented with the
|
||||||
host's native character encoding.
|
host's native character encoding.
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user