Commit graph

13 commits

Author SHA1 Message Date
Vern Paxson
973cc00c42 tracking of event groups for compilation to standalone-C++ 2025-09-17 14:28:13 -07:00
Arne Welzel
5e36709905 Func: Add SetCapturesVec()
Add an API to directly set captures_vec for use by C++ compilation. The
current code keys off or asserts on ZAM stmts, making it difficult to
leverage captures_vec in other contexts.
2024-08-15 10:10:00 +02:00
Vern Paxson
207b82ae4b robustness improvements for -O gen-C++ generation of lambdas / "when"s 2024-08-13 14:45:33 -07:00
Vern Paxson
769a3d958a some minor tidying of -O gen-C++ sources 2024-08-13 14:29:26 -07:00
Dominik Charousset
647fdf7737 Add facade types to avoid using raw Broker types
By avoiding to use `broker::data` directly, we gain a degree of freedom
that allows us to swap out `broker::data` for something else (e.g.,
`broker::variant`) in the future. Furthermore, it also helps us to keep
Broker types "local" to the Broker manager and gives us a nicer
interface.

Also replaces uses of `broker::expected` with `std::optional`. While an
`expected `can carry additional information as to why a value is not
present, nothing in Zeek ever cared about that. Hence, using
`std::optional` removes an unnecessary dependency on a Broker detail
while also being more efficient (no extra heap allocation when no value
is present).
2023-12-04 15:23:28 +01:00
Benjamin Bannier
f5a76c1aed Reformat Zeek in Spicy style
This largely copies over Spicy's `.clang-format` configuration file. The
one place where we deviate is header include order since Zeek depends on
headers being included in a certain order.
2023-10-30 09:40:55 +01:00
Vern Paxson
c0dd2b4e81 script_opt/CPP: errors, recursive type fixes, fix embedded comments
better (than nothing) run-time errors for compiled scripts
fixes for dealing with recursive types in compiled scripts
fix for values in compiled scripts containing embedded comment markers
2023-03-08 10:19:17 +01:00
Vern Paxson
134f8f2ef5 script optimization fixes:
new initialization model for standalone C++ scripts
 type coercion fix
 ZAM fix for compiling using C++ optimizer
 disambiguate empty constructors
2022-11-20 12:16:25 -08:00
Vern Paxson
5a0a88526e removed deprecated capture-by-reference closures 2022-06-17 15:55:43 -07:00
Vern Paxson
2f7137999f restored support for incremental compilation of scripts to C++ 2021-12-12 12:36:45 -08:00
Tim Wojtulewicz
b2f171ec69 Reformat the world 2021-09-16 15:35:39 -07:00
Vern Paxson
725aa558a7 fixes for standalone C++ scripts making types & variables/functions available 2021-06-04 17:14:46 -07:00
Vern Paxson
863be9436b the bulk of the compiler 2021-05-05 16:55:04 -07:00