Skip to content

Commit

Permalink
file renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
softwareCobbler committed Feb 24, 2024
1 parent 9b8a3ac commit afaa14b
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package luceedebug;

public interface ICfEntityRef {
public interface ICfValueDebuggerBridge {
public long getID();
public int getNamedVariablesCount();
public int getIndexedVariablesCount();
Expand Down
2 changes: 1 addition & 1 deletion luceedebug/src/main/java/luceedebug/IDebugManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ public interface CfStepCallback {
*/
public String getSourcePathForVariablesRef(int variablesRef);

public Either<String, Either<ICfEntityRef, /*primitive value*/String>> evaluate(Long frameID, String expr);
public Either<String, Either<ICfValueDebuggerBridge, /*primitive value*/String>> evaluate(Long frameID, String expr);
public boolean evaluateAsBooleanForConditionalBreakpoint(Thread thread, String expr);
}
2 changes: 1 addition & 1 deletion luceedebug/src/main/java/luceedebug/ILuceeVm.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,5 @@ public static BreakpointsChangedEvent justChanges(IBreakpoint[] changes) {
*/
public String getSourcePathForVariablesRef(int variablesRef);

public Either<String, Either<ICfEntityRef, String>> evaluate(int frameID, String expr);
public Either<String, Either<ICfValueDebuggerBridge, String>> evaluate(int frameID, String expr);
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@

import luceedebug.*;

// CfValue
class CfEntityRef implements ICfEntityRef {
class CfValueDebuggerBridge implements ICfValueDebuggerBridge {
private final DebugFrame frame;
public final Object obj;
public final long id;

public CfEntityRef(DebugFrame frame, Object obj) {
public CfValueDebuggerBridge(DebugFrame frame, Object obj) {
this.frame = frame;
this.obj = obj;
this.id = frame.valTracker.idempotentRegisterObject(obj).id;
Expand Down
10 changes: 5 additions & 5 deletions luceedebug/src/main/java/luceedebug/coreinject/DebugFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import com.google.common.collect.MapMaker;

import luceedebug.*;
import luceedebug.coreinject.CfEntityRef.MarkerTrait;
import luceedebug.coreinject.CfValueDebuggerBridge.MarkerTrait;

public class DebugFrame implements IDebugFrame {
static private AtomicLong nextId = new AtomicLong(0);
Expand Down Expand Up @@ -52,7 +52,7 @@ public class DebugFrame implements IDebugFrame {

// lazy initialized on request for scopes
// This is "scopes, wrapped with trackable IDs, which are expensive to create and cleanup"
private LinkedHashMap<String, CfEntityRef> scopes_ = null;
private LinkedHashMap<String, CfValueDebuggerBridge> scopes_ = null;

// the results of evaluating complex expressions need to be kept alive for the entirety of the frame
// these should be made gc'able when this frame is collected
Expand Down Expand Up @@ -248,7 +248,7 @@ private void checkedPutScopeRef(String name, Map<?,?> scope) {
if (scope != null && !(scope instanceof LocalNotSupportedScope)) {
var v = new MarkerTrait.Scope(scope);
pin(v);
scopes_.put(name, new CfEntityRef(this, v));
scopes_.put(name, new CfValueDebuggerBridge(this, v));
}
}

Expand Down Expand Up @@ -320,8 +320,8 @@ public IDebugEntity[] getScopes() {
return result;
}

CfEntityRef trackEvalResult(Object obj) {
CfValueDebuggerBridge trackEvalResult(Object obj) {
pin(obj);
return new CfEntityRef(this, obj);
return new CfValueDebuggerBridge(this, obj);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ synchronized private String doDumpAsJSON(PageContext pageContext, Object someDum
return result.value;
}

public Either</*err*/String, /*ok*/Either<ICfEntityRef, String>> evaluate(Long frameID, String expr) {
public Either</*err*/String, /*ok*/Either<ICfValueDebuggerBridge, String>> evaluate(Long frameID, String expr) {
final var frame = frameByFrameID.get(frameID);
if (frame != null) {
return doEvaluate(frame, expr)
Expand Down Expand Up @@ -525,7 +525,7 @@ synchronized public IDebugEntity[] getVariables(long id, IDebugEntity.DebugEntit
if (ref == null) {
return new IDebugEntity[0];
}
return CfEntityRef.getAsDebugEntity(valTracker, ref.wrapped, maybeNull_which);
return CfValueDebuggerBridge.getAsDebugEntity(valTracker, ref.wrapped, maybeNull_which);
}

synchronized public IDebugFrame[] getCfStack(Thread thread) {
Expand Down Expand Up @@ -792,7 +792,7 @@ public String getSourcePathForVariablesRef(int variablesRef) {
else {
return ref.wrapped == null
? null
: CfEntityRef.getSourcePath(ref.wrapped);
: CfValueDebuggerBridge.getSourcePath(ref.wrapped);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1053,7 +1053,7 @@ public String getSourcePathForVariablesRef(int variablesRef) {
return GlobalIDebugManagerHolder.debugManager.getSourcePathForVariablesRef(variablesRef);
}

public Either<String, Either<ICfEntityRef, String>> evaluate(int frameID, String expr) {
public Either<String, Either<ICfValueDebuggerBridge, String>> evaluate(int frameID, String expr) {
return GlobalIDebugManagerHolder.debugManager.evaluate((Long)(long)frameID, expr);
}
}

0 comments on commit afaa14b

Please sign in to comment.