captures for "when" statements

update Triggers to IntrusivePtr's and simpler AST traversal
introduce IDSet type, migrate associated "ID*" types to "const ID*"
This commit is contained in:
Vern Paxson 2022-01-07 14:50:35 -08:00
parent fa142438fe
commit f895008c34
24 changed files with 648 additions and 202 deletions

View file

@ -656,7 +656,7 @@ void ZAMCompiler::ReMapInterpreterFrame()
remapped_intrp_frame_sizes[func] = next_interp_slot;
}
void ZAMCompiler::ReMapVar(ID* id, int slot, bro_uint_t inst)
void ZAMCompiler::ReMapVar(const ID* id, int slot, bro_uint_t inst)
{
// A greedy algorithm for this is to simply find the first suitable
// frame slot. We do that with one twist: we also look for a
@ -832,7 +832,7 @@ void ZAMCompiler::ExtendLifetime(int slot, const ZInstI* inst)
if ( inst_endings.count(inst) == 0 )
{
std::unordered_set<ID*> denizens;
IDSet denizens;
inst_endings[inst] = denizens;
}