renamed DebugStackState to DebugLuaState

This commit is contained in:
Shu Lei
2007-11-08 01:59:42 +00:00
parent 25c008dab6
commit af51bf6f07
6 changed files with 14 additions and 14 deletions

View File

@@ -51,7 +51,7 @@ import org.luaj.vm.LPrototype;
import org.luaj.vm.LuaState; 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")); private static final boolean TRACE = (null != System.getProperty("TRACE"));
// stepping constants and stepping state // stepping constants and stepping state
@@ -71,7 +71,7 @@ public class DebugStackState extends LuaState implements DebugRequestListener {
protected String lastSource; protected String lastSource;
protected DebugSupport debugSupport; protected DebugSupport debugSupport;
public DebugStackState() { public DebugLuaState() {
} }
public void setDebugSupport(DebugSupport debugSupport) public void setDebugSupport(DebugSupport debugSupport)

View File

@@ -17,7 +17,7 @@ public class DebugSupport implements DebugRequestListener, DebugEventListener {
protected static final int RUNNING = 1; protected static final int RUNNING = 1;
protected static final int STOPPED = 2; protected static final int STOPPED = 2;
protected DebugStackState vm; protected DebugLuaState vm;
protected int requestPort; protected int requestPort;
protected int eventPort; protected int eventPort;
protected Thread requestWatcherThread; protected Thread requestWatcherThread;
@@ -41,7 +41,7 @@ public class DebugSupport implements DebugRequestListener, DebugEventListener {
this.eventPort = eventPort; this.eventPort = eventPort;
} }
public void setDebugStackState(DebugStackState vm) { public void setDebugStackState(DebugLuaState vm) {
this.vm = vm; this.vm = vm;
} }

View File

@@ -26,7 +26,7 @@ import java.io.FileInputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import org.luaj.debug.DebugStackState; import org.luaj.debug.DebugLuaState;
import org.luaj.debug.DebugSupport; import org.luaj.debug.DebugSupport;
import org.luaj.debug.DebugUtils; import org.luaj.debug.DebugUtils;
import org.luaj.debug.VMException; import org.luaj.debug.VMException;
@@ -197,7 +197,7 @@ public class StandardLuaJVM {
DebugUtils.println("setting up LuaJava and debug stack state..."); DebugUtils.println("setting up LuaJava and debug stack state...");
// new lua debug state // new lua debug state
state = new DebugStackState(); state = new DebugLuaState();
init(state._G); init(state._G);
// load the Lua file // load the Lua file
@@ -228,8 +228,8 @@ public class StandardLuaJVM {
getDebugState().stop(); getDebugState().stop();
} }
private DebugStackState getDebugState() { private DebugLuaState getDebugState() {
return (DebugStackState)state; return (DebugLuaState)state;
} }
/** /**

View File

@@ -24,7 +24,7 @@ package org.luaj.debug;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import org.luaj.debug.DebugStackState; import org.luaj.debug.DebugLuaState;
import org.luaj.vm.LClosure; import org.luaj.vm.LClosure;
import org.luaj.vm.LValue; import org.luaj.vm.LValue;
import org.luaj.vm.LoadState; import org.luaj.vm.LoadState;
@@ -38,7 +38,7 @@ public class DebugStackStateTest extends TestCase {
String script = "/test6.luac"; String script = "/test6.luac";
// set up the vm // set up the vm
final DebugStackState state = new DebugStackState(); final DebugLuaState state = new DebugLuaState();
InputStream is = getClass().getResourceAsStream( script ); InputStream is = getClass().getResourceAsStream( script );
LPrototype p = LoadState.undump(state, is, script); LPrototype p = LoadState.undump(state, is, script);

View File

@@ -6,7 +6,7 @@ import java.io.OutputStream;
import junit.framework.TestCase; import junit.framework.TestCase;
import org.luaj.debug.DebugStackState; import org.luaj.debug.DebugLuaState;
import org.luaj.lib.MathLib; import org.luaj.lib.MathLib;
import org.luaj.lib.j2se.LuajavaLib; import org.luaj.lib.j2se.LuajavaLib;
@@ -112,7 +112,7 @@ public class LuaJTest extends TestCase {
private void runTest( String testName ) throws IOException, InterruptedException { private void runTest( String testName ) throws IOException, InterruptedException {
// new lua state // new lua state
LuaState state = new DebugStackState(); LuaState state = new DebugLuaState();
// add LuaJava bindings // add LuaJava bindings
LuajavaLib.install(state._G); LuajavaLib.install(state._G);

View File

@@ -13,7 +13,7 @@ import junit.framework.Test;
import junit.framework.TestCase; import junit.framework.TestCase;
import junit.framework.TestSuite; import junit.framework.TestSuite;
import org.luaj.debug.DebugStackState; import org.luaj.debug.DebugLuaState;
import org.luaj.lib.MathLib; import org.luaj.lib.MathLib;
public class StandardTest extends TestCase { public class StandardTest extends TestCase {
@@ -65,7 +65,7 @@ public class StandardTest extends TestCase {
} }
public void runTest() { public void runTest() {
LuaState state = new DebugStackState(); LuaState state = new DebugLuaState();
MathLib.install(state._G); MathLib.install(state._G);
// hack: it's unpleasant when the test cases fail to terminate; // hack: it's unpleasant when the test cases fail to terminate;
// unfortunately, there is a test in the standard suite that // unfortunately, there is a test in the standard suite that