@@ -23,19 +23,6 @@ struct OverlayMethodTable <: MethodTableView
23
23
mt:: Core.MethodTable
24
24
end
25
25
26
- """
27
- struct CachedMethodTable <: MethodTableView
28
-
29
- Overlays another method table view with an additional local fast path cache that
30
- can respond to repeated, identical queries faster than the original method table.
31
- """
32
- struct CachedMethodTable{T} <: MethodTableView
33
- cache:: MethodLookupCache
34
- table:: T
35
- CachedMethodTable (cache:: MethodLookupCache , table:: T ) where T = new {T} (cache, table)
36
- CachedMethodTable (:: Nothing , table:: T ) where T = new {T} (MethodLookupCache (), table)
37
- end
38
-
39
26
"""
40
27
findall(sig::Type, view::MethodTableView; limit=typemax(Int))
41
28
@@ -74,17 +61,6 @@ function findall(@nospecialize(sig::Type), table::OverlayMethodTable; limit::Int
74
61
return MethodLookupResult (ms:: Vector{Any} , WorldRange (_min_val[], _max_val[]), _ambig[] != 0 )
75
62
end
76
63
77
- function findall (@nospecialize (sig:: Type ), table:: CachedMethodTable ; limit:: Int = typemax (Int))
78
- if isconcretetype (sig)
79
- # we have equivalent cache in this concrete DataType's hash table, so don't bother to cache it here
80
- return findall (sig, table. table; limit)
81
- end
82
- box = Core. Box (sig)
83
- return get! (table. cache, sig) do
84
- findall (box. contents, table. table; limit)
85
- end
86
- end
87
-
88
64
"""
89
65
findsup(sig::Type, view::MethodTableView)::Union{Tuple{MethodMatch, WorldRange}, Nothing}
90
66
@@ -108,10 +84,6 @@ function findsup(@nospecialize(sig::Type), table::InternalMethodTable)
108
84
(result. method, WorldRange (min_valid[], max_valid[]))
109
85
end
110
86
111
- # This query is not cached
112
- findsup (@nospecialize (sig:: Type ), table:: CachedMethodTable ) = findsup (sig, table. table)
113
-
114
87
isoverlayed (:: MethodTableView ) = error (" unsatisfied MethodTableView interface" )
115
88
isoverlayed (:: InternalMethodTable ) = false
116
89
isoverlayed (:: OverlayMethodTable ) = true
117
- isoverlayed (mt:: CachedMethodTable ) = isoverlayed (mt. table)
0 commit comments