Skip to content

Commit f590a4d

Browse files
authored
Since JuliaLang/julia#59915, `Base._which` now takes `Compiler.MethodTableView` instead of `MethodTable`, so this change is necessary. However, with this change, it seems that CassetteOverlay and external abstract interpreter packages cannot be composed. If this becomes necessary, we may need to change the interface of `CassetteOverlay.method_table`.
1 parent 8cfa7c5 commit f590a4d

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "CassetteOverlay"
22
uuid = "d78b62d4-37fa-4a6f-acd8-2f19986eb9ee"
3-
authors = ["JuliaHub, Inc. and other contributors"]
43
version = "0.2.3"
4+
authors = ["JuliaHub, Inc. and other contributors"]
55

66
[deps]
77
CassetteBase = "6dd3e646-b1c5-42c7-94be-00277fa12e22"

src/CassetteOverlay.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ macro overlaypass(args...)
105105
nonoverlaytype = typeof(CassetteOverlay.nonoverlay)
106106

107107
if method_table !== :nothing
108-
mthd_tbl = :($CassetteOverlay.methodtable(::UInt, ::Type{$PassName}) = $(esc(method_table)))
108+
mthd_tbl = :($CassetteOverlay.methodtable(world::UInt, ::Type{$PassName}) =
109+
Base.Compiler.OverlayMethodTable(world, $(esc(method_table))))
109110
else
110111
mthd_tbl = nothing
111112
end
@@ -193,7 +194,8 @@ function methodtable(world::UInt, ::Type{<:AbstractBindingOverlay{M, S}}) where
193194
end
194195
@static if VERSION v"1.12-"
195196
@assert isconst_at_world(M, S, world)
196-
return getglobal_at_world(M, S, world)
197+
mt, worlds = getglobal_at_world(M, S, world)
198+
return Base.Compiler.OverlayMethodTable(world, mt::MethodTable) => worlds
197199
else
198200
@assert @invokelatest isconst(M, S)
199201
return getglobal(M, S)::MethodTable

0 commit comments

Comments
 (0)