Skip to content

Commit b7b389b

Browse files
authored
Revert "Use compiled mode when there is no chance we will encounter a breakpoint (#180)" (#185)
This reverts commit 1a77218.
1 parent 1a77218 commit b7b389b

File tree

2 files changed

+0
-32
lines changed

2 files changed

+0
-32
lines changed

src/commands.jl

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -298,19 +298,6 @@ function unwind_exception(frame::Frame, exc)
298298
rethrow(exc)
299299
end
300300

301-
const always_run_recursive_interpret = Ref(false)
302-
function any_active_breakpoint()
303-
for bp in _breakpoints
304-
if bp.isactive && bp.condition !== always_false
305-
return true
306-
end
307-
end
308-
return break_on_error[]
309-
end
310-
function run_in_compiled()
311-
return !any_active_breakpoint() && !always_run_recursive_interpret[]
312-
end
313-
314301
"""
315302
ret = debug_command(recurse, frame, cmd, rootistoplevel=false)
316303
ret = debug_command(frame, cmd, rootistoplevel=false)
@@ -332,7 +319,6 @@ or one of the 'advanced' commands
332319
`rootistoplevel` and `ret` are as described for [`JuliaInterpreter.maybe_reset_frame!`](@ref).
333320
"""
334321
function debug_command(@nospecialize(recurse), frame::Frame, cmd::Symbol, rootistoplevel::Bool=false)
335-
recurse = run_in_compiled() ? Compiled() : recurse
336322
istoplevel = rootistoplevel && frame.caller === nothing
337323
cmd0 = cmd
338324
if cmd == :si

test/debug.jl

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ using JuliaInterpreter, Test
22
using JuliaInterpreter: enter_call, enter_call_expr, get_return, @lookup
33
using Base.Meta: isexpr
44

5-
# We want to test recursive interpretation
6-
JuliaInterpreter.always_run_recursive_interpret[] = true
7-
@test !JuliaInterpreter.run_in_compiled()
8-
95
const ALL_COMMANDS = (:n, :s, :c, :finish, :nc, :se, :si)
106

117
function step_through_command(fr::Frame, cmd::Symbol)
@@ -354,18 +350,4 @@ struct B{T} end
354350
@test debug_command(frame, :c) === nothing
355351
@test get_return(frame) == sum(a)
356352
end
357-
358-
@testset "compiled mode when no breakpoints" begin
359-
try
360-
JuliaInterpreter.always_run_recursive_interpret[] = false
361-
remove()
362-
@test JuliaInterpreter.run_in_compiled()
363-
fr = JuliaInterpreter.enter_call(sin, 2.0)
364-
JuliaInterpreter.debug_command(fr, :c)
365-
@test get_return(fr) == sin(2.0)
366-
finally
367-
JuliaInterpreter.always_run_recursive_interpret[] = true
368-
end
369-
end
370-
371353
# end

0 commit comments

Comments
 (0)