Refactor java code generator.
This commit is contained in:
@@ -25,7 +25,7 @@ import junit.framework.Test;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.luaj.vm2.compiler.LuaC;
|
||||
import org.luaj.vm2.luajc.JavaBytecodeCompiler;
|
||||
import org.luaj.vm2.luajc.LuaJC;
|
||||
|
||||
/**
|
||||
* Compatibility tests for the Luaj VM
|
||||
@@ -92,7 +92,7 @@ public class CompatibiltyTest {
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
System.setProperty("JME", "false");
|
||||
JavaBytecodeCompiler.install();
|
||||
LuaJC.install();
|
||||
}
|
||||
// not supported on this platform - don't test
|
||||
public void testDebugLib() {}
|
||||
|
||||
@@ -27,7 +27,7 @@ import java.io.InputStream;
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.luaj.vm2.compiler.LuaC;
|
||||
import org.luaj.vm2.luajc.JavaBytecodeCompiler;
|
||||
import org.luaj.vm2.luajc.LuaJC;
|
||||
|
||||
/**
|
||||
* Test compilation of various fragments that have
|
||||
@@ -43,7 +43,7 @@ public class FragmentsTest extends TestCase {
|
||||
InputStream is = new ByteArrayInputStream(script.getBytes("UTF-8"));
|
||||
LuaValue chunk ;
|
||||
if ( true ) {
|
||||
chunk = JavaBytecodeCompiler.load(is,name,_G);
|
||||
chunk = LuaJC.getInstance().load(is,name,_G);
|
||||
} else {
|
||||
chunk = (new LuaC()).load( is, name, _G );
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ import java.io.PrintStream;
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.luaj.vm2.lib.BaseLib;
|
||||
import org.luaj.vm2.luajc.JavaBytecodeCompiler;
|
||||
import org.luaj.vm2.luajc.LuaJC;
|
||||
|
||||
abstract
|
||||
public class ScriptDrivenTest extends TestCase {
|
||||
@@ -111,7 +111,7 @@ public class ScriptDrivenTest extends TestCase {
|
||||
return c;
|
||||
} else {
|
||||
script = new FileInputStream(file);
|
||||
return JavaBytecodeCompiler.load( script, name, _G);
|
||||
return LuaJC.getInstance().load( script, name, _G);
|
||||
}
|
||||
default:
|
||||
script = new FileInputStream(file);
|
||||
|
||||
Reference in New Issue
Block a user