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:
Vern Paxson 2022-11-20 12:16:25 -08:00
parent dbb2aa88a6
commit 134f8f2ef5
14 changed files with 80 additions and 96 deletions

View file

@ -29,15 +29,7 @@ function load_CPP%(h: count%): bool
return zeek::val_mgr->False();
}
// Ensure that any compiled scripts are used. If instead
// the AST is used, then when we activate the standalone
// scripts, they won't be able to avoid installing redundant
// event handlers.
detail::analysis_options.use_CPP = true;
// Mark this script as one we should activate after loading
// compiled scripts.
detail::standalone_activations.push_back(cb->second);
(*cb->second)();
return zeek::val_mgr->True();
%}