Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "CassetteOverlay"
uuid = "d78b62d4-37fa-4a6f-acd8-2f19986eb9ee"
authors = ["JuliaHub, Inc. and other contributors"]
version = "0.2.3"
authors = ["JuliaHub, Inc. and other contributors"]

[deps]
CassetteBase = "6dd3e646-b1c5-42c7-94be-00277fa12e22"
Expand Down
6 changes: 4 additions & 2 deletions src/CassetteOverlay.jl
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ macro overlaypass(args...)
nonoverlaytype = typeof(CassetteOverlay.nonoverlay)

if method_table !== :nothing
mthd_tbl = :($CassetteOverlay.methodtable(::UInt, ::Type{$PassName}) = $(esc(method_table)))
mthd_tbl = :($CassetteOverlay.methodtable(world::UInt, ::Type{$PassName}) =
Base.Compiler.OverlayMethodTable(world, $(esc(method_table))))
else
mthd_tbl = nothing
end
Expand Down Expand Up @@ -193,7 +194,8 @@ function methodtable(world::UInt, ::Type{<:AbstractBindingOverlay{M, S}}) where
end
@static if VERSION ≥ v"1.12-"
@assert isconst_at_world(M, S, world)
return getglobal_at_world(M, S, world)
mt, worlds = getglobal_at_world(M, S, world)
return Base.Compiler.OverlayMethodTable(world, mt::MethodTable) => worlds
else
@assert @invokelatest isconst(M, S)
return getglobal(M, S)::MethodTable
Expand Down
Loading