Skip to content

Commit 5f36e09

Browse files
committed
better selective_eval! implementation
1 parent c689aab commit 5f36e09

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/codeedges.jl

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -843,13 +843,15 @@ Typically, assignment to a variable binding does not result in an ssa store by J
843843
"""
844844
function selective_eval!(@nospecialize(recurse), frame::Frame, isrequired::AbstractVector{Bool}, istoplevel::Bool=false)
845845
pc = pcexec = pclast = frame.pc
846-
while pc !== nothing && !isa(pc, BreakpointRef)
846+
while isa(pc, Int)
847847
frame.pc = pc
848848
te = isrequired[pc]
849-
pclast = pcexec
850-
pc = te ? step_expr!(recurse, frame, istoplevel) :
851-
next_or_nothing!(frame)
852-
pcexec = te ? pc : pcexec
849+
pclast = pcexec::Int
850+
if te
851+
pcexec = pc = step_expr!(recurse, frame, istoplevel)
852+
else
853+
pc = next_or_nothing!(frame)
854+
end
853855
end
854856
isa(pc, BreakpointRef) && return pc
855857
pcexec = (pcexec === nothing ? pclast : pcexec)::Int

0 commit comments

Comments
 (0)