Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Compiler/src/abstractinterpretation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2215,7 +2215,7 @@ function abstract_call_unionall(interp::AbstractInterpreter, argtypes::Vector{An
return CallMeta(ret, Any, Effects(EFFECTS_TOTAL; nothrow), call.info)
end

function ci_abi(ci::CodeInstance)
function get_ci_abi(ci::CodeInstance)
def = ci.def
isa(def, ABIOverride) && return def.abi
(def::MethodInstance).specTypes
Expand All @@ -2238,7 +2238,7 @@ function abstract_invoke(interp::AbstractInterpreter, arginfo::ArgInfo, si::Stmt
if isa(method_or_ci, CodeInstance)
our_world = sv.world.this
argtype = argtypes_to_type(pushfirst!(argtype_tail(argtypes, 4), ft))
specsig = ci_abi(method_or_ci)
specsig = get_ci_abi(method_or_ci)
defdef = get_ci_mi(method_or_ci).def
exct = method_or_ci.exctype
if !hasintersect(argtype, specsig)
Expand Down
19 changes: 9 additions & 10 deletions Compiler/src/ssair/show.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ using .Compiler: ALWAYS_FALSE, ALWAYS_TRUE, argextype, BasicBlock, block_for_ins
CachedMethodTable, CFG, compute_basic_blocks, DebugInfoStream, Effects,
EMPTY_SPTYPES, getdebugidx, IncrementalCompact, InferenceResult, InferenceState,
InvalidIRError, IRCode, LimitedAccuracy, NativeInterpreter, scan_ssa_use!,
singleton_type, sptypes_from_meth_instance, StmtRange, Timings, VarState, widenconst
singleton_type, sptypes_from_meth_instance, StmtRange, Timings, VarState, widenconst,
get_ci_mi, get_ci_abi

@nospecialize

Expand Down Expand Up @@ -95,16 +96,14 @@ function print_stmt(io::IO, idx::Int, @nospecialize(stmt), code::Union{IRCode,Co
elseif isexpr(stmt, :invoke) && length(stmt.args) >= 2 && isa(stmt.args[1], Union{MethodInstance,CodeInstance})
stmt = stmt::Expr
# TODO: why is this here, and not in Base.show_unquoted
printstyled(io, " invoke "; color = :light_black)
mi = stmt.args[1]
if !(mi isa Core.MethodInstance)
mi = (mi::Core.CodeInstance).def
end
if isa(mi, Core.ABIOverride)
abi = mi.abi
mi = mi.def
ci = stmt.args[1]
if ci isa Core.CodeInstance
printstyled(io, " invoke "; color = :light_black)
mi = get_ci_mi(ci)
abi = get_ci_abi(ci)
else
abi = mi.specTypes
printstyled(io, "dynamic invoke "; color = :yellow)
abi = (ci::Core.MethodInstance).specTypes
end
show_unquoted(io, stmt.args[2], indent)
print(io, "(")
Expand Down