diff --git a/.github/workflows/Test.yml b/.github/workflows/Test.yml index a07d962f..0b8f021e 100644 --- a/.github/workflows/Test.yml +++ b/.github/workflows/Test.yml @@ -19,7 +19,7 @@ jobs: strategy: fail-fast: false matrix: - version: ['1.10', '1.11', '1.12', 'nightly'] + version: ['1.10', '1.11', '1.12', '1.13-nightly', 'nightly'] os: [ubuntu-24.04, ubuntu-24.04-arm, macOS-15, macOS-15-intel, windows-2025] arch: [x64, arm64] llvm_args: [''] diff --git a/src/jlgen.jl b/src/jlgen.jl index 0d380cbf..29e54f51 100644 --- a/src/jlgen.jl +++ b/src/jlgen.jl @@ -135,7 +135,7 @@ function methodinstance_generator(world::UInt, source, self, ft::Type, tt::Type) # propagate edge metadata new_ci.min_world = min_world[] new_ci.max_world = max_world[] - new_ci.edges = MethodInstance[mi] + new_ci.edges = Any[mi] # prepare the slots new_ci.slotnames = Symbol[Symbol("#self#"), :ft, :tt] @@ -503,7 +503,9 @@ CC.method_table(interp::GPUInterpreter) = interp.method_table_view ## world view of the cache -using Core.Compiler: WorldView +@static if VERSION < v"1.14-" + using Core.Compiler: WorldView +end if !HAS_INTEGRATED_CACHE @@ -624,6 +626,16 @@ function ci_cache_populate(interp, cache, mi, min_world, max_world) return codeinfos end +@static if VERSION >= v"1.14-" +function ci_cache_lookup(cache, mi, min_world, max_world) + # In Julia 1.14+, WorldView was replaced by InternalCodeCache with WorldRange + # cache is OverlayCodeCache{InternalCodeCache}, extract owner from globalcache + owner = cache.globalcache.owner + wvc = CC.InternalCodeCache(owner, CC.WorldRange(min_world, max_world)) + ci = CC.get(wvc, mi, nothing) + return ci +end +else function ci_cache_lookup(cache, mi, min_world, max_world) wvc = WorldView(cache, min_world, max_world) ci = CC.get(wvc, mi, nothing) @@ -635,6 +647,7 @@ function ci_cache_lookup(cache, mi, min_world, max_world) end return ci end +end # @static if ## interface diff --git a/test/Project.toml b/test/Project.toml index 0c5499ed..def54d1b 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -18,6 +18,4 @@ demumble_jll = "1e29f10c-031c-5a83-9565-69cddfc27673" [compat] Aqua = "0.8" ParallelTestRunner = "1" - -[extras] -GPUCompiler = "61eb1bfa-7361-4325-ad38-22787b887f55" +LLVM_jll = "15,16,18,20" diff --git a/test/helpers/enzyme.jl b/test/helpers/enzyme.jl index 133e9a5a..302c4fac 100644 --- a/test/helpers/enzyme.jl +++ b/test/helpers/enzyme.jl @@ -95,7 +95,7 @@ function deferred_codegen_id_generator(world::UInt, source, self, ft::Type, tt:: # new_ci.min_world = min_world[] new_ci.min_world = world new_ci.max_world = max_world[] - new_ci.edges = Core.MethodInstance[mi] + new_ci.edges = Any[mi] # prepare the slots new_ci.slotnames = Symbol[Symbol("#self#"), :ft, :tt] diff --git a/test/native.jl b/test/native.jl index da08764f..9f908dc0 100644 --- a/test/native.jl +++ b/test/native.jl @@ -643,7 +643,12 @@ end end Base.Experimental.@MethodTable method_table - Base.Experimental.@overlay method_table @noinline Core.throw_inexacterror(f::Symbol, ::Type{T}, val) where {T} = return + # @consistent_overlay (Julia 1.11+) is needed for the compiler to optimize through the overlay + @static if VERSION >= v"1.11-" + Base.Experimental.@consistent_overlay method_table @noinline Core.throw_inexacterror(f::Symbol, ::Type{T}, val) where {T} = return + else + Base.Experimental.@overlay method_table @noinline Core.throw_inexacterror(f::Symbol, ::Type{T}, val) where {T} = return + end end @test @filecheck begin