The Wayback Machine - https://web.archive.org/web/20220326213127/https://github.com/JuliaDebug/Debugger.jl/pull/89
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't run recursive interpretation unless there is a chance of breaking #89

Closed
wants to merge 1 commit into from

Conversation

KristofferC
Copy link
Member

@KristofferC KristofferC commented Mar 18, 2019

If someone is just stepping, we might as well use compiled mode like back in the days.

Does this makes sense to you @timholy?

@KristofferC KristofferC requested a review from timholy Mar 18, 2019
@codecov-io
Copy link

@codecov-io codecov-io commented Mar 18, 2019 •

Codecov Report

Merging #89 into master will increase coverage by 0.12%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #89      +/-   ##
==========================================
+ Coverage    83.2%   83.33%   +0.12%     
==========================================
  Files           7        7              
  Lines         399      402       +3     
==========================================
+ Hits          332      335       +3     
  Misses         67       67
Impacted Files Coverage Δ
src/Debugger.jl 80.95% <ø> (ø) ⬆️
src/commands.jl 77.27% <100%> (+0.8%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 369a05a...bf33a93. Read the comment docs.

@@ -37,10 +37,17 @@ function show_breakpoint(io::IO, bp::BreakpointRef)
println(io)
end

const always_run_recursive_interpret = Ref(false)
no_chance_of_breaking() = isempty(JuliaInterpreter._breakpoints) && !JuliaInterpreter.break_on_error[]
Copy link
Member

@pfitzseb pfitzseb Mar 18, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason not to use JuliaInterpreter.breakpoints() here?
Might also make sense to check if the breakpoints are actually enabled:

function no_chance_of_breaking()
  bps = JuliaInterpreter.breakpoints()
  !JuliaInterpreter.break_on_error[] && (isempty(bps) || all(bp -> !bp[].isactive, bps))
end
Copy link
Member Author

@KristofferC KristofferC Mar 18, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason not to use JuliaInterpreter.breakpoints() here?

It does a copy, which I don't really need. But of course, that copy doesnt matter and might as well use the official API.

Copy link
Member Author

@KristofferC KristofferC Mar 18, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might also make sense to check if the breakpoints are actually enabled:

Good idea.

Copy link
Member

@pfitzseb pfitzseb Mar 18, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍
Unrelated, but that's not the third or so function that lives in Juno and Debugger. Maybe we should think about moving those upstream (or into DebuggerUtils.jl :P).

Copy link
Member Author

@KristofferC KristofferC Mar 18, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, I think some code duplication is fine.

@timholy
Copy link
Member

@timholy timholy commented Mar 18, 2019

Shouldn't this logic be in JuliaInterpreter? That way Juno and Rebugger get it too.

@KristofferC
Copy link
Member Author

@KristofferC KristofferC commented Mar 18, 2019

Yeah, that is very true.

@KristofferC
Copy link
Member Author

@KristofferC KristofferC commented Mar 18, 2019

Will move.

@KristofferC KristofferC deleted the kc/compiled branch Apr 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants