module debugger
intrude import naive_interpreter
-import nitx
intrude import semantize::local_var_init
intrude import semantize::scope
intrude import toolcontext
# Auto continues the execution until the end or until an error is encountered
var autocontinue = false
- redef type FRAME: Frame
+ redef type FRAME: InterpreterFrame
#######################################################################
## Execution of statement function ##
else if command == "help" then
help
return true
- # Opens a new NitIndex prompt on current model
- else if command == "nitx" then
- new NitIndex.with_infos(modelbuilder, self.mainmodule).prompt
- return true
else if command == "bt" or command == "backtrack" then
print stack_trace
return true
# Not supposed to be used by anyone else than the Debugger.
private fun rt_call(v: Debugger, mpropdef: MMethodDef, args: Array[Instance]): nullable Instance
do
- var f = new Frame(self, self.mpropdef.as(not null), args)
+ var f = new InterpreterFrame(self, self.mpropdef.as(not null), args)
var curr_instances = v.frame.map
for i in curr_instances.keys do
f.map[i] = curr_instances[i]
curr_instances[i] = currFra.map[i]
end
end
- if v.returnmark == f then
- v.returnmark = null
+ if v.is_escape(self.return_mark) then
var res = v.escapevalue
- v.escapevalue = null
return res
end
return null