@@ -12,7 +12,8 @@ using .Compiler: ALWAYS_FALSE, ALWAYS_TRUE, argextype, BasicBlock, block_for_ins
12
12
CachedMethodTable, CFG, compute_basic_blocks, DebugInfoStream, Effects,
13
13
EMPTY_SPTYPES, getdebugidx, IncrementalCompact, InferenceResult, InferenceState,
14
14
InvalidIRError, IRCode, LimitedAccuracy, NativeInterpreter, scan_ssa_use!,
15
- singleton_type, sptypes_from_meth_instance, StmtRange, Timings, VarState, widenconst
15
+ singleton_type, sptypes_from_meth_instance, StmtRange, Timings, VarState, widenconst,
16
+ get_ci_mi, get_ci_abi
16
17
17
18
@nospecialize
18
19
@@ -95,16 +96,14 @@ function print_stmt(io::IO, idx::Int, @nospecialize(stmt), code::Union{IRCode,Co
95
96
elseif isexpr (stmt, :invoke ) && length (stmt. args) >= 2 && isa (stmt. args[1 ], Union{MethodInstance,CodeInstance})
96
97
stmt = stmt:: Expr
97
98
# TODO : why is this here, and not in Base.show_unquoted
98
- printstyled (io, " invoke " ; color = :light_black )
99
- mi = stmt. args[1 ]
100
- if ! (mi isa Core. MethodInstance)
101
- mi = (mi:: Core.CodeInstance ). def
102
- end
103
- if isa (mi, Core. ABIOverride)
104
- abi = mi. abi
105
- mi = mi. def
99
+ ci = stmt. args[1 ]
100
+ if ci isa Core. CodeInstance
101
+ printstyled (io, " invoke " ; color = :light_black )
102
+ mi = get_ci_mi (ci)
103
+ abi = get_ci_abi (ci)
106
104
else
107
- abi = mi. specTypes
105
+ printstyled (io, " dynamic invoke " ; color = :yellow )
106
+ abi = (ci:: Core.MethodInstance ). specTypes
108
107
end
109
108
show_unquoted (io, stmt. args[2 ], indent)
110
109
print (io, " (" )
0 commit comments