@@ -112,19 +112,20 @@ function print_with_code(preprint, postprint, io::IO, src::CodeInfo)
112
112
for stmt in src. code
113
113
Core. Compiler. scan_ssa_use! (push!, used, stmt)
114
114
end
115
- @static if VERSION > v " 1.11" && __has_internal_change (v " 1.12-alpha" , :printcodeinfocalls )
116
- parent = src. parent
117
- sptypes = if parent isa MethodInstance
118
- Core. Compiler. sptypes_from_meth_instance (parent)
119
- else Core. Compiler. EMPTY_SPTYPES end
115
+ @static if isdefined (Base, :__has_internal_change ) && Base. __has_internal_change (v " 1.12-alpha" , :printcodeinfocalls )
116
+ sptypes = let parent = src. parent
117
+ parent isa MethodInstance ?
118
+ Core. Compiler. sptypes_from_meth_instance (parent) :
119
+ Core. Compiler. EMPTY_SPTYPESd
120
+ end
120
121
end
121
122
line_info_preprinter = Base. IRShow. lineinfo_disabled
122
123
line_info_postprinter = Base. IRShow. default_expr_type_printer
123
124
preprint (io)
124
125
bb_idx_prev = bb_idx = 1
125
126
for idx = 1 : length (src. code)
126
127
preprint (io, idx)
127
- @static if VERSION > v " 1.11 " && __has_internal_change (v " 1.12-alpha" , :printcodeinfocalls )
128
+ @static if isdefined (Base, :__has_internal_change ) && Base . __has_internal_change (v " 1.12-alpha" , :printcodeinfocalls )
128
129
bb_idx = Base. IRShow. show_ir_stmt (io, src, idx, line_info_preprinter, line_info_postprinter, sptypes, used, cfg, bb_idx)
129
130
else
130
131
bb_idx = Base. IRShow. show_ir_stmt (io, src, idx, line_info_preprinter, line_info_postprinter, used, cfg, bb_idx)
0 commit comments