Skip to content

Commit

Permalink
minor Core.Compiler code quality improvements (#50569)
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk authored Jul 18, 2023
1 parent 34ba62f commit 7b40a36
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion base/compiler/abstractinterpretation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2053,7 +2053,7 @@ function abstract_call_known(interp::AbstractInterpreter, @nospecialize(f),
end

function abstract_call_opaque_closure(interp::AbstractInterpreter,
closure::PartialOpaque, arginfo::ArgInfo, si::StmtInfo, sv::InferenceState, check::Bool=true)
closure::PartialOpaque, arginfo::ArgInfo, si::StmtInfo, sv::AbsIntState, check::Bool=true)
sig = argtypes_to_type(arginfo.argtypes)
result = abstract_call_method(interp, closure.source::Method, sig, Core.svec(), false, si, sv)
(; rt, edge, effects) = result
Expand Down
5 changes: 3 additions & 2 deletions base/compiler/inferencestate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -768,9 +768,10 @@ end
iterate(unw::AbsIntStackUnwind) = (unw.sv, (unw.sv, 0))
function iterate(unw::AbsIntStackUnwind, (sv, cyclei)::Tuple{AbsIntState, Int})
# iterate through the cycle before walking to the parent
if cyclei < length(callers_in_cycle(sv))
callers = callers_in_cycle(sv)
if callers !== () && cyclei < length(callers)
cyclei += 1
parent = callers_in_cycle(sv)[cyclei]
parent = callers[cyclei]
else
cyclei = 0
parent = frame_parent(sv)
Expand Down

0 comments on commit 7b40a36

Please sign in to comment.