@@ -310,19 +310,19 @@ function firstline(ex::Expr)
310
310
end
311
311
312
312
"""
313
- loc = whereis(frame, pc=frame.pc)
313
+ loc = whereis(frame, pc::Int =frame.pc)
314
314
315
315
Return the file and line number for `frame` at `pc`. If this cannot be
316
316
determined, `loc == nothing`. Otherwise `loc == (filepath, line)`.
317
317
"""
318
- function CodeTracking. whereis (framecode:: FrameCode , pc)
318
+ function CodeTracking. whereis (framecode:: FrameCode , pc:: Int )
319
319
codeloc = codelocation (framecode. src, pc)
320
320
codeloc == 0 && return nothing
321
321
lineinfo = linetable (framecode, codeloc)
322
322
return isa (framecode. scope, Method) ?
323
323
whereis (lineinfo, framecode. scope) : (getfile (lineinfo), getline (lineinfo))
324
324
end
325
- CodeTracking. whereis (frame:: Frame , pc= frame. pc) = whereis (frame. framecode, pc)
325
+ CodeTracking. whereis (frame:: Frame , pc:: Int = frame. pc) = whereis (frame. framecode, pc)
326
326
327
327
"""
328
328
line = linenumber(framecode, pc)
@@ -345,7 +345,7 @@ function getfile(framecode::FrameCode, pc)
345
345
end
346
346
getfile (frame:: Frame , pc= frame. pc) = getfile (frame. framecode, pc)
347
347
348
- function codelocation (code:: CodeInfo , idx)
348
+ function codelocation (code:: CodeInfo , idx:: Int )
349
349
codeloc = codelocs (code)[idx]
350
350
while codeloc == 0 && (code. code[idx] === nothing || isexpr (code. code[idx], :meta )) && idx < length (code. code)
351
351
idx += 1
0 commit comments