mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 01:28:20 +00:00
Script optimization maintenance and updates:
maintenance fixes for variadic run-time checks, '_' placeholder identifier "-O allow-cond" permits compiling scripts to C++ when influenced by @if conditionals more robust standalone compile-to-C++ properties fix for nested "when" statements test suite updates
This commit is contained in:
parent
bc0284aefa
commit
ee0a6f6835
40 changed files with 257 additions and 158 deletions
|
@ -28,7 +28,7 @@ string Fmt(double d)
|
|||
|
||||
string scope_prefix(const string& scope)
|
||||
{
|
||||
return string("zeek::detail::CPP_") + scope + "::";
|
||||
return "zeek::detail::CPP_" + scope;
|
||||
}
|
||||
|
||||
string scope_prefix(int scope)
|
||||
|
@ -38,6 +38,9 @@ string scope_prefix(int scope)
|
|||
|
||||
bool is_CPP_compilable(const ProfileFunc* pf, const char** reason)
|
||||
{
|
||||
if ( analysis_options.allow_cond )
|
||||
return true;
|
||||
|
||||
auto body = pf->ProfiledBody();
|
||||
if ( body && ! body->GetOptInfo()->is_free_of_conditionals )
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue