Compare commits
4 Commits
0.9.21-bet
...
0.9.25-bet
| Author | SHA1 | Date | |
|---|---|---|---|
|
fda33112a7
|
|||
|
67b2413d7c
|
|||
|
3a05416510
|
|||
|
c291328cc3
|
@@ -1,4 +1,4 @@
|
||||
project_group = me.topchetoeu
|
||||
project_name = jscript
|
||||
project_version = 0.9.12-beta
|
||||
project_version = 0.9.25-beta
|
||||
main_class = me.topchetoeu.jscript.utils.JScriptRepl
|
||||
|
||||
@@ -32,10 +32,17 @@ public class DebugContext {
|
||||
if (sources != null) {
|
||||
for (var source : sources.entrySet()) debugger.onSourceLoad(source.getKey(), source.getValue());
|
||||
}
|
||||
if (maps != null) {
|
||||
for (var map : maps.entrySet()) debugger.onFunctionLoad(map.getKey(), map.getValue());
|
||||
}
|
||||
|
||||
this.debugger = debugger;
|
||||
return true;
|
||||
}
|
||||
public boolean detachDebugger(DebugHandler debugger) {
|
||||
if (this.debugger != debugger) return false;
|
||||
return detachDebugger();
|
||||
}
|
||||
public boolean detachDebugger() {
|
||||
this.debugger = null;
|
||||
return true;
|
||||
|
||||
@@ -205,6 +205,7 @@ public class SimpleDebugger implements Debugger {
|
||||
|
||||
private ObjectValue emptyObject = new ObjectValue();
|
||||
|
||||
private WeakHashMap<DebugContext, DebugContext> contexts = new WeakHashMap<>();
|
||||
private WeakHashMap<FunctionBody, FunctionMap> mappings = new WeakHashMap<>();
|
||||
private WeakHashMap<FunctionBody, HashMap<Location, Breakpoint>> bpLocs = new WeakHashMap<>();
|
||||
|
||||
@@ -642,11 +643,10 @@ public class SimpleDebugger implements Debugger {
|
||||
execptionType = CatchType.NONE;
|
||||
state = State.RESUMED;
|
||||
|
||||
// idToBptCand.clear();
|
||||
mappings.clear();
|
||||
bpLocs.clear();
|
||||
|
||||
idToBreakpoint.clear();
|
||||
// locToBreakpoint.clear();
|
||||
// tmpBreakpts.clear();
|
||||
|
||||
filenameToId.clear();
|
||||
idToSource.clear();
|
||||
@@ -664,6 +664,9 @@ public class SimpleDebugger implements Debugger {
|
||||
stepOutFrame = currFrame = null;
|
||||
stepOutPtr = 0;
|
||||
|
||||
for (var ctx : contexts.keySet()) ctx.detachDebugger(this);
|
||||
contexts.clear();
|
||||
|
||||
updateNotifier.next();
|
||||
}
|
||||
|
||||
@@ -1041,6 +1044,7 @@ public class SimpleDebugger implements Debugger {
|
||||
|
||||
public SimpleDebugger attach(DebugContext ctx) {
|
||||
ctx.attachDebugger(this);
|
||||
contexts.put(ctx, ctx);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user