diff --git a/Project.toml b/Project.toml index 940446335e..691488b87e 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "Enzyme" uuid = "7da242da-08ed-463a-9acd-ee780be4f1d9" authors = ["William Moses ", "Valentin Churavy "] -version = "0.13.21" +version = "0.13.22" [deps] CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82" diff --git a/src/compiler/interpreter.jl b/src/compiler/interpreter.jl index bd57ec92dd..60751a1004 100644 --- a/src/compiler/interpreter.jl +++ b/src/compiler/interpreter.jl @@ -165,7 +165,7 @@ struct EnzymeInterpreter{T} <: AbstractInterpreter else code_cache::CodeCache end - method_table::Union{Nothing,Core.MethodTable} + method_table::Core.Compiler.MethodTableView # Cache of inference results for this particular interpreter local_cache::Vector{InferenceResult} @@ -201,7 +201,7 @@ function EnzymeInterpreter( return EnzymeInterpreter( cache_or_token, - mt, + mt == nothing ? Core.Compiler.InternalMethodTable(world) : Core.Compiler.OverlayMethodTable(world, mt), # Initially empty cache Vector{InferenceResult}(), @@ -253,8 +253,7 @@ Core.Compiler.may_compress(@nospecialize(::EnzymeInterpreter)) = true Core.Compiler.may_discard_trees(@nospecialize(::EnzymeInterpreter)) = false Core.Compiler.verbose_stmt_info(@nospecialize(::EnzymeInterpreter)) = false -Core.Compiler.method_table(@nospecialize(interp::EnzymeInterpreter), sv::InferenceState) = - Core.Compiler.OverlayMethodTable(interp.world, interp.method_table) +Core.Compiler.method_table(@nospecialize(interp::EnzymeInterpreter)) = interp.method_table function is_alwaysinline_func(@nospecialize(TT))::Bool isa(TT, DataType) || return false diff --git a/src/compiler/validation.jl b/src/compiler/validation.jl index 525e4d874c..20be3891a0 100644 --- a/src/compiler/validation.jl +++ b/src/compiler/validation.jl @@ -483,7 +483,7 @@ end end @inline function has_method(@nospecialize(sig::Type), world::UInt, mt::Core.Compiler.OverlayMethodTable) - return has_method(sig, mt.mt, mt.world) || has_method(sig, nothing, mt.world) + return has_method(sig, mt.world, mt.mt) || has_method(sig, mt.world, nothing) end @inline function is_inactive(@nospecialize(tys::Union{Vector{Union{Type,Core.TypeofVararg}}, Core.SimpleVector}), world::UInt, @nospecialize(mt))