@@ -165,7 +165,9 @@ function framecode_matches_breakpoint(framecode::FrameCode, bp::BreakpointFileLo
165
165
return false
166
166
end
167
167
else
168
- path, _ = whereis (framecode, 1 )
168
+ w = whereis (framecode, 1 )
169
+ w === nothing && return false
170
+ path, _ = w
169
171
path = CodeTracking. maybe_fix_path (path)
170
172
ispath (path) && (path = realpath (path))
171
173
@@ -186,7 +188,6 @@ function shouldbreak(frame::Frame, pc::Int)
186
188
end
187
189
188
190
function prepare_slotfunction (framecode:: FrameCode , body:: Union{Symbol,Expr} )
189
- ismeth = framecode. scope isa Method
190
191
uslotnames = Set {Symbol} ()
191
192
slotnames = Symbol[]
192
193
for name in framecode. src. slotnames
@@ -223,13 +224,14 @@ function prepare_slotfunction(framecode::FrameCode, body::Union{Symbol,Expr})
223
224
push! (assignments, :($ maxexsym = $ maxexpr))
224
225
push! (assignments, :($ slotname = $ maxexsym > 0 ? something ($ dataname. locals[$ maxexsym]) : $ default))
225
226
end
226
- if ismeth
227
- syms = sparam_syms (framecode. scope)
227
+ scope = framecode. scope
228
+ if isa (scope, Method)
229
+ syms = sparam_syms (scope)
228
230
for i = 1 : length (syms)
229
231
push! (assignments, Expr (:(= ), syms[i], :($ dataname. sparams[$ i])))
230
232
end
231
233
end
232
- funcname = ismeth ? gensym (" slotfunction" ) : gensym (Symbol (framecode . scope, " _slotfunction" ))
234
+ funcname = isa (scope, Method) ? gensym (" slotfunction" ) : gensym (Symbol (scope, " _slotfunction" ))
233
235
return Expr (:function , Expr (:call , funcname, framename), Expr (:block , assignments... , body))
234
236
end
235
237
0 commit comments