Repository navigation
Step into the lowered frame of a top-level statement with :s - #784
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #784 +/- ##
==========================================
+ Coverage 90.74% 90.83% +0.08%
==========================================
Files 12 12
Lines 3513 3535 +22
==========================================
+ Hits 3188 3211 +23
+ Misses 325 324 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
`:s` on a statement of a top-level driver frame, as created by `Frame(mod, ex)` for a `:toplevel` or `:module` expression, entered the callee of the surface call expression directly. Since the surface expression is not lowered, this failed when the call's arguments contained calls (e.g. `f(g(1))` threw "unknown call f introduced by ccall lowering g"), and it skipped the rest of the statement, such as the assignment of `x = f(1)`. Such frames come only from `Frame(mod, ex)` called at the root, which debugging sessions rarely do, but #783 interprets the code passed to `Core.eval` in such frames, so `:s` inside `@eval`ed or `include`d code takes this path too. The two changes are independent of each other, but stepping into evaluated code with `:s` needs both. Now `:s` enters the lowered frame of the statement like a callee, before any of the statement's side effects, and stops at its first call. As when stepping into a method, it steps through the statements before that call: global declarations, which are builtin calls on some Julia versions (`Core.set_binding_type!` for typed globals on 1.10-1.11, and `Core.declare_global` on 1.13+), `:latestworld`, and global loads. The handling of method frames is factored out together into `maybe_step_through_prelude!`. `:si` stops at the entry of the lowered frame. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
aviatesk
force-pushed
the
avi/surface-step
branch
from
October 3, 2026 12:08
cad9e23 to
e392cf1
Compare
Merged
aviatesk
referenced
this pull request
Oct 3, 2026
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
:son a statement of a top-level driver frame, as created byFrame(mod, ex)for a:toplevelor:moduleexpression, entered the callee of the surface call expression directly. Since the surface expression is not lowered, this failed when the call's arguments contained calls (e.g.f(g(1))threw "unknown call f introduced by ccall lowering g"), and it skipped the rest of the statement, such as the assignment ofx = f(1).Such frames come only from
Frame(mod, ex)called at the root, which debugging sessions rarely do, but #783 interprets the code passed toCore.evalin such frames, so:sinside@evaled orincluded code takes this path too. The two changes are independent of each other, but stepping into evaluated code with:sneeds both.Now
:senters the lowered frame of the statement like a callee, before any of the statement's side effects, and stops at its first call. As when stepping into a method, it steps through the statements before that call: global declarations, which are builtin calls on some Julia versions (Core.set_binding_type!for typed globals on 1.10-1.11, andCore.declare_globalon 1.13+),:latestworld, and global loads. The handling of method frames is factored out together intomaybe_step_through_prelude!.:sistops at the entry of the lowered frame.