Skip to content

Commit 7bab5d5

Browse files
committed
compiler: NFC changes
1 parent 4965950 commit 7bab5d5

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

base/compiler/abstractinterpretation.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -496,13 +496,13 @@ function abstract_call_method(interp::AbstractInterpreter, method::Method, @nosp
496496
add_remark!(interp, sv, "Refusing to infer into `depwarn`")
497497
return MethodCallResult(Any, false, false, nothing, Effects())
498498
end
499-
topmost = nothing
499+
500500
# Limit argument type tuple growth of functions:
501501
# look through the parents list to see if there's a call to the same method
502502
# and from the same method.
503503
# Returns the topmost occurrence of that repeated edge.
504-
edgecycle = false
505-
edgelimited = false
504+
edgecycle = edgelimited = false
505+
topmost = nothing
506506

507507
for infstate in InfStackUnwind(sv)
508508
if method === infstate.linfo.def

base/compiler/ssair/passes.jl

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -916,14 +916,11 @@ function sroa_pass!(ir::IRCode, inlining::Union{Nothing, InliningState} = nothin
916916
visited_phinodes, field, lifting_cache, result_t, lifted_leaves, val, lazydomtree)
917917

918918
# Insert the undef check if necessary
919-
if any_undef
920-
if val === nothing
921-
insert_node!(compact, SSAValue(idx),
922-
non_effect_free(NewInstruction(Expr(:throw_undef_if_not, Symbol("##getfield##"), false), Nothing)))
923-
else
924-
# val must be defined
925-
end
919+
if any_undef && val === nothing
920+
insert_node!(compact, SSAValue(idx), non_effect_free(NewInstruction(
921+
Expr(:throw_undef_if_not, Symbol("##getfield##"), false), Nothing)))
926922
else
923+
# val must be defined
927924
@assert val !== nothing
928925
end
929926

base/show.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,8 +1192,8 @@ function print_fullname(io::IO, m::Module)
11921192
end
11931193
end
11941194

1195-
function sourceinfo_slotnames(src::CodeInfo)
1196-
slotnames = src.slotnames
1195+
sourceinfo_slotnames(src::CodeInfo) = sourceinfo_slotnames(src.slotnames)
1196+
function sourceinfo_slotnames(slotnames::Vector{Symbol})
11971197
names = Dict{String,Int}()
11981198
printnames = Vector{String}(undef, length(slotnames))
11991199
for i in eachindex(slotnames)

0 commit comments

Comments
 (0)