mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 00:28:21 +00:00
script optimization fixes:
new initialization model for standalone C++ scripts type coercion fix ZAM fix for compiling using C++ optimizer disambiguate empty constructors
This commit is contained in:
parent
dbb2aa88a6
commit
134f8f2ef5
14 changed files with 80 additions and 96 deletions
|
@ -16,9 +16,6 @@ template <class T> void CPPTracker<T>::AddKey(IntrusivePtr<T> key, p_hash_type h
|
|||
if ( HasKey(key) )
|
||||
return;
|
||||
|
||||
if ( h == 0 )
|
||||
h = Hash(key);
|
||||
|
||||
if ( map2.count(h) == 0 )
|
||||
{
|
||||
auto index = keys.size();
|
||||
|
@ -57,16 +54,6 @@ template <class T> string CPPTracker<T>::KeyName(const T* key)
|
|||
return full_name;
|
||||
}
|
||||
|
||||
template <class T> p_hash_type CPPTracker<T>::Hash(IntrusivePtr<T> key) const
|
||||
{
|
||||
ODesc d;
|
||||
d.SetDeterminism(true);
|
||||
key->Describe(&d);
|
||||
string desc = d.Description();
|
||||
auto h = hash<string>{}(base_name + desc);
|
||||
return p_hash_type(h);
|
||||
}
|
||||
|
||||
// Instantiate the templates we'll need.
|
||||
template class CPPTracker<Type>;
|
||||
template class CPPTracker<Attributes>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue