mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 16:18:19 +00:00
extensive rewrite of generation & execution of run-time initialization
This commit is contained in:
parent
bc3bf4ea6c
commit
e1a760e674
26 changed files with 3459 additions and 1580 deletions
|
@ -51,13 +51,25 @@ template <class T> string CPPTracker<T>::KeyName(const T* key)
|
|||
auto hash = map[key];
|
||||
ASSERT(hash != 0);
|
||||
|
||||
auto rep = reps[hash];
|
||||
if ( gi_s.count(rep) > 0 )
|
||||
return gi_s[rep]->Name();
|
||||
|
||||
auto index = map2[hash];
|
||||
|
||||
string scope;
|
||||
if ( IsInherited(hash) )
|
||||
scope = scope_prefix(scope2[hash]);
|
||||
|
||||
return scope + string(base_name) + "_" + Fmt(index) + "__CPP";
|
||||
string ind = Fmt(index);
|
||||
string full_name;
|
||||
|
||||
if ( single_global )
|
||||
full_name = base_name + "__CPP[" + ind + "]";
|
||||
else
|
||||
full_name = base_name + "_" + ind + "__CPP";
|
||||
|
||||
return scope + full_name;
|
||||
}
|
||||
|
||||
template <class T> void CPPTracker<T>::LogIfNew(IntrusivePtr<T> key, int scope, FILE* log_file)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue