Merge remote-tracking branch 'origin/topic/vern/script-opt-uncompilable-AST'

* origin/topic/vern/script-opt-uncompilable-AST:
  ScriptOpt: Fail compilation if known exprs/stmts is outdated
  skip optimization of functions with AST nodes unknown to script optimization
This commit is contained in:
Arne Welzel 2024-12-09 14:03:29 +01:00
commit 0ebcd9608f
9 changed files with 170 additions and 10 deletions

View file

@ -269,6 +269,11 @@ extern void clear_script_analysis();
// Called when Zeek is terminating.
extern void finish_script_execution();
// Returns true if the given profile indicates the presence of an AST
// node not known to script optimization. The second argument specifies
// whether we're doing ZAM optimization; if not, compile-to-C++ is assumed.
extern bool has_AST_node_unknown_to_script_opt(const ProfileFunc* prof, bool /* is_ZAM */);
// Returns true if the given call has a specialized ZAM equivalent when
// used in a conditional.
extern bool IsZAM_BuiltInCond(const CallExpr* c);