* origin/topic/vern/script-opt.May24:
factored BTest constants into globals to prevent premature ZAM optimization when testing
addressed minor issues flagged by Coverity
Relying only on the IP-header-provided length could violate buffer boundaries in
the endpoints' rule matching. This change mirrors what we do in UDP and TCP.
Resolves#3671
* origin/topic/vern/ZAM-perf.Apr24: (27 commits)
BTest updates for changes due to use of ZAM BiF replacements
rewrite of ZAM optimization of BiFs and script functions/idioms
flag base script as being known to ZAM optimization
ZAM optimization for constructing records w/ fields initialized to network_time
factor some functionality used by BiFs to make accessible to ZAM instructions
factor script optimization Expr AST nodes out of main AST header
new internal AST node for expression idioms with corresponding ZAM built-ins
streamlining of expressions only used for script optimization
reordering of expressions to match main usage vs. script-optimization extras
support for conditional expressions transforming into interal has-elements expr
make same_expr() functionality accessible as a utility
unify functionality across EqExpr and RelExpr classes
introduce notions of script functions/BiFs that are (1) foldable, (2) replaceable
optimization of scripting idioms - min/max, has-elements
hooks for ZAM optimization of calls to particular functions
shift ZAM maintenance monitoring of new BiFs to a BTest so it automatically runs
make externally available the expression used for initializating a record field
record field initialization optimization: do coercions at compile-time if applicable
$ZAM_PROFILE_ALL set tells ZAM to profile function bodies even if not executed
performance speed-up for SMB base scripts
...
While in Spicy code a hook priority is spelled `priority=4711` the
attribute is still called `&priority` (like in HILTI) and we rely on
exactly that name when e.g., extracting hook priorities for scheduling.
This change was introduced as part of
db98dc4193 and caused the default hook
priority for hooks defined in EVT files (intended to be -1000 to likely
schedule after e.g., hooks in the Spicy grammars) to be ignored. This
could then e.g., introduce issue when a `%done` hook would mutate state
exposed in an EVT hook (which now might not have seen the updated state
due to different scheduling).