Simplified, extended jit implementation
This commit is contained in:
@@ -31,7 +31,7 @@ public class SimpleTests extends TestCase {
|
||||
// try running the code!
|
||||
LuaState state = Platform.newLuaState();
|
||||
BaseLib.install( state._G );
|
||||
LClosure c = new LClosure( state, p );
|
||||
LClosure c = p.newClosure( state._G );
|
||||
state.doCall( c, new LValue[0] );
|
||||
} catch ( Exception e ) {
|
||||
fail("i/o exception: "+e );
|
||||
|
||||
@@ -55,7 +55,7 @@ public class DebugStackStateTest extends TestCase {
|
||||
LPrototype p = LoadState.undump(state, is, script);
|
||||
|
||||
// create closure and execute
|
||||
final LClosure c = new LClosure( state, p );
|
||||
final LClosure c = p.newClosure( state._G );
|
||||
|
||||
// suspend the vm right away
|
||||
state.suspend();
|
||||
|
||||
@@ -194,7 +194,7 @@ public class LuaJTest extends TestCase {
|
||||
BaseLib.redirectOutput( outputStream );
|
||||
try {
|
||||
// create closure and execute
|
||||
LClosure c = new LClosure( p, state._G );
|
||||
LClosure c = p.newClosure( state._G );
|
||||
state.doCall(c, new LValue[0]);
|
||||
|
||||
final String actualOutput = new String( outputStream.toByteArray() );
|
||||
@@ -207,7 +207,7 @@ public class LuaJTest extends TestCase {
|
||||
}
|
||||
}
|
||||
|
||||
private LPrototype loadScriptResource( LuaState state, String name ) throws IOException {
|
||||
protected LPrototype loadScriptResource( LuaState state, String name ) throws IOException {
|
||||
InputStream script = getClass().getResourceAsStream( "/"+name+".luac" );
|
||||
if ( script == null ) {
|
||||
script = getClass().getResourceAsStream( "/"+name+".lua" );
|
||||
|
||||
@@ -74,7 +74,7 @@ public class StandardTest extends TestCase {
|
||||
// the garbage collector. Until we implement that, remove the
|
||||
// built-in collectgarbage function.
|
||||
state._G.put( "collectgarbage", LNil.NIL );
|
||||
LClosure c = new LClosure( code, state._G );
|
||||
LClosure c = code.newClosure( state._G );
|
||||
|
||||
ByteArrayOutputStream output = new ByteArrayOutputStream();
|
||||
BaseLib.redirectOutput( output );
|
||||
|
||||
Reference in New Issue
Block a user