From 28f0c59d44d6bac772cfe53d0969a415ae05ce61 Mon Sep 17 00:00:00 2001 From: Jishnu Bhattacharya Date: Thu, 20 Aug 2026 19:44:20 +0400 Subject: [PATCH] Make get_effects and get_exct shared generics Declare them alongside the other `CallInfo` accessor stubs in callsite.jl and import them in CthulhuCompiler.jl, so Cthulhu and CthulhuCompilerExt extend one generic function rather than defining two. Co-Authored-By: Claude Opus 5 (1M context) --- src/CthulhuCompiler.jl | 2 +- src/callsite.jl | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/CthulhuCompiler.jl b/src/CthulhuCompiler.jl index 2a19aaec..4ba46a97 100644 --- a/src/CthulhuCompiler.jl +++ b/src/CthulhuCompiler.jl @@ -1,6 +1,6 @@ Base.Experimental.@compiler_options compile=min optimize=1 -import .Cthulhu: AbstractProvider, get_abstract_interpreter, get_inference_world, find_method_instance, generate_code_instance, get_override, lookup, find_caller_of, get_inlining_costs, show_parameters, get_ci, get_rt, get_pc_remarks, get_pc_effects, get_pc_excts, show_callsite, show_callinfo, print_callsite_info, cthulhu_source, cthulhu_typed, cthulhu_ast, cthulhu_llvm, cthulhu_native, find_callsites, ir_to_src +import .Cthulhu: AbstractProvider, get_abstract_interpreter, get_inference_world, find_method_instance, generate_code_instance, get_override, lookup, find_caller_of, get_inlining_costs, show_parameters, get_ci, get_rt, get_pc_remarks, get_pc_effects, get_pc_excts, show_callsite, show_callinfo, print_callsite_info, get_effects, get_exct, cthulhu_source, cthulhu_typed, cthulhu_ast, cthulhu_llvm, cthulhu_native, find_callsites, ir_to_src using .Cthulhu: CthulhuState, CthulhuConfig, CallInfo, Callsite, cached_exception_type, get_mi using Base: isvarargtype, unwrapva, unwrap_unionall, mapany, get_world_counter diff --git a/src/callsite.jl b/src/callsite.jl index 3bb0da41..293ba383 100644 --- a/src/callsite.jl +++ b/src/callsite.jl @@ -8,6 +8,8 @@ end function find_callsites end function get_rt end +function get_effects end +function get_exct end get_ci(c::Callsite) = get_ci(c.info) get_mi(c::Callsite) = get_mi(get_ci(c))