You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/codeedges.jl
+43-20Lines changed: 43 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -369,8 +369,9 @@ struct CodeEdges
369
369
preds::Vector{Vector{Int}}
370
370
succs::Vector{Vector{Int}}
371
371
byname::Dict{GlobalRef,Variable}
372
+
slotassigns::Vector{Vector{Int}}
372
373
end
373
-
CodeEdges(n::Integer) =CodeEdges([Int[] for i =1:n], [Int[] for i =1:n], Dict{GlobalRef,Variable}())
374
+
CodeEdges(nstmts::Integer, nslots::Integer) =CodeEdges([Int[] for i =1:nstmts], [Int[] for i =1:nstmts], Dict{GlobalRef,Variable}(), [Int[] for i =1:nslots])
374
375
375
376
function Base.show(io::IO, edges::CodeEdges)
376
377
println(io, "CodeEdges:")
@@ -389,7 +390,7 @@ end
389
390
390
391
391
392
"""
392
-
edges = CodeEdges(src::CodeInfo)
393
+
edges = CodeEdges(mod::Module, src::CodeInfo)
393
394
394
395
Analyze `src` and determine the chain of dependencies.
395
396
@@ -410,7 +411,10 @@ function CodeEdges(src::CodeInfo, cl::CodeLinks)
410
411
# Replace/add named intermediates (slot & named-variable references) with statement numbers
0 commit comments