Fix source and class names in generated bytecode.

This commit is contained in:
James Roseborough
2009-10-30 00:39:25 +00:00
parent f729c1b626
commit dd82fe6d2d
3 changed files with 69 additions and 55 deletions

View File

@@ -34,6 +34,7 @@ import org.luaj.vm2.LuaValue;
import org.luaj.vm2.compiler.LuaC;
import org.luaj.vm2.lib.DebugLib;
import org.luaj.vm2.lib.JsePlatform;
import org.luaj.vm2.luajc.JavaBytecodeCompiler;
/**
@@ -49,6 +50,7 @@ public class lua {
" -l name require library 'name'\n" +
" -i enter interactive mode after executing 'script'\n" +
" -v show version information\n" +
" -j compile into java bytecode\n" +
" -- stop handling options\n" +
" - execute stdin and stop handling options";
@@ -62,9 +64,9 @@ public class lua {
public static void main( String[] args ) throws IOException {
// new lua state
LuaC.install();
_G = JsePlatform.standardGlobals();
DebugLib.install( _G );
LuaC.install();
// process args
boolean interactive = (args.length == 0);
@@ -97,6 +99,9 @@ public class lua {
case 'v':
versioninfo = true;
break;
case 'j':
JavaBytecodeCompiler.install();
break;
case '-':
if ( args[i].length() > 2 )
usageExit();