50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
}
}
optional< OverloadSet::Overload > OverloadSet::getResolutionFromCache( const Term& args ) const
{
ProfileZoneScoped;
for( auto&& [_,ovl] : Match( args, m_resolutionCache ) )
return ovl;
return nullopt;
}
void OverloadSet::addResolutionToCache( const Term& args, const Overload& ovl )
{
ProfileZoneScoped;
m_resolutionCache = Merge( m_resolutionCache, args,
[&]( auto&& ) { return ovl; } );
}
|
>
|
|
|
<
|
<
|
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
}
}
optional< OverloadSet::Overload > OverloadSet::getResolutionFromCache( const Term& args ) const
{
ProfileZoneScoped;
auto it = m_resolutionCache.find( args );
if( it == m_resolutionCache.end() )
return nullopt;
return it->second;
}
void OverloadSet::addResolutionToCache( const Term& args, const Overload& ovl )
{
ProfileZoneScoped;
m_resolutionCache.emplace( args, ovl );
}
|