@@ -12,7 +12,8 @@ using .Compiler: ALWAYS_FALSE, ALWAYS_TRUE, argextype, BasicBlock, block_for_ins
1212 CachedMethodTable, CFG, compute_basic_blocks, DebugInfoStream, Effects,
1313 EMPTY_SPTYPES, getdebugidx, IncrementalCompact, InferenceResult, InferenceState,
1414 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
1617
1718@nospecialize
1819
@@ -95,16 +96,14 @@ function print_stmt(io::IO, idx::Int, @nospecialize(stmt), code::Union{IRCode,Co
9596 elseif isexpr (stmt, :invoke ) && length (stmt. args) >= 2 && isa (stmt. args[1 ], Union{MethodInstance,CodeInstance})
9697 stmt = stmt:: Expr
9798 # 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)
106104 else
107- abi = mi. specTypes
105+ printstyled (io, " dynamic invoke " ; color = :yellow )
106+ abi = (ci:: Core.MethodInstance ). specTypes
108107 end
109108 show_unquoted (io, stmt. args[2 ], indent)
110109 print (io, " (" )
0 commit comments