From c0e043403fec8abff9775840fd60598411b43eb8 Mon Sep 17 00:00:00 2001 From: James Roseborough Date: Mon, 27 Oct 2014 13:52:26 +0000 Subject: [PATCH] Fix corner cases in _LE and _LEN metatag processing. --- README.html | 55 ++++++++++------------ src/core/org/luaj/vm2/LoadState.java | 15 +++--- src/core/org/luaj/vm2/LuaTable.java | 27 ++++++----- src/core/org/luaj/vm2/LuaValue.java | 9 ++-- src/core/org/luaj/vm2/TailcallVarargs.java | 3 -- 5 files changed, 51 insertions(+), 58 deletions(-) diff --git a/README.html b/README.html index 217457d0..5a7f4746 100644 --- a/README.html +++ b/README.html @@ -16,7 +16,7 @@ Getting Started with LuaJ -James Roseborough, Ian Farmer, Version 3.0 +James Roseborough, Ian Farmer, Version 3.0.1

Copyright © 2009-2014 Luaj.org. @@ -120,7 +120,7 @@ in comparison with the standard C distribution. 16.794 11.274 Java - java -cp luaj-jse-3.0.jar;bcel-5.2.jar lua -b fannkuch.lua 10 + java -cp luaj-jse-3.0.1.jar;bcel-5.2.jar lua -b fannkuch.lua 10 @@ -130,7 +130,7 @@ in comparison with the standard C distribution. 36.894 15.163 - java -cp luaj-jse-3.0.jar lua -n fannkuch.lua 10 + java -cp luaj-jse-3.0.1.jar lua -n fannkuch.lua 10 lua 5.1.4 @@ -186,7 +186,7 @@ It is also faster than Java-lua implementations Jill, Kahlua, and Mochalua for a From the main distribution directory line type:

-	java -cp lib/luaj-jse-3.0.jar lua examples/lua/hello.lua
+	java -cp lib/luaj-jse-3.0.1.jar lua examples/lua/hello.lua
 

@@ -198,7 +198,7 @@ You should see the following output: To see how luaj can be used to acccess most Java API's including swing, try:

-	java -cp lib/luaj-jse-3.0.jar lua examples/lua/swingapp.lua
+	java -cp lib/luaj-jse-3.0.1.jar lua examples/lua/swingapp.lua
 

@@ -213,8 +213,8 @@ Links to sources:

 From the main distribution directory line type:
 
 
-	java -cp lib/luaj-jse-3.0.jar luac examples/lua/hello.lua
-	java -cp lib/luaj-jse-3.0.jar lua luac.out
+	java -cp lib/luaj-jse-3.0.1.jar luac examples/lua/hello.lua
+	java -cp lib/luaj-jse-3.0.1.jar lua luac.out
 

@@ -228,8 +228,8 @@ Luaj can compile lua sources or binaries directly to java bytecode if the bcel l

 	ant bcel-lib
-	java -cp "lib/luaj-jse-3.0.jar;lib/bcel-5.2.jar" luajc -s examples/lua -d . hello.lua
-	java -cp "lib/luaj-jse-3.0.jar;." lua -l hello
+	java -cp "lib/luaj-jse-3.0.1.jar;lib/bcel-5.2.jar" luajc -s examples/lua -d . hello.lua
+	java -cp "lib/luaj-jse-3.0.1.jar;." lua -l hello
 

@@ -240,7 +240,7 @@ but the compiled classes must be in the class path at runtime, unless runtime ji

Lua scripts can also be run directly in this mode without precompiling using the lua command with the -b option and providing the bcel library in the class path:

-	java -cp "lib/luaj-jse-3.0.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
 
@@ -284,7 +284,7 @@ A simple example may be found in

-You must include the library lib/luaj-jse-3.0.jar in your class path. +You must include the library lib/luaj-jse-3.0.1.jar in your class path.

Run a script in a MIDlet

@@ -311,7 +311,7 @@ A simple example may be found in

-You must include the library lib/luaj-jme-3.0.jar in your midlet jar. +You must include the library lib/luaj-jme-3.0.1.jar in your midlet jar.

An ant script to build and run the midlet is in @@ -341,7 +341,7 @@ You can also look up the engine by language "lua" or mimetypes "text/lua" or "ap All standard aspects of script engines including compiled statements are supported.

-You must include the library lib/luaj-jse-3.0.jar in your class path. +You must include the library lib/luaj-jse-3.0.1.jar in your class path.

A working example may be found in @@ -352,8 +352,8 @@ A working example may be found in To compile and run it using Java 1.6 or higher:

-	javac -cp lib/luaj-jse-3.0.jar examples/jse/ScriptEngineSample.java
-	java -cp "lib/luaj-jse-3.0.jar;examples/jse" ScriptEngineSample
+	javac -cp lib/luaj-jse-3.0.1.jar examples/jse/ScriptEngineSample.java
+	java -cp "lib/luaj-jse-3.0.1.jar;examples/jse" ScriptEngineSample
 

Excluding the lua bytecode compiler

@@ -570,7 +570,7 @@ The following lua script will open a swing frame on Java SE: See a longer sample in examples/lua/swingapp.lua for details, including a simple animation loop, rendering graphics, mouse and key handling, and image loading. Or try running it using:
-	java -cp lib/luaj-jse-3.0.jar lua examples/lua/swingapp.lua
+	java -cp lib/luaj-jse-3.0.1.jar lua examples/lua/swingapp.lua
 

@@ -817,7 +817,7 @@ For JSE projects, add this dependency for the luaj-jse jar: <dependency> <groupId>org.luaj</groupId> <artifactId>luaj-jse</artifactId> - <version>3.0</version> + <version>3.0.1</version> </dependency> while for JME projects, use the luaj-jme jar: @@ -825,7 +825,7 @@ while for JME projects, use the luaj-jme jar: <dependency> <groupId>org.luaj</groupId> <artifactId>luaj-jme</artifactId> - <version>3.0</version> + <version>3.0.1</version> </dependency> @@ -855,7 +855,7 @@ Unit test scripts can be found in these locations test/lua/*.lua test/lua/errors/*.lua test/lua/perf/*.lua - test/lua/luaj3.0-tests.zip + test/lua/luaj3.0.1-tests.zip

Code coverage

@@ -916,25 +916,19 @@ Files are no longer hosted at LuaForge.
  • Improve compatibility of table.remove()
  • Disallow base library setfenv() calls on Java functions
  • -  3.0-alpha1