extensive rewrite of generation & execution of run-time initialization

This commit is contained in:
Vern Paxson 2021-11-07 17:00:19 -08:00
parent bc3bf4ea6c
commit e1a760e674
26 changed files with 3459 additions and 1580 deletions

View file

@ -27,11 +27,9 @@ public:
// end of the file (and the hash file will be locked, to prevent
// overlapping updates from concurrent compilation/appends).
// Otherwise, the file will be generated afresh.
CPPHashManager(const char* hash_name_base, bool append);
CPPHashManager(const char* hash_name_base);
~CPPHashManager();
bool IsAppend() const { return append; }
// True if the given hash has already been generated.
bool HasHash(p_hash_type h) const { return previously_compiled.count(h) > 0; }
@ -96,10 +94,6 @@ protected:
// names, rather than their script-level names.
std::unordered_map<std::string, int> gv_scopes;
// Whether we're appending to existing hash file(s), or starting
// afresh.
bool append;
// Base for file names.
std::string hash_name;