We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
targetstore
1 parent a18c744 commit c3b209dCopy full SHA for c3b209d
src/codeedges.jl
@@ -255,10 +255,7 @@ function direct_links!(cl::CodeLinks, src::CodeInfo)
255
cl.nameassigns[name] = assign = Int[]
256
end
257
push!(assign, i)
258
- targetstore = get(cl.namepreds, name, nothing)
259
- if targetstore === nothing
260
- cl.namepreds[name] = targetstore = Links()
261
- end
+ targetstore = get!(Links, cl.namepreds, name)
262
target = P(name, targetstore)
263
add_links!(target, stmt, cl)
264
elseif name in (nothing, false)
@@ -281,10 +278,7 @@ function direct_links!(cl::CodeLinks, src::CodeInfo)
281
278
if isa(lhs, Symbol)
282
279
lhs = GlobalRef(cl.thismod, lhs)
283
280
284
- targetstore = get(cl.namepreds, lhs, nothing)
285
286
- cl.namepreds[lhs] = targetstore = Links()
287
+ targetstore = get!(Links, cl.namepreds, lhs)
288
target = P(lhs, targetstore)
289
assign = get(cl.nameassigns, lhs, nothing)
290
if assign === nothing
0 commit comments