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

@ -149,7 +149,7 @@ void CPPCompile::InitializeEvents(const ProfileFunc* pf)
void CPPCompile::DeclareLocals(const ProfileFunc* pf, const IDPList* lambda_ids)
{
// It's handy to have a set of the lambda captures rather than a list.
unordered_set<const ID*> lambda_set;
IDSet lambda_set;
if ( lambda_ids )
for ( auto li : *lambda_ids )
lambda_set.insert(li);