Skip to content

Commit b871d70

Browse files
committed
update to JuliaInterpreter 0.10
1 parent 3ee6fe6 commit b871d70

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
1515
CodeTracking = "0.5.7, 1"
1616
Crayons = "4.1"
1717
Highlights = "0.4.3, 0.5"
18-
JuliaInterpreter = "0.9.46"
18+
JuliaInterpreter = "0.10"
1919
julia = "1.6"
2020

2121
[extras]

src/Debugger.jl

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ using REPL.REPLCompletions
1212

1313
using CodeTracking
1414
using JuliaInterpreter: JuliaInterpreter, Frame, lookup, FrameCode, BreakpointRef, debug_command, leaf, root, BreakpointState,
15-
finish_and_return!, Compiled
15+
finish_and_return!, Interpreter, NonRecursiveInterpreter, RecursiveInterpreter
1616

1717
using JuliaInterpreter: pc_expr, moduleof, linenumber, extract_args, locals,
1818
root, caller, whereis, get_return, nstatements, getargs
@@ -43,7 +43,7 @@ Base.@kwdef mutable struct DebuggerState
4343
broke_on_error::Bool = false
4444
watch_list::Vector = WATCH_LIST
4545
lowered_status::Bool = false
46-
mode = finish_and_return!
46+
interp::Interpreter = RecursiveInterpreter()
4747
repl = nothing
4848
terminal = nothing
4949
main_mode = nothing
@@ -53,7 +53,7 @@ Base.@kwdef mutable struct DebuggerState
5353
end
5454

5555
function toggle_mode(state)
56-
state.mode = (state.mode === finish_and_return! ? (state.mode = Compiled()) : (state.mode = finish_and_return!))
56+
state.interp = (state.interp === RecursiveInterpreter() ? (state.interp = NonRecursiveInterpreter()) : (state.interp = RecursiveInterpreter()))
5757
end
5858

5959
toggle_lowered(state) = state.lowered_status = !state.lowered_status

src/commands.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function execute_command(state::DebuggerState, v::Union{Val{:c},Val{:nc},Val{:n}
4343
assert_allow_step(state) || return false
4444
cmd == "so" && (cmd = "finish")
4545
cmd == "u" && (cmd = "until")
46-
ret = debug_command(state.mode, state.frame, Symbol(cmd); kwargs...)
46+
ret = debug_command(state.interp, state.frame, Symbol(cmd); kwargs...)
4747
if ret === nothing
4848
state.overall_result = get_return(root(state.frame))
4949
state.frame = nothing

src/repl.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function RunDebugger(frame, repl = nothing, terminal = nothing; initial_continue
2929
normal_prefix = Sys.iswindows() ? "\e[33m" : "\e[38;5;166m"
3030
compiled_prefix = "\e[96m"
3131
panel = LineEdit.Prompt(promptname(state.level, "debug");
32-
prompt_prefix = () -> state.mode == Compiled() ? compiled_prefix : normal_prefix,
32+
prompt_prefix = () -> state.interp == NonRecursiveInterpreter() ? compiled_prefix : normal_prefix,
3333
prompt_suffix = Base.text_colors[:normal],
3434
on_enter = s->true)
3535

test/misc.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using Debugger: _iscall
44
using JuliaInterpreter
55
using JuliaInterpreter: pc_expr, evaluate_call!, finish_and_return!, enter_call_expr
6-
runframe(frame::Frame, pc=frame.pc[]) = Some{Any}(finish_and_return!(Compiled(), frame))
6+
runframe(frame::Frame, pc=frame.pc[]) = Some{Any}(finish_and_return!(NonRecursiveInterpreter(), frame))
77

88
frame = @make_frame map(x->2x, 1:10)
99
state = dummy_state(frame)

0 commit comments

Comments
 (0)