public ModuleEntity module(int depth) { CallStackItem stackItem = peekCall(depth); if (stackItem != null) { return env.getModuleManager().findModule(stackItem.trace); } return null; }
public ModuleEntity findModule(TraceInfo traceInfo) { if (traceInfo == null || traceInfo == TraceInfo.UNKNOWN) { return null; } return findModule(traceInfo.getFileName()); }
public DebugTick(Breakpoint breakpoint, Environment environment, TraceInfo trace, ArrayMemory locals) { this.breakpoint = breakpoint; this.environment = environment; this.trace = trace; this.locals = locals; this.callStack = environment == null ? null : environment.getCallStack().getSnapshotAsCallStack(); }
public CallStackItem pushCallEx(TraceInfo trace, IObject self, Memory[] args, String function, ClassEntity clazz, String staticClazz) { CallStackItem stackItem = new CallStackItem(trace, self, args, function, clazz.getName(), staticClazz); stackItem.classEntity = clazz; return getCallStack().push(stackItem); }
public ModuleEntity loadFrom(String file) throws Throwable { return environment.getModuleManager().fetchModule(file); }
protected ModuleEntity fetchClass(Environment env, String fileName, boolean compiled) throws Throwable { return env.getModuleManager().fetchTemporaryModule("res://" + fileName, compiled); } }
public AbstractCompiler(Environment environment, Context context){ this.context = context; this.scope = environment.getScope(); this.environment = environment; }
public void pushCall(CallStackItem stackItem) { getCallStack().push(stackItem); }
public CallStackItem peekCall(int depth) { return getCallStack().peekCall(depth); }
public TraceInfo trace() { return getCallStack().trace(); }
@Override public void setUserValue(String name, Object value) { synchronized (this) { super.setUserValue(name, value); } }
@Override public void registerModule(ModuleEntity module) { synchronized (this) { super.registerModule(module, true); } }
@Override public void echo(Memory value) { synchronized (this) { super.echo(value); } }
@Override public void uncaughtException(Thread t, Throwable e) { Environment.catchThrowable(e, env); } });
@Override public Memory setConfigValue(String name, Memory value) { synchronized (this) { return super.setConfigValue(name, value); } }
public Memory __include(final String fileName, ArrayMemory locals, final TraceInfo trace) throws Throwable { return __import(fileName, locals, trace, "include", false, new Callback<Void, Void>() { @Override public Void call(Void param) { warning(trace, Messages.ERR_INCLUDE_FAILED, "include", fileName); return null; } }); }
public ModuleEntity module() { if (callStackTop <= 0) { return null; } return env.getModuleManager().findModule(peekCall(0).trace); }
public CallStackItem pushCallEx(TraceInfo trace, IObject self, Memory[] args, String function, ClassEntity clazz, ClassEntity staticClazz) { CallStackItem stackItem = new CallStackItem(trace, self, args, function, clazz.getName(), staticClazz.getName()); stackItem.classEntity = clazz; stackItem.staticClassEntity = staticClazz; return getCallStack().push(stackItem); }
public CallStackItem pushCall(TraceInfo trace, IObject self, Memory[] args, String function, String clazz, String staticClazz) { return getCallStack().push(trace, self, args, function, clazz, staticClazz); }
public CallStackItem pushCall(IObject self, String method, Memory... args) { return getCallStack().push(self, method, args); }