flag base script as being known to ZAM optimization

This commit is contained in:
Vern Paxson 2024-04-08 18:31:19 -04:00 committed by Tim Wojtulewicz
parent ef4386ea13
commit 263093af78

View file

@ -18,6 +18,10 @@ export {
global directed_id_string: function(id: conn_id, is_orig: bool): string; global directed_id_string: function(id: conn_id, is_orig: bool): string;
} }
### Note, this function is known to -O ZAM (see `known_funcs` and
### `ScriptOptBuiltinExpr::FUNC_ID_STRING` in src/script_opt/Expr.cc),
### which replaces it with a custom instruction, so if changed here,
### that needs to be changed too.
function id_string(id: conn_id): string function id_string(id: conn_id): string
{ {
return fmt("%s:%d > %s:%d", return fmt("%s:%d > %s:%d",