@@ -325,32 +325,36 @@ function add_links!(target::Pair{Union{SSAValue,SlotNumber,GlobalRef},Links}, @n
325325 cl. namesuccs[stmt] = namestore = Links ()
326326 end
327327 push! (namestore, targetid)
328- elseif isa (stmt, Expr) && stmt. head != = :copyast && stmt. head != = :globaldecl
329- stmt = stmt:: Expr
330- arng = 1 : length (stmt. args)
331- if stmt. head === :call
332- f = stmt. args[1 ]
333- if ! @isssa (f) && ! @issslotnum (f)
334- # Avoid putting named callees on the namestore
335- arng = 2 : length (stmt. args)
336- end
337- end
338- for i in arng
339- add_links! (target, stmt. args[i], cl)
340- end
341- elseif isexpr (stmt, :globaldecl )
342- for i = 1 : length (stmt. args)
343- a = stmt. args[i]
344- if a isa GlobalRef
345- namestore = get (cl. namepreds, a, nothing )
346- if namestore === nothing
347- cl. namepreds[a] = namestore = Links ()
328+ elseif isa (stmt, Expr)
329+ if stmt. head === :globaldecl
330+ for i = 1 : length (stmt. args)
331+ a = stmt. args[i]
332+ if a isa GlobalRef
333+ namestore = get (cl. namepreds, a, nothing )
334+ if namestore === nothing
335+ cl. namepreds[a] = namestore = Links ()
336+ end
337+ push! (namestore, targetid)
338+ if targetid isa SSAValue
339+ push! (namestore, SSAValue (targetid. id+ 1 )) # +1 for :latestworld
340+ end
341+ else
342+ add_links! (target, a, cl)
348343 end
349- push! (namestore, targetid)
350- if targetid isa SSAValue
351- push! (namestore, SSAValue (targetid. id+ 1 )) # +1 for :latestworld
344+ end
345+ elseif stmt. head != = :copyast
346+ stmt = stmt:: Expr
347+ arng = 1 : length (stmt. args)
348+ if stmt. head === :call
349+ f = stmt. args[1 ]
350+ if ! @isssa (f) && ! @issslotnum (f)
351+ # Avoid putting named callees on the namestore
352+ arng = 2 : length (stmt. args)
352353 end
353354 end
355+ for i in arng
356+ add_links! (target, stmt. args[i], cl)
357+ end
354358 end
355359 elseif stmt isa Core. GotoIfNot
356360 add_links! (target, stmt. cond, cl)
0 commit comments