@@ -112,19 +112,20 @@ function print_with_code(preprint, postprint, io::IO, src::CodeInfo)
112112 for stmt in src. code
113113 Core. Compiler. scan_ssa_use! (push!, used, stmt)
114114 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
120121 end
121122 line_info_preprinter = Base. IRShow. lineinfo_disabled
122123 line_info_postprinter = Base. IRShow. default_expr_type_printer
123124 preprint (io)
124125 bb_idx_prev = bb_idx = 1
125126 for idx = 1 : length (src. code)
126127 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 )
128129 bb_idx = Base. IRShow. show_ir_stmt (io, src, idx, line_info_preprinter, line_info_postprinter, sptypes, used, cfg, bb_idx)
129130 else
130131 bb_idx = Base. IRShow. show_ir_stmt (io, src, idx, line_info_preprinter, line_info_postprinter, used, cfg, bb_idx)
0 commit comments