@@ -57,38 +57,38 @@ Overlays another method table view with an additional local fast path cache that
5757can respond to repeated, identical queries faster than the original method table.
5858"""
5959struct CachedMethodTable{T} <: MethodTableView
60- cache:: IdDict{MethodMatchKey, Union{Missing ,MethodMatchResult}}
60+ cache:: IdDict{MethodMatchKey, Union{Nothing ,MethodMatchResult}}
6161 table:: T
6262end
63- CachedMethodTable (table:: T ) where T = CachedMethodTable {T} (IdDict {MethodMatchKey, Union{Missing ,MethodMatchResult}} (), table)
63+ CachedMethodTable (table:: T ) where T = CachedMethodTable {T} (IdDict {MethodMatchKey, Union{Nothing ,MethodMatchResult}} (), table)
6464
6565"""
6666 findall(sig::Type, view::MethodTableView; limit::Int=-1) ->
67- MethodMatchResult(matches::MethodLookupResult, overlayed::Bool) or missing
67+ MethodMatchResult(matches::MethodLookupResult, overlayed::Bool) or nothing
6868
6969Find all methods in the given method table `view` that are applicable to the given signature `sig`.
7070If no applicable methods are found, an empty result is returned.
71- If the number of applicable methods exceeded the specified `limit`, `missing ` is returned.
71+ If the number of applicable methods exceeded the specified `limit`, `nothing ` is returned.
7272Note that the default setting `limit=-1` does not limit the number of applicable methods.
7373`overlayed` indicates if any of the matching methods comes from an overlayed method table.
7474"""
7575function findall (@nospecialize (sig:: Type ), table:: InternalMethodTable ; limit:: Int = - 1 )
7676 result = _findall (sig, nothing , table. world, limit)
77- result === missing && return missing
77+ result === nothing && return nothing
7878 return MethodMatchResult (result, false )
7979end
8080
8181function findall (@nospecialize (sig:: Type ), table:: OverlayMethodTable ; limit:: Int = - 1 )
8282 result = _findall (sig, table. mt, table. world, limit)
83- result === missing && return missing
83+ result === nothing && return nothing
8484 nr = length (result)
8585 if nr ≥ 1 && result[nr]. fully_covers
8686 # no need to fall back to the internal method table
8787 return MethodMatchResult (result, true )
8888 end
8989 # fall back to the internal method table
9090 fallback_result = _findall (sig, nothing , table. world, limit)
91- fallback_result === missing && return missing
91+ fallback_result === nothing && return nothing
9292 # merge the fallback match results with the internal method table
9393 return MethodMatchResult (
9494 MethodLookupResult (
@@ -105,10 +105,8 @@ function _findall(@nospecialize(sig::Type), mt::Union{Nothing,Core.MethodTable},
105105 _max_val = RefValue {UInt} (typemax (UInt))
106106 _ambig = RefValue {Int32} (0 )
107107 ms = _methods_by_ftype (sig, mt, limit, world, false , _min_val, _max_val, _ambig)
108- if ms === false
109- return missing
110- end
111- return MethodLookupResult (ms:: Vector{Any} , WorldRange (_min_val[], _max_val[]), _ambig[] != 0 )
108+ isa (ms, Vector) || return nothing
109+ return MethodLookupResult (ms, WorldRange (_min_val[], _max_val[]), _ambig[] != 0 )
112110end
113111
114112function findall (@nospecialize (sig:: Type ), table:: CachedMethodTable ; limit:: Int = - 1 )
0 commit comments