Repository: JuliaDebug/Cthulhu.jl
Pull request #630 (2025-03-26 13:12:23)

Remove outdated version checks
As we are removing support for Julia versions < 1.12 starting from the 2.17 release, we can remove all version checks that may be optimized away assuming `VERSION >= v"1.12-"`.


codecov-commenter: ## [Codecov](https://app.codecov.io/gh/JuliaDebug/Cthulhu.jl/pull/630?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDebug) Report
Attention: Patch coverage is `0%` with `37 lines` in your changes missing coverage. Please review.
> Please [upload](https://docs.codecov.com/docs/codecov-uploader) report for BASE (`2.17@53a2b6d`). [Learn more](https://docs.codecov.io/docs/error-reference?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDebug#section-missing-base-commit) about missing BASE report.

| [Files with missing lines](https://app.codecov.io/gh/JuliaDebug/Cthulhu.jl/pull/630?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDebug) | Patch % | Lines |
|---|---|---|
| [src/codeview.jl](https://app.codecov.io/gh/JuliaDebug/Cthulhu.jl/pull/630?src=pr&el=tree&filepath=src%2Fcodeview.jl&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDebug#diff-c3JjL2NvZGV2aWV3Lmps) | 0.00% | [18 Missing :warning: ](https://app.codecov.io/gh/JuliaDebug/Cthulhu.jl/pull/630?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDebug) |
| [src/interpreter.jl](https://app.codecov.io/gh/JuliaDebug/Cthulhu.jl/pull/630?src=pr&el=tree&filepath=src%2Finterpreter.jl&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDebug#diff-c3JjL2ludGVycHJldGVyLmps) | 0.00% | [8 Missing :warning: ](https://app.codecov.io/gh/JuliaDebug/Cthulhu.jl/pull/630?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDebug) |
| [src/CthulhuBase.jl](https://app.codecov.io/gh/JuliaDebug/Cthulhu.jl/pull/630?src=pr&el=tree&filepath=src%2FCthulhuBase.jl&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDebug#diff-c3JjL0N0aHVsaHVCYXNlLmps) | 0.00% | [5 Missing :warning: ](https://app.codecov.io/gh/JuliaDebug/Cthulhu.jl/pull/630?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDebug) |
| [src/reflection.jl](https://app.codecov.io/gh/JuliaDebug/Cthulhu.jl/pull/630?src=pr&el=tree&filepath=src%2Freflection.jl&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDebug#diff-c3JjL3JlZmxlY3Rpb24uamw=) | 0.00% | [4 Missing :warning: ](https://app.codecov.io/gh/JuliaDebug/Cthulhu.jl/pull/630?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDebug) |
| [ext/CthulhuCompilerExt.jl](https://app.codecov.io/gh/JuliaDebug/Cthulhu.jl/pull/630?src=pr&el=tree&filepath=ext%2FCthulhuCompilerExt.jl&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDebug#diff-ZXh0L0N0aHVsaHVDb21waWxlckV4dC5qbA==) | 0.00% | [2 Missing :warning: ](https://app.codecov.io/gh/JuliaDebug/Cthulhu.jl/pull/630?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDebug) |

<details><summary>Additional details and impacted files</summary>


```diff
@@          Coverage Diff           @@
##             2.17    #630   +/-   ##
======================================
  Coverage        ?   0.00%           
======================================
  Files           ?      11           
  Lines           ?    1535           
  Branches        ?       0           
======================================
  Hits            ?       0           
  Misses          ?    1535           
  Partials        ?       0           
```

</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/JuliaDebug/Cthulhu.jl/pull/630?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDebug).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDebug).

<details><summary> :rocket: New features to boost your workflow: </summary>

- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
</details>
serenity4: Looking at the warnings, I suspect the IntegrationTest job may be failing because JET does not yet support 1.12. As the update shouldn't be too far out, I think we can keep it just to make sure the error remains the same (and is not triggered by a failed precompilation of CthulhuExt for example).

Patch:
diff --git a/.github/workflows/TypedSyntaxCI.yml b/.github/workflows/TypedSyntaxCI.yml
index 28c5627..a1f895c 100644
--- a/.github/workflows/TypedSyntaxCI.yml
+++ b/.github/workflows/TypedSyntaxCI.yml
@@ -13,9 +13,9 @@ jobs:
       fail-fast: false
       matrix:
         version:
-          - '1'
-          - '1.10.0'
-          - '1.11-nightly'
+          # - '1'
+          # - '1.12.0'
+          - '1.12-nightly'
           - 'nightly'
         os:
           - ubuntu-latest
diff --git a/TypedSyntax/Project.toml b/TypedSyntax/Project.toml
index 812fa7e..b31c50a 100644
--- a/TypedSyntax/Project.toml
+++ b/TypedSyntax/Project.toml
@@ -10,7 +10,7 @@ JuliaSyntax = "70703baa-626e-46a2-a12c-08ffd08c73b4"
 [compat]
 CodeTracking = "1.3"
 JuliaSyntax = "0.4"
-julia = "1.10.0"
+julia = "1.12"
 
 [extras]
 Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
diff --git a/TypedSyntax/src/node.jl b/TypedSyntax/src/node.jl
index 76fbe6b..14e9712 100644
--- a/TypedSyntax/src/node.jl
+++ b/TypedSyntax/src/node.jl
@@ -12,11 +12,7 @@ TypedSyntaxData(sd::SyntaxData, src::CodeInfo, typ=nothing) = TypedSyntaxData(sd
 const TypedSyntaxNode = JuliaSyntax.TreeNode{TypedSyntaxData}
 const MaybeTypedSyntaxNode = Union{SyntaxNode,TypedSyntaxNode}
 
-@static if VERSION ≥ v"1.11.0-DEV.337"
-    const SlotType = Core.SlotNumber
-else
-    const SlotType = Union{Core.SlotNumber, Core.Compiler.TypedSlot}
-end
+const SlotType = Core.SlotNumber
 
 struct NoDefaultValue end
 const no_default_value = NoDefaultValue()
@@ -313,21 +309,7 @@ function sparam_name(mi::MethodInstance, i::Int)
     return sig.var.name
 end
 
-@static if isdefined(Base, :method_instances)
 using Base: method_instances
-else
-function method_instances(@nospecialize(f), @nospecialize(t), world::UInt)
-    tt = Base.signature_type(f, t)
-    results = Core.MethodInstance[]
-    # this make a better error message than the typeassert that follows
-    world == typemax(UInt) && error("code reflection cannot be used from generated functions")
-    for match in Base._methods_by_ftype(tt, -1, world)::Vector
-        instance = Core.Compiler.specialize_method(match)
-        push!(results, instance)
-    end
-    return results
-end
-end
 
 struct InferredResult
     mi::MethodInstance
@@ -360,12 +342,8 @@ function code_typed1_by_method_instance(mi::MethodInstance;
     (ccall(:jl_is_in_pure_context, Bool, ()) || world == typemax(UInt)) &&
         error("code reflection should not be used from generated functions")
     debuginfo = Base.IRShow.debuginfo(debuginfo)
-    @static if VERSION < v"1.12.0-DEV.669"
-        code, rt = Core.Compiler.typeinf_code(interp, mi.def::Method, mi.specTypes, mi.sparam_vals, optimize)
-    else
-        code = Core.Compiler.typeinf_code(interp, mi.def::Method, mi.specTypes, mi.sparam_vals, optimize)
-        rt = code.rettype
-    end
+    code = Core.Compiler.typeinf_code(interp, mi.def::Method, mi.specTypes, mi.sparam_vals, optimize)
+    rt = code.rettype
     code isa CodeInfo || error("no code is available for ", mi)
     debuginfo === :none && Base.remove_linenums!(code)
     return Pair{CodeInfo,Any}(code, rt)
@@ -450,7 +428,6 @@ end
 
 ## utility function to extract the line number at a particular program counter (ignoring inlining).
 ## return <= 0 if there is no line number change caused by this statement
-@static if VERSION ≥ v"1.12.0-DEV.173"
 function getline(lt::Core.DebugInfo, i::Int)
     while true
         codeloc = Base.IRShow.getdebugidx(lt, i)
@@ -498,26 +475,6 @@ function getnextline(lt::Core.DebugInfo, i::Int, Δline)
     return typemax(Int)
 end
 
-else # VERSION < v"1.12.0-DEV.173"
-function getline(lt, j)
-    linfo = (j == 0 ? first(lt) : lt[j])::Core.LineInfoNode
-    linfo.inlined_at == 0 && return linfo.line
-    @assert linfo.method === Symbol("macro expansion")
-    linfo = lt[linfo.inlined_at]::Core.LineInfoNode
-    return linfo.line
-end
-function getnextline(lt, j, Δline)
-    j == 0 && return typemax(Int)
-    j += 1
-    while j <= length(lt)
-        linfo = lt[j]::Core.LineInfoNode
-        linfo.inlined_at == 0 && return linfo.line + Δline
-        j += 1
-    end
-    return typemax(Int)
-end
-end # @static if
-
 # Main logic for mapping `src.code[i]` to node(s) in the SyntaxNode tree
 # Success: when we map it to a unique node
 # Δline is the (Revise) offset of the line number
@@ -550,13 +507,8 @@ function map_ssas_to_source(src::CodeInfo, mi::MethodInstance, rootnode::SyntaxN
     # Append (to `mapped`) all nodes in `targets` that are consistent with the line number of the `i`th stmt
     # (Essentially `copy!(mapped, filter(predicate, targets))`)
     function append_targets_for_line!(mapped#=::Vector{nodes}=#, i::Int, targets#=::Vector{nodes}=#)
-        @static if VERSION ≥ v"1.12.0-DEV.173"
-            j = i
-            lt = src.debuginfo
-        else
-            j = src.codelocs[i]
-            lt = src.linetable::Vector
-        end
+        j = i
+        lt = src.debuginfo
         start = getline(lt, j) + Δline
         stop = getnextline(lt, j, Δline) - 1
         linerange = start : stop
diff --git a/ext/CthulhuCompilerExt.jl b/ext/CthulhuCompilerExt.jl
index 00cd63e..36df8bc 100644
--- a/ext/CthulhuCompilerExt.jl
+++ b/ext/CthulhuCompilerExt.jl
@@ -1,15 +1,13 @@
 module CthulhuCompilerExt
 
-@static if VERSION ≥ v"1.12.0-DEV.1581"
-    using Compiler: Compiler as CC
-    using Compiler.IRShow: IRShow
-    using Cthulhu: Cthulhu
+using Compiler: Compiler as CC
+using Compiler.IRShow: IRShow
+using Cthulhu: Cthulhu
 
-    function __init__()
-        Cthulhu.CTHULHU_MODULE[] = @__MODULE__
-    end
-
-    include("../src/CthulhuBase.jl")
+function __init__()
+    Cthulhu.CTHULHU_MODULE[] = @__MODULE__
 end
 
+include("../src/CthulhuBase.jl")
+
 end
diff --git a/src/Cthulhu.jl b/src/Cthulhu.jl
index e7b3e11..59f7789 100644
--- a/src/Cthulhu.jl
+++ b/src/Cthulhu.jl
@@ -3,13 +3,8 @@ module Cthulhu
 export @descend, @descend_code_typed, @descend_code_warntype,
     descend, descend_code_typed, descend_code_warntype, ascend
 
-@static if VERSION ≥ v"1.12.0-DEV.1581"
-    const CC = Base.Compiler
-    const IRShow = Base.IRShow
-else
-    const CC = Core.Compiler
-    const IRShow = Base.IRShow
-end
+const CC = Base.Compiler
+const IRShow = Base.IRShow
 
 const CTHULHU_MODULE = Ref{Module}(@__MODULE__)
 
@@ -202,10 +197,8 @@ using PrecompileTools
 
         @compile_workload descend(gcd, (Int, Int); terminal=term)
 
-        # @static if VERSION ≥ v"1.12.0-DEV.1581"
-        #     using Compiler
-        #     @compile_workload descend(gcd, (Int, Int); terminal=term)
-        # end
+        # using Compiler
+        # @compile_workload descend(gcd, (Int, Int); terminal=term)
 
         # declare we are done with streams
         close(input.in)
diff --git a/src/CthulhuBase.jl b/src/CthulhuBase.jl
index 315df4c..ba7be92 100644
--- a/src/CthulhuBase.jl
+++ b/src/CthulhuBase.jl
@@ -15,7 +15,7 @@ using .CC: AbstractInterpreter, ApplyCallInfo, CallInfo as CCCallInfo, ConstCall
     EFFECTS_TOTAL, Effects, IncrementalCompact, InferenceParams, InferenceResult,
     InferenceState, IRCode, LimitedAccuracy, MethodMatchInfo, MethodResultPure,
     NativeInterpreter, NoCallInfo, OptimizationParams, OptimizationState,
-    UnionSplitApplyCallInfo, UnionSplitInfo, WorldRange, WorldView,
+    UnionSplitApplyCallInfo, UnionSplitInfo, WorldRange, WorldView, get_inference_world,
     argextype, argtypes_to_type, compileable_specialization, ignorelimited, singleton_type,
     specialize_method, sptypes_from_meth_instance, widenconst
 using Base: @constprop, default_tt, isvarargtype, unwrapva, unwrap_unionall, rewrap_unionall
@@ -23,12 +23,7 @@ const mapany = Base.mapany
 
 const ArgTypes = Vector{Any}
 
-@static if VERSION ≥ v"1.11.0-DEV.1498"
-    import .CC: get_inference_world
-    using Base: get_world_counter
-else
-    import .CC: get_world_counter, get_world_counter as get_inference_world
-end
+using Base: get_world_counter
 
 Base.@kwdef mutable struct CthulhuConfig
     enable_highlighter::Bool = false
@@ -152,32 +147,9 @@ default_terminal() = REPL.LineEdit.terminal(Base.active_repl)
 descend_impl(@nospecialize(args...); kwargs...) =
     _descend_with_error_handling(args...; iswarn=true, kwargs...)
 
-@static if VERSION ≥ v"1.11.0-DEV.207"
-    using .CC: cached_return_type
-else
-function cached_return_type(code::CodeInstance)
-    rettype = code.rettype
-    isdefined(code, :rettype_const) || return rettype
-    rettype_const = code.rettype_const
-    if isa(rettype_const, Vector{Any}) && !(Vector{Any} <: rettype)
-        return Core.PartialStruct(rettype, rettype_const)
-    elseif isa(rettype_const, Core.PartialOpaque) && rettype <: Core.OpaqueClosure
-        return rettype_const
-    elseif isa(rettype_const, CC.InterConditional) && !(CC.InterConditional <: rettype)
-        return rettype_const
-    else
-        return Const(rettype_const)
-    end
-end
-end
+using .CC: cached_return_type
 
-function cached_exception_type(code::CodeInstance)
-    @static if VERSION ≥ v"1.11.0-DEV.945"
-        return code.exctype
-    else
-        return nothing
-    end
-end
+cached_exception_type(code::CodeInstance) = code.exctype
 
 get_effects(codeinst::CodeInstance) = CC.decode_effects(codeinst.ipo_purity_bits)
 get_effects(codeinst::CodeInfo) = CC.decode_effects(codeinst.purity)
@@ -266,7 +238,7 @@ function lookup_constproped_optimized(interp::CthulhuInterpreter, override::Infe
     # e.g. when we switch from constant-prop' unoptimized source
     src = CC.copy(opt.ir)
     rt = override.result
-    exct = @static hasfield(InferenceResult, :exc_result) ? override.exc_result : nothing
+    exct = override.exc_result
     infos = src.stmts.info
     slottypes = src.argtypes
     codeinf = opt.src
@@ -371,7 +343,7 @@ function _descend(term::AbstractTerminal, interp::AbstractInterpreter, curs::Abs
                         # but make something up that looks plausible.
                         callsites = Callsite[]
                         if display_CI
-                            exct = @static VERSION ≥ v"1.11.0-DEV.945" ? codeinst.exctype : nothing
+                            exct = cached_exception_type(codeinst)
                             callsite = Callsite(-1, EdgeCallInfo(codeinst, codeinst.rettype, get_effects(codeinst), exct), :invoke)
                             println(iostream)
                             println(iostream, "│ ─ $callsite")
@@ -401,14 +373,7 @@ function _descend(term::AbstractTerminal, interp::AbstractInterpreter, curs::Abs
             @assert length(src.code) == length(infos)
         end
         infkey = override isa InferenceResult ? override : ci
-        @static if VERSION ≥ v"1.11.0-DEV.1127"
         pc2excts = exception_type ? get_pc_exct(interp, infkey) : nothing
-        else
-        if exception_type
-            @warn "Statement-wise and call-wise exception type information is available only on v\"1.11.0-DEV.1127\" and later"
-        end
-        pc2excts = nothing
-        end
         callsites, sourcenodes = find_callsites(interp, src, infos, ci, slottypes, optimize & !annotate_source, annotate_source, pc2excts)
 
         if jump_always
@@ -641,12 +606,8 @@ function _descend(term::AbstractTerminal, interp::AbstractInterpreter, curs::Abs
             view_cmd = CODEVIEWS[toggle]
             world = get_inference_world(interp)
             println(iostream)
-            @static if VERSION < v"1.12.0-DEV.669"
-                view_cmd(iostream, mi, optimize, debuginfo, world, CONFIG)
-            else
-                src = CC.typeinf_code(interp, mi, true)
-                view_cmd(iostream, mi, src, optimize, debuginfo, world, CONFIG)
-            end
+            src = CC.typeinf_code(interp, mi, true)
+            view_cmd(iostream, mi, src, optimize, debuginfo, world, CONFIG)
             display_CI = false
         else
             local i = findfirst(ct->ct.toggle === toggle, custom_toggles)
diff --git a/src/codeview.jl b/src/codeview.jl
index 867a080..50c0e6b 100644
--- a/src/codeview.jl
+++ b/src/codeview.jl
@@ -20,68 +20,37 @@ function highlight(io, x, lexer, config::CthulhuConfig)
     end
 end
 
-@static if VERSION < v"1.12.0-DEV.669"
-    function cthulhu_llvm(io::IO, mi, optimize::Bool, debuginfo, world::UInt,
-                          config::CthulhuConfig, dump_module::Bool=false, raw::Bool=false)
-        dump = InteractiveUtils._dump_function_llvm(
-            mi, world,
-            #=wrapper=# false, !raw,
-            dump_module, optimize, debuginfo != DInfo.none ? :source : :none,
-            Base.CodegenParams())
-        highlight(io, dump, "llvm", config)
-    end
+function cthulhu_llvm(io::IO, mi, src::CodeInfo, optimize::Bool, debuginfo, world::UInt,
+                        config::CthulhuConfig, dump_module::Bool=false, raw::Bool=false)
+    dump = InteractiveUtils._dump_function_llvm(
+        mi, src,
+        #=wrapper=# false, !raw,
+        dump_module, optimize, debuginfo != DInfo.none ? :source : :none,
+        Base.CodegenParams())
+    highlight(io, dump, "llvm", config)
+end
 
-    function cthulhu_native(io::IO, mi, ::Bool, debuginfo, world::UInt,
-                            config::CthulhuConfig, dump_module::Bool=false, raw::Bool=false)
-        if dump_module
-            dump = InteractiveUtils._dump_function_native_assembly(
-                mi, world,
-                #=wrapper=# false, #=syntax=# config.asm_syntax,
-                debuginfo != DInfo.none ? :source : :none,
-                #=binary=# false, raw,
-                Base.CodegenParams())
-        else
-            dump = InteractiveUtils._dump_function_native_disassembly(
-                mi, world,
-                #=wrapper=# false, #=syntax=# config.asm_syntax,
-                debuginfo != DInfo.none ? :source : :none,
-                #=binary=# false)
-        end
-        highlight(io, dump, "asm", config)
-    end
-else
-    function cthulhu_llvm(io::IO, mi, src::CodeInfo, optimize::Bool, debuginfo, world::UInt,
-                          config::CthulhuConfig, dump_module::Bool=false, raw::Bool=false)
-        dump = InteractiveUtils._dump_function_llvm(
+function cthulhu_native(io::IO, mi, src::CodeInfo, ::Bool, debuginfo, world::UInt,
+                        config::CthulhuConfig, dump_module::Bool=false, raw::Bool=false)
+    if dump_module
+        dump = InteractiveUtils._dump_function_native_assembly(
             mi, src,
-            #=wrapper=# false, !raw,
-            dump_module, optimize, debuginfo != DInfo.none ? :source : :none,
+            #=wrapper=# false, #=syntax=# config.asm_syntax,
+            debuginfo != DInfo.none ? :source : :none,
+            #=binary=# false, raw,
             Base.CodegenParams())
-        highlight(io, dump, "llvm", config)
-    end
-
-    function cthulhu_native(io::IO, mi, src::CodeInfo, ::Bool, debuginfo, world::UInt,
-                            config::CthulhuConfig, dump_module::Bool=false, raw::Bool=false)
-        if dump_module
-            dump = InteractiveUtils._dump_function_native_assembly(
-                mi, src,
-                #=wrapper=# false, #=syntax=# config.asm_syntax,
-                debuginfo != DInfo.none ? :source : :none,
-                #=binary=# false, raw,
-                Base.CodegenParams())
-        else
-            dump = InteractiveUtils._dump_function_native_disassembly(
-                mi, world,
-                #=wrapper=# false, #=syntax=# config.asm_syntax,
-                debuginfo != DInfo.none ? :source : :none,
-                #=binary=# false)
-        end
-        highlight(io, dump, "asm", config)
+    else
+        dump = InteractiveUtils._dump_function_native_disassembly(
+            mi, world,
+            #=wrapper=# false, #=syntax=# config.asm_syntax,
+            debuginfo != DInfo.none ? :source : :none,
+            #=binary=# false)
     end
+    highlight(io, dump, "asm", config)
+end
 
-    function cthulhu_ast(io::IO, mi, ::CodeInfo, optimize::Bool, debuginfo, world::UInt, config::CthulhuConfig)
-        return cthulhu_ast(io, mi, optimize, debuginfo, world, config)
-    end
+function cthulhu_ast(io::IO, mi, ::CodeInfo, optimize::Bool, debuginfo, world::UInt, config::CthulhuConfig)
+    return cthulhu_ast(io, mi, optimize, debuginfo, world, config)
 end
 
 function cthulhu_ast(io::IO, mi, ::Bool, debuginfo, ::UInt, config::CthulhuConfig)
@@ -219,23 +188,11 @@ function cthulhu_typed(io::IO, debuginfo::Symbol,
     # preprinter configuration
     preprinter = if inline_cost
         isa(mi, MethodInstance) || throw("`mi::MethodInstance` is required")
-        if isa(src, IRCode)
-            @static if VERSION < v"1.11.0-DEV.258"
-                code = src.stmts.inst
-            else
-                code = src.stmts.stmt
-            end
-        else
-            code = src.code
-        end
+        code = isa(src, IRCode) ? src.stmts.stmt : src.code
         cst = Vector{Int}(undef, length(code))
         params = CC.OptimizationParams(interp)
         sparams = CC.VarState[CC.VarState(sparam, false) for sparam in mi.sparam_vals]
-        @static if VERSION ≥ v"1.11.0-DEV.32"
-            CC.statement_costs!(cst, code, src, sparams, params)
-        else
-            CC.statement_costs!(cst, code, src, sparams, false, params)
-        end
+        CC.statement_costs!(cst, code, src, sparams, params)
         total_cost = sum(cst)
         nd = ndigits(total_cost)
         _lineprinter = lineprinter(src)
@@ -499,18 +456,20 @@ InteractiveUtils.code_llvm(b::Bookmark; kw...) = InteractiveUtils.code_llvm(stdo
 InteractiveUtils.code_native(b::Bookmark; kw...) =
     InteractiveUtils.code_native(stdout::IO, b; kw...)
 
-@static if VERSION < v"1.12.0-DEV.669"
-    InteractiveUtils.code_llvm(
-        io::IO,
-        b::Bookmark;
-        optimize = true,
-        debuginfo = :source,
-        dump_module = false,
-        raw = false,
-        config = CONFIG,
-    ) = cthulhu_llvm(
+function InteractiveUtils.code_llvm(
+    io::IO,
+    b::Bookmark;
+    optimize = true,
+    debuginfo = :source,
+    dump_module = false,
+    raw = false,
+    config = CONFIG,
+)
+    src = CC.typeinf_code(b.interp, b.ci.def, true)
+    return cthulhu_llvm(
         io,
         b.ci.def,
+        src,
         optimize,
         debuginfo === :source,
         get_inference_world(b.interp),
@@ -518,18 +477,22 @@ InteractiveUtils.code_native(b::Bookmark; kw...) =
         dump_module,
         raw,
     )
+end
 
-    InteractiveUtils.code_native(
-        io::IO,
-        b::Bookmark;
-        optimize = true,
-        debuginfo = :source,
-        dump_module = false,
-        raw = false,
-        config = CONFIG,
-    ) = cthulhu_native(
+function InteractiveUtils.code_native(
+    io::IO,
+    b::Bookmark;
+    optimize = true,
+    debuginfo = :source,
+    dump_module = false,
+    raw = false,
+    config = CONFIG,
+)
+    src = CC.typeinf_code(b.interp, b.ci.def, true)
+    return cthulhu_native(
         io,
         b.ci.def,
+        src,
         optimize,
         debuginfo === :source,
         get_inference_world(b.interp),
@@ -537,50 +500,4 @@ InteractiveUtils.code_native(b::Bookmark; kw...) =
         dump_module,
         raw,
     )
-else
-    function InteractiveUtils.code_llvm(
-        io::IO,
-        b::Bookmark;
-        optimize = true,
-        debuginfo = :source,
-        dump_module = false,
-        raw = false,
-        config = CONFIG,
-    )
-        src = CC.typeinf_code(b.interp, b.ci.def, true)
-        return cthulhu_llvm(
-            io,
-            b.ci.def,
-            src,
-            optimize,
-            debuginfo === :source,
-            get_inference_world(b.interp),
-            config,
-            dump_module,
-            raw,
-        )
-    end
-
-    function InteractiveUtils.code_native(
-        io::IO,
-        b::Bookmark;
-        optimize = true,
-        debuginfo = :source,
-        dump_module = false,
-        raw = false,
-        config = CONFIG,
-    )
-        src = CC.typeinf_code(b.interp, b.ci.def, true)
-        return cthulhu_native(
-            io,
-            b.ci.def,
-            src,
-            optimize,
-            debuginfo === :source,
-            get_inference_world(b.interp),
-            config,
-            dump_module,
-            raw,
-        )
-    end
 end
diff --git a/src/interpreter.jl b/src/interpreter.jl
index f972586..16109e1 100644
--- a/src/interpreter.jl
+++ b/src/interpreter.jl
@@ -46,45 +46,27 @@ end
 Base.show(io::IO, interp::CthulhuInterpreter) = print(io, typeof(interp), "(...)")
 
 CC.InferenceParams(interp::CthulhuInterpreter) = InferenceParams(interp.native)
-@static if VERSION ≥ v"1.11.0-DEV.851"
 CC.OptimizationParams(interp::CthulhuInterpreter) =
     OptimizationParams(OptimizationParams(interp.native); preserve_local_sources=true)
-else
-CC.OptimizationParams(interp::CthulhuInterpreter) = OptimizationParams(interp.native)
-end
-#=CC.=#get_inference_world(interp::CthulhuInterpreter) = get_inference_world(interp.native)
+CC.get_inference_world(interp::CthulhuInterpreter) = get_inference_world(interp.native)
 CC.get_inference_cache(interp::CthulhuInterpreter) = CC.get_inference_cache(interp.native)
 
 CC.may_optimize(::CthulhuInterpreter) = true
 CC.may_compress(::CthulhuInterpreter) = false
 CC.may_discard_trees(::CthulhuInterpreter) = false
-@static if isdefined(CC, :verbose_stmt_info)
-CC.verbose_stmt_info(::CthulhuInterpreter) = true
-end
-
 CC.method_table(interp::CthulhuInterpreter) = CC.method_table(interp.native)
 
-@static if VERSION ≥ v"1.11.0-DEV.1552"
 # Since the cache for `CthulhuInterpreter` is volatile and does not involve with the
 # internal code cache, technically, there's no requirement to supply `cache_owner` as an
 # identifier for the internal code cache. However, the definition of `cache_owner` is
 # necessary for utilizing the default `CodeInstance` constructor, define the overload here.
 CC.cache_owner(interp::CthulhuInterpreter) = interp.cache_token
-end
 
 function get_inference_key(state::InferenceState)
-    @static if VERSION ≥ v"1.12-"
-        result = state.result
-        if CC.is_constproped(state)
-            return result # TODO result.ci_as_edge?
-        elseif isdefined(result, :ci)
-            return result.ci
-        else
-            return nothing
-        end
-    else
-        return CC.any(state.result.overridden_by_const) ? state.result : state.linfo
-    end
+    result = state.result
+    CC.is_constproped(state) && return result # TODO result.ci_as_edge?
+    isdefined(result, :ci) && return result.ci
+    return nothing
 end
 
 function CC.add_remark!(interp::CthulhuInterpreter, sv::InferenceState, msg)
@@ -102,7 +84,6 @@ function CC.merge_effects!(interp::CthulhuInterpreter, sv::InferenceState, effec
     @invoke CC.merge_effects!(interp::AbstractInterpreter, sv::InferenceState, effects::Effects)
 end
 
-@static if VERSION ≥ v"1.11.0-DEV.1127"
 function CC.update_exc_bestguess!(interp::CthulhuInterpreter, @nospecialize(exct),
                                   frame::InferenceState)
     key = get_inference_key(frame)
@@ -114,11 +95,10 @@ function CC.update_exc_bestguess!(interp::CthulhuInterpreter, @nospecialize(exct
     return @invoke CC.update_exc_bestguess!(interp::AbstractInterpreter, exct::Any,
                                             frame::InferenceState)
 end
-end
 
 function InferredSource(state::InferenceState)
     unoptsrc = copy(state.src)
-    exct = @static VERSION ≥ v"1.11.0-DEV.207" ? state.result.exc_result : nothing
+    exct = state.result.exc_result
     return InferredSource(
         unoptsrc,
         copy(state.stmt_info),
@@ -127,7 +107,6 @@ function InferredSource(state::InferenceState)
         exct)
 end
 
-@static if VERSION ≥ v"1.12-"
 function cthulhu_finish(@specialize(finishfunc), state::InferenceState, interp::CthulhuInterpreter, cycleid::Int)
     res = @invoke finishfunc(state::InferenceState, interp::AbstractInterpreter, cycleid::Int)
     key = get_inference_key(state)
@@ -137,29 +116,15 @@ function cthulhu_finish(@specialize(finishfunc), state::InferenceState, interp::
     return res
 end
 
-else
-function cthulhu_finish(@specialize(finishfunc), state::InferenceState, interp::CthulhuInterpreter)
-    res = @invoke finishfunc(state::InferenceState, interp::AbstractInterpreter)
-    key = get_inference_key(state)
-    if key !== nothing
-        interp.unopt[key] = InferredSource(state)
-    end
-    return res
-end
-end
-
 function create_cthulhu_source(@nospecialize(opt), effects::Effects)
     isa(opt, OptimizationState) || return opt
     @static if VERSION ≥ v"1.13-"
         result = opt.result::CC.OptimizationResult
         result.simplified || CC.simplify_ir!(result)
         ir = CC.compact!(copy(result.ir))
-    elseif VERSION ≥ v"1.11-"
+    else
         # get the (theoretically) same effect as the jl_compress_ir -> jl_uncompress_ir -> inflate_ir round-trip
         ir = CC.compact!(CC.cfg_simplify!(CC.copy(opt.ir::IRCode)))
-    else
-        # TODO do the round-trip here?
-        ir = CC.copy(opt.ir::IRCode)
     end
     return OptimizedSource(ir, opt.src, opt.src.inlineable, effects)
 end
@@ -168,58 +133,12 @@ function set_cthulhu_source!(result::InferenceResult)
     result.src = create_cthulhu_source(result.src, result.ipo_effects)
 end
 
-@static if VERSION ≥ v"1.12.0-DEV.1823"
 CC.finishinfer!(state::InferenceState, interp::CthulhuInterpreter, cycleid::Int) = cthulhu_finish(CC.finishinfer!, state, interp, cycleid)
-@static if VERSION ≥ v"1.12-"
 function CC.finish!(interp::CthulhuInterpreter, caller::InferenceState, validation_world::UInt, time_before::UInt64)
     set_cthulhu_source!(caller.result)
     return @invoke CC.finish!(interp::AbstractInterpreter, caller::InferenceState, validation_world::UInt, time_before::UInt64)
 end
-else
-function CC.finish!(interp::CthulhuInterpreter, caller::InferenceState)
-    set_cthulhu_source!(caller.result)
-    return @invoke CC.finish!(interp::AbstractInterpreter, caller::InferenceState)
-end
-end
 
-elseif VERSION ≥ v"1.12.0-DEV.734"
-CC.finishinfer!(state::InferenceState, interp::CthulhuInterpreter) = cthulhu_finish(CC.finishinfer!, state, interp)
-function CC.finish!(interp::CthulhuInterpreter, caller::InferenceState;
-                    can_discard_trees::Bool=false)
-    set_cthulhu_source!(caller.result)
-    return @invoke CC.finish!(interp::AbstractInterpreter, caller::InferenceState;
-                              can_discard_trees)
-end
-
-elseif VERSION ≥ v"1.11.0-DEV.737"
-CC.finish(state::InferenceState, interp::CthulhuInterpreter) = cthulhu_finish(CC.finish, state, interp)
-function CC.finish!(interp::CthulhuInterpreter, caller::InferenceState)
-    result = caller.result
-    opt = result.src
-    set_cthulhu_source!(result)
-    if opt isa CC.OptimizationState
-        CC.ir_to_codeinf!(opt)
-    end
-    return nothing
-end
-function CC.transform_result_for_cache(::CthulhuInterpreter, ::MethodInstance, ::WorldRange,
-                                       result::InferenceResult)
-    return result.src
-end
-
-else # VERSION < v"1.11.0-DEV.737"
-CC.finish(state::InferenceState, interp::CthulhuInterpreter) = cthulhu_finish(CC.finish, state, interp)
-function CC.transform_result_for_cache(::CthulhuInterpreter, ::MethodInstance, ::WorldRange,
-                                       result::InferenceResult)
-    return create_cthulhu_source(result.src, result.ipo_effects)
-end
-function CC.finish!(interp::CthulhuInterpreter, caller::InferenceResult)
-    caller.src = create_cthulhu_source(caller.src, caller.ipo_effects)
-end
-
-end # @static if
-
-@static if VERSION ≥ v"1.12.0-DEV.45"
 function CC.src_inlining_policy(interp::CthulhuInterpreter,
     @nospecialize(src), @nospecialize(info::CCCallInfo), stmt_flag::UInt32)
     if isa(src, OptimizedSource)
@@ -238,41 +157,6 @@ CC.retrieve_ir_for_inlining(cached_result::CodeInstance, src::OptimizedSource) =
     CC.retrieve_ir_for_inlining(cached_result.def, src.ir::IRCode, true)
 CC.retrieve_ir_for_inlining(mi::MethodInstance, src::OptimizedSource, preserve_local_sources::Bool) =
     CC.retrieve_ir_for_inlining(mi, src.ir, preserve_local_sources)
-elseif VERSION ≥ v"1.11.0-DEV.879"
-function CC.inlining_policy(interp::CthulhuInterpreter,
-    @nospecialize(src), @nospecialize(info::CCCallInfo), stmt_flag::UInt32)
-    if isa(src, OptimizedSource)
-        if CC.is_stmt_inline(stmt_flag) || src.isinlineable
-            return src.ir
-        end
-    else
-        @assert src isa CC.IRCode || src === nothing "invalid Cthulhu code cache"
-        # the default inlining policy may try additional effor to find the source in a local cache
-        return @invoke CC.inlining_policy(interp::AbstractInterpreter,
-            src::Any, info::CCCallInfo, stmt_flag::UInt32)
-    end
-    return nothing
-end
-else
-function CC.inlining_policy(interp::CthulhuInterpreter,
-    @nospecialize(src), @nospecialize(info::CCCallInfo),
-    stmt_flag::(@static VERSION ≥ v"1.11.0-DEV.377" ? UInt32 : UInt8),
-    mi::MethodInstance, argtypes::Vector{Any})
-    if isa(src, OptimizedSource)
-        if CC.is_stmt_inline(stmt_flag) || src.isinlineable
-            return src.ir
-        end
-    else
-        @assert src isa CC.SemiConcreteResult || src === nothing "invalid Cthulhu code cache"
-        # the default inlining policy may try additional effor to find the source in a local cache
-        return @invoke CC.inlining_policy(interp::AbstractInterpreter,
-            src::Any, info::CCCallInfo,
-            stmt_flag::(@static VERSION ≥ v"1.11.0-DEV.377" ? UInt32 : UInt8),
-            mi::MethodInstance, argtypes::Vector{Any})
-    end
-    return nothing
-end
-end
 
 function CC.IRInterpretationState(interp::CthulhuInterpreter,
     code::CodeInstance, mi::MethodInstance, argtypes::Vector{Any}, world::UInt)
@@ -281,16 +165,8 @@ function CC.IRInterpretationState(interp::CthulhuInterpreter,
     inferred = inferred::OptimizedSource
     ir = CC.copy(inferred.ir)
     src = inferred.src
-    @static if isdefined(CC, :SpecInfo)
-        spec_info = CC.SpecInfo(src)
-    else
-        spec_info = CC.MethodInfo(src)
-    end
-    if isdefined(Base, :__has_internal_change) && Base.__has_internal_change(v"1.12-", :codeinfonargs)
-        argtypes = CC.va_process_argtypes(CC.optimizer_lattice(interp), argtypes, src.nargs, src.isva)
-    elseif VERSION >= v"1.12.0-DEV.341"
-        argtypes = CC.va_process_argtypes(CC.optimizer_lattice(interp), argtypes, mi)
-    end
+    spec_info = CC.SpecInfo(src)
+    argtypes = CC.va_process_argtypes(CC.optimizer_lattice(interp), argtypes, src.nargs, src.isva)
     return CC.IRInterpretationState(interp, spec_info, ir, mi, argtypes, world,
                                     code.min_world, code.max_world)
 end
diff --git a/src/reflection.jl b/src/reflection.jl
index 05828af..d59a8aa 100644
--- a/src/reflection.jl
+++ b/src/reflection.jl
@@ -22,15 +22,7 @@ function find_callsites(interp::AbstractInterpreter, CI::Union{CodeInfo,IRCode},
     mi = ci.def
     sptypes = sptypes_from_meth_instance(mi)
     callsites, sourcenodes = Callsite[], Union{TypedSyntax.MaybeTypedSyntaxNode,Callsite}[]
-    if isa(CI, IRCode)
-        @static if VERSION < v"1.11.0-DEV.258"
-            stmts = CI.stmts.inst
-        else
-            stmts = CI.stmts.stmt
-        end
-    else
-        stmts = CI.code
-    end
+    stmts = isa(CI, IRCode) ? CI.stmts.stmt : CI.code
     nstmts = length(stmts)
     _, mappings = annotate_source ? get_typed_sourcetext(mi, CI, nothing; warn=false) : (nothing, nothing)
 
@@ -126,7 +118,7 @@ function process_const_info(interp::AbstractInterpreter, @nospecialize(thisinfo)
     @nospecialize(exct))
     if isnothing(result)
         return thisinfo
-    elseif (@static VERSION ≥ v"1.11.0-DEV.851" && true) && result isa CC.VolatileInferenceResult
+    elseif result isa CC.VolatileInferenceResult
         # NOTE we would not hit this case since `finish!(::CthulhuInterpreter, frame::InferenceState)`
         #      will always transform `frame.result.src` to `OptimizedSource` when frame is inferred
         return thisinfo
@@ -175,11 +167,7 @@ function process_info(interp::AbstractInterpreter, @nospecialize(info::CCCallInf
             end
         end for edge in info.edges if edge !== nothing]
     elseif isa(info, UnionSplitInfo)
-        @static if hasfield(UnionSplitInfo, :split)
-            return mapreduce(process_recursive, vcat, info.split; init=CallInfo[])::Vector{CallInfo}
-        else
-            return mapreduce(process_recursive, vcat, info.matches; init=CallInfo[])::Vector{CallInfo}
-        end
+        return mapreduce(process_recursive, vcat, info.split; init=CallInfo[])::Vector{CallInfo}
     elseif isa(info, UnionSplitApplyCallInfo)
         return mapreduce(process_recursive, vcat, info.infos; init=CallInfo[])::Vector{CallInfo}
     elseif isa(info, ApplyCallInfo)
@@ -214,7 +202,7 @@ function process_info(interp::AbstractInterpreter, @nospecialize(info::CCCallInf
         end
         info = OCCallInfo(innerinfo)
         return CallInfo[info]
-    elseif (@static VERSION ≥ v"1.12.0-DEV.1870" && true) && isa(info, CC.GlobalAccessInfo)
+    elseif isa(info, CC.GlobalAccessInfo)
         return CallInfo[] # TODO return something informative here?
     elseif isa(info, CC.OpaqueClosureCreateInfo)
         # TODO: Add ability to descend into OCs at creation site
@@ -348,24 +336,11 @@ function find_caller_of(interp::AbstractInterpreter, callee::Union{MethodInstanc
 end
 
 function add_sourceline!(locs::Vector{Tuple{Core.LineInfoNode,Int}}, src::Union{CodeInfo,IRCode}, stmtidx::Int, caller::MethodInstance)
-    @static if VERSION ≥ v"1.12.0-DEV.173"
     stack = IRShow.buildLineInfoNode(src.debuginfo, caller, stmtidx)
     for (i, di) in enumerate(stack)
         loc = Core.LineInfoNode(Main, di.method, di.file, di.line, zero(Int32))
         push!(locs, (loc, i-1))
     end
-    else # VERSION < v"1.12.0-DEV.173"
-    if isa(src, IRCode)
-        stack = IRShow.compute_loc_stack(src.linetable, src.stmts.line[stmtidx])
-        for (i, idx) in enumerate(stack)
-            line = src.linetable[idx]
-            line.line == 0 && continue
-            push!(locs, (src.linetable[idx], i-1))
-        end
-    else
-        push!(locs, (src.linetable[src.codelocs[stmtidx]], 0))
-    end
-    end # @static if
     return locs
 end
 


Test patch:
diff --git a/TypedSyntax/test/runtests.jl b/TypedSyntax/test/runtests.jl
index f0514e9..b05f1a2 100644
--- a/TypedSyntax/test/runtests.jl
+++ b/TypedSyntax/test/runtests.jl
@@ -670,14 +670,6 @@ include("test_module.jl")
     tsn = TypedSyntaxNode(+, (Int, Int)) # need a node, not important what it is
     @test_nowarn TypedSyntax.type_annotation_mode(tsn, Union{}; type_annotations=true, hide_type_stable=false)
 
-    # issue 492
-    @static if isdefined(Base, :_tuple_unique_fieldtypes)
-    tsn = TypedSyntaxNode(Base._tuple_unique_fieldtypes, (Any,))
-    @test_nowarn str = sprint(tsn; context=:color=>false) do io, obj
-        printstyled(io, obj; hide_type_stable=false)
-    end
-    end
-
     # issue 493
     tsn = TypedSyntaxNode(TSN.f493, ())
     @test_nowarn str = sprint(tsn; context=:color=>false) do io, obj
diff --git a/test/irutils.jl b/test/irutils.jl
index 9e2a6c2..8e68137 100644
--- a/test/irutils.jl
+++ b/test/irutils.jl
@@ -35,11 +35,7 @@ end
 # check if `x` is a statically-resolved call of a function whose name is `sym`
 isinvoke(y) = @nospecialize(x) -> isinvoke(y, x)
 isinvoke(sym::Symbol, @nospecialize(x)) = isinvoke(mi->mi.def.name===sym, x)
-@static if VERSION ≥ v"1.12.0-DEV.1667"
 isinvoke(pred::Function, @nospecialize(x)) = isexpr(x, :invoke) && pred(x.args[1]::CodeInstance)
-else
-isinvoke(pred::Function, @nospecialize(x)) = isexpr(x, :invoke) && pred(x.args[1]::MethodInstance)
-end
 
 function fully_eliminated(@nospecialize args...; retval=(@__FILE__), kwargs...)
     code = code_typed1(args...; kwargs...).code
diff --git a/test/setup.jl b/test/setup.jl
index e9c7ec4..6481e55 100644
--- a/test/setup.jl
+++ b/test/setup.jl
@@ -3,9 +3,7 @@ if isdefined(parentmodule(@__MODULE__), :VSCodeServer)
     using ..VSCodeServer
 end
 
-# @static if VERSION ≥ v"1.12.0-DEV.1581"
 # InteractiveUtils.@activate Compiler # use the Compiler.jl stdlib for the Base reflections too
-# end
 
 function cthulhu_info(@nospecialize(f), @nospecialize(tt=());
                       optimize=true, interp=Cthulhu.CC.NativeInterpreter())
diff --git a/test/test_AbstractInterpreter.jl b/test/test_AbstractInterpreter.jl
index 38aaf88..8286c4f 100644
--- a/test/test_AbstractInterpreter.jl
+++ b/test/test_AbstractInterpreter.jl
@@ -18,7 +18,6 @@ Keep in mind that ephemeral cache lacks support for invalidation and doesn't per
 sessions. However it is an usual Julia object of the type `code_cache::IdDict{MethodInstance,CodeInstance}`,
 making it easier for debugging and inspecting the compiler behavior.
 """
-@static if VERSION ≥ v"1.11.0-DEV.1552"
 macro newinterp(InterpName, ephemeral_cache::Bool=false)
     cache_token = QuoteNode(gensym(string(InterpName, "CacheToken")))
     InterpCacheName = esc(Symbol(string(InterpName, "Cache")))
@@ -66,49 +65,6 @@ macro newinterp(InterpName, ephemeral_cache::Bool=false)
         end)
     end
 end
-else
-macro newinterp(InterpName)
-    InterpCacheName = esc(Symbol(string(InterpName, "Cache")))
-    InterpName = esc(InterpName)
-    C = Core
-    CC = Core.Compiler
-    quote
-        struct $InterpCacheName
-            dict::IdDict{$C.MethodInstance,$C.CodeInstance}
-        end
-        $InterpCacheName() = $InterpCacheName(IdDict{$C.MethodInstance,$C.CodeInstance}())
-        struct $InterpName <: $CC.AbstractInterpreter
-            meta # additional information
-            world::UInt
-            inf_params::$CC.InferenceParams
-            opt_params::$CC.OptimizationParams
-            inf_cache::Vector{$CC.InferenceResult}
-            code_cache::$InterpCacheName
-            function $InterpName(meta = nothing;
-                                 world::UInt = Base.get_world_counter(),
-                                 inf_params::$CC.InferenceParams = $CC.InferenceParams(),
-                                 opt_params::$CC.OptimizationParams = $CC.OptimizationParams(),
-                                 inf_cache::Vector{$CC.InferenceResult} = $CC.InferenceResult[],
-                                 code_cache::$InterpCacheName = $InterpCacheName())
-                return new(meta, world, inf_params, opt_params, inf_cache, code_cache)
-            end
-        end
-        $CC.InferenceParams(interp::$InterpName) = interp.inf_params
-        $CC.OptimizationParams(interp::$InterpName) = interp.opt_params
-        @static if VERSION ≥ v"1.11.0-DEV.1498"
-        CC.get_inference_world(interp::$InterpName) = interp.world
-        else
-        CC.get_world_counter(interp::$InterpName) = interp.world
-        end
-        $CC.get_inference_cache(interp::$InterpName) = interp.inf_cache
-        $CC.code_cache(interp::$InterpName) = $CC.WorldView(interp.code_cache, $CC.WorldRange(interp.world))
-        $CC.get(wvc::$CC.WorldView{$InterpCacheName}, mi::$C.MethodInstance, default) = get(wvc.cache.dict, mi, default)
-        $CC.getindex(wvc::$CC.WorldView{$InterpCacheName}, mi::$C.MethodInstance) = getindex(wvc.cache.dict, mi)
-        $CC.haskey(wvc::$CC.WorldView{$InterpCacheName}, mi::$C.MethodInstance) = haskey(wvc.cache.dict, mi)
-        $CC.setindex!(wvc::$CC.WorldView{$InterpCacheName}, ci::$C.CodeInstance, mi::$C.MethodInstance) = setindex!(wvc.cache.dict, ci, mi)
-    end
-end
-end # if VERSION ≥ v"1.11.0-DEV.1552"
 
 const CC = Cthulhu.CC
 
diff --git a/test/test_Cthulhu.jl b/test/test_Cthulhu.jl
index 2446b2d..1ea9a42 100644
--- a/test/test_Cthulhu.jl
+++ b/test/test_Cthulhu.jl
@@ -89,45 +89,31 @@ end
     calltwice(c) = twice(c[1])
 
     callsites = find_callsites_by_ftt(calltwice, Tuple{Vector{Float64}})
-    @static if VERSION ≥ v"1.11.0-DEV.753"
-        @test any(callsites) do callsite
-            callsite.head === :invoke || return false
-            io = IOBuffer()
-            print(io, callsite)
-            return occursin("invoke twice(::Float64)::Float64", String(take!(io)))
-        end
-        @test any(callsites) do callsite
-            callsite.head === :invoke || return false
-            io = IOBuffer()
-            print(io, callsite)
-            return occursin("invoke throw_boundserror", String(take!(io)))
-        end
-    else
-        @test length(callsites) == 1 && callsites[1].head === :invoke
+    @test any(callsites) do callsite
+        callsite.head === :invoke || return false
         io = IOBuffer()
-        print(io, callsites[1])
-        @test occursin("invoke twice(::Float64)::Float64", String(take!(io)))
+        print(io, callsite)
+        return occursin("invoke twice(::Float64)::Float64", String(take!(io)))
+    end
+    @test any(callsites) do callsite
+        callsite.head === :invoke || return false
+        io = IOBuffer()
+        print(io, callsite)
+        return occursin("invoke throw_boundserror", String(take!(io)))
     end
 
     callsites = find_callsites_by_ftt(calltwice, Tuple{Vector{AbstractFloat}})
-    @static if VERSION ≥ v"1.11.0-DEV.753"
-        @test any(callsites) do callsite
-            callsite.head === :call || return false
-            io = IOBuffer()
-            print(io, callsite)
-            return occursin("call twice(::AbstractFloat)", String(take!(io)))
-        end
-        @test any(callsites) do callsite
-            callsite.head === :invoke || return false
-            io = IOBuffer()
-            print(io, callsite)
-            return occursin("invoke throw_boundserror", String(take!(io)))
-        end
-    else
-        @test length(callsites) == 1 && callsites[1].head === :call
+    @test any(callsites) do callsite
+        callsite.head === :call || return false
+        io = IOBuffer()
+        print(io, callsite)
+        return occursin("call twice(::AbstractFloat)", String(take!(io)))
+    end
+    @test any(callsites) do callsite
+        callsite.head === :invoke || return false
         io = IOBuffer()
-        print(io, callsites[1])
-        @test occursin("call twice(::AbstractFloat)", String(take!(io)))
+        print(io, callsite)
+        return occursin("invoke throw_boundserror", String(take!(io)))
     end
 
     # Note the failure of `callinfo` to properly handle specialization
@@ -171,27 +157,12 @@ boundscheck_dce_inbounds(x) = @inbounds _boundscheck_dce(x)
 boundscheck_dce(x) = _boundscheck_dce(x)
 
 @testset "DCE & boundscheck" begin
-    @static if VERSION ≥ v"1.11.0-DEV.377"
-        # no boundscheck elimination on Julia-level compilation
-        for f in (boundscheck_dce_inbounds, boundscheck_dce)
-            let (; src) = cthulhu_info(f, Tuple{Vector{Float64}})
-                @test count(src.stmts.stmt) do stmt
-                    isexpr(stmt, :boundscheck)
-                end == 1
-            end
-        end
-    else
-        let (; src) = cthulhu_info(boundscheck_dce_inbounds, Tuple{Vector{Float64}})
-            stmts = @static VERSION < v"1.11.0-DEV.258" ? src.stmts.inst : src.stmts.stmt
-            @test all(stmts) do stmt
-                isa(stmt, Core.GotoNode) || (isa(stmt, Core.ReturnNode) && isdefined(stmt, :val))
-            end
-        end
-        let (; src) = cthulhu_info(boundscheck_dce, Tuple{Vector{Float64}})
-            stmts = @static VERSION < v"1.11.0-DEV.258" ? src.stmts.inst : src.stmts.stmt
-            @test count(!isnothing, stmts) == 2
-            stmt = stmts[end]
-            @test isa(stmt, Core.ReturnNode) && !isdefined(stmt, :val)
+    # no boundscheck elimination on Julia-level compilation
+    for f in (boundscheck_dce_inbounds, boundscheck_dce)
+        let (; src) = cthulhu_info(f, Tuple{Vector{Float64}})
+            @test count(src.stmts.stmt) do stmt
+                isexpr(stmt, :boundscheck)
+            end == 1
         end
     end
 end
@@ -369,14 +340,9 @@ end
             t2 = CC.return_type(only_ints, Tuple{Float64}) # failed `return_type`
             t1, t2
         end
-    @static if VERSION ≥ v"1.12-"
-        # We have the function resolved as `getproperty(Compiler, :return_type)` first.
-        @test length(callsites) == 4
-        extract_callsite(i) = callsites[2i]
-    else
-        @test length(callsites) == 2
-        extract_callsite(i) = callsites[i]
-    end
+    # We have the function resolved as `getproperty(Compiler, :return_type)` first.
+    @test length(callsites) == 4
+    extract_callsite(i) = callsites[2i]
     callinfo1 = extract_callsite(1).info
     @test callinfo1 isa Cthulhu.ReturnTypeCallInfo
     @test callinfo1.vmi isa Cthulhu.EdgeCallInfo
diff --git a/test/test_codeview.jl b/test/test_codeview.jl
index ffa19fe..181e65d 100644
--- a/test/test_codeview.jl
+++ b/test/test_codeview.jl
@@ -22,12 +22,8 @@ Revise.track(TestCodeViewSandbox, normpath(@__DIR__, "TestCodeViewSandbox.jl"))
                 config = Cthulhu.CONFIG
 
                 io = IOBuffer()
-                @static if VERSION < v"1.12.0-DEV.669"
-                    codeview(io, mi, optimize, debuginfo, Cthulhu.get_inference_world(interp), config)
-                else
-                    src = Cthulhu.CC.typeinf_code(interp, mi, true)
-                    codeview(io, mi, src, optimize, debuginfo, Cthulhu.get_inference_world(interp), config)
-                end
+                src = Cthulhu.CC.typeinf_code(interp, mi, true)
+                codeview(io, mi, src, optimize, debuginfo, Cthulhu.get_inference_world(interp), config)
                 @test !isempty(String(take!(io))) # just check it works
             end
         end