renamed DebugStackState to DebugLuaState
This commit is contained in:
@@ -51,7 +51,7 @@ import org.luaj.vm.LPrototype;
|
||||
import org.luaj.vm.LuaState;
|
||||
|
||||
|
||||
public class DebugStackState extends LuaState implements DebugRequestListener {
|
||||
public class DebugLuaState extends LuaState implements DebugRequestListener {
|
||||
private static final boolean TRACE = (null != System.getProperty("TRACE"));
|
||||
|
||||
// stepping constants and stepping state
|
||||
@@ -71,7 +71,7 @@ public class DebugStackState extends LuaState implements DebugRequestListener {
|
||||
protected String lastSource;
|
||||
protected DebugSupport debugSupport;
|
||||
|
||||
public DebugStackState() {
|
||||
public DebugLuaState() {
|
||||
}
|
||||
|
||||
public void setDebugSupport(DebugSupport debugSupport)
|
||||
@@ -17,7 +17,7 @@ public class DebugSupport implements DebugRequestListener, DebugEventListener {
|
||||
protected static final int RUNNING = 1;
|
||||
protected static final int STOPPED = 2;
|
||||
|
||||
protected DebugStackState vm;
|
||||
protected DebugLuaState vm;
|
||||
protected int requestPort;
|
||||
protected int eventPort;
|
||||
protected Thread requestWatcherThread;
|
||||
@@ -41,7 +41,7 @@ public class DebugSupport implements DebugRequestListener, DebugEventListener {
|
||||
this.eventPort = eventPort;
|
||||
}
|
||||
|
||||
public void setDebugStackState(DebugStackState vm) {
|
||||
public void setDebugStackState(DebugLuaState vm) {
|
||||
this.vm = vm;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.luaj.debug.DebugStackState;
|
||||
import org.luaj.debug.DebugLuaState;
|
||||
import org.luaj.debug.DebugSupport;
|
||||
import org.luaj.debug.DebugUtils;
|
||||
import org.luaj.debug.VMException;
|
||||
@@ -197,7 +197,7 @@ public class StandardLuaJVM {
|
||||
DebugUtils.println("setting up LuaJava and debug stack state...");
|
||||
|
||||
// new lua debug state
|
||||
state = new DebugStackState();
|
||||
state = new DebugLuaState();
|
||||
init(state._G);
|
||||
|
||||
// load the Lua file
|
||||
@@ -228,8 +228,8 @@ public class StandardLuaJVM {
|
||||
getDebugState().stop();
|
||||
}
|
||||
|
||||
private DebugStackState getDebugState() {
|
||||
return (DebugStackState)state;
|
||||
private DebugLuaState getDebugState() {
|
||||
return (DebugLuaState)state;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,7 +24,7 @@ package org.luaj.debug;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.luaj.debug.DebugStackState;
|
||||
import org.luaj.debug.DebugLuaState;
|
||||
import org.luaj.vm.LClosure;
|
||||
import org.luaj.vm.LValue;
|
||||
import org.luaj.vm.LoadState;
|
||||
@@ -38,7 +38,7 @@ public class DebugStackStateTest extends TestCase {
|
||||
String script = "/test6.luac";
|
||||
|
||||
// set up the vm
|
||||
final DebugStackState state = new DebugStackState();
|
||||
final DebugLuaState state = new DebugLuaState();
|
||||
InputStream is = getClass().getResourceAsStream( script );
|
||||
LPrototype p = LoadState.undump(state, is, script);
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import java.io.OutputStream;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.luaj.debug.DebugStackState;
|
||||
import org.luaj.debug.DebugLuaState;
|
||||
import org.luaj.lib.MathLib;
|
||||
import org.luaj.lib.j2se.LuajavaLib;
|
||||
|
||||
@@ -112,7 +112,7 @@ public class LuaJTest extends TestCase {
|
||||
private void runTest( String testName ) throws IOException, InterruptedException {
|
||||
|
||||
// new lua state
|
||||
LuaState state = new DebugStackState();
|
||||
LuaState state = new DebugLuaState();
|
||||
|
||||
// add LuaJava bindings
|
||||
LuajavaLib.install(state._G);
|
||||
|
||||
@@ -13,7 +13,7 @@ import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.luaj.debug.DebugStackState;
|
||||
import org.luaj.debug.DebugLuaState;
|
||||
import org.luaj.lib.MathLib;
|
||||
|
||||
public class StandardTest extends TestCase {
|
||||
@@ -65,7 +65,7 @@ public class StandardTest extends TestCase {
|
||||
}
|
||||
|
||||
public void runTest() {
|
||||
LuaState state = new DebugStackState();
|
||||
LuaState state = new DebugLuaState();
|
||||
MathLib.install(state._G);
|
||||
// hack: it's unpleasant when the test cases fail to terminate;
|
||||
// unfortunately, there is a test in the standard suite that
|
||||
|
||||
Reference in New Issue
Block a user