mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 07:38:19 +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
|
@ -180,6 +180,11 @@ ExprPtr Inliner::CheckForInlining(CallExprPtr c)
|
|||
if ( function->GetKind() != Func::SCRIPT_FUNC )
|
||||
return c;
|
||||
|
||||
// Check for mismatches in argument count due to single-arg-of-type-any
|
||||
// loophole used for variadic BiFs.
|
||||
if ( function->GetType()->Params()->NumFields() == 1 && c->Args()->Exprs().size() != 1 )
|
||||
return c;
|
||||
|
||||
auto func_vf = static_cast<ScriptFunc*>(function);
|
||||
|
||||
if ( inline_ables.count(func_vf) == 0 )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue