Vern Paxson
441baaf2c1
added &no_ZAM_opt/&no_CPP_opt attributes and --no-opt-files/--no-opt-funcs for controlling skipping script optimization
2025-09-23 09:05:40 -07:00
Vern Paxson
973cc00c42
tracking of event groups for compilation to standalone-C++
2025-09-17 14:28:13 -07:00
Vern Paxson
e5210160ea
for -O gen-standalone-C++, make the presence of uncompilable functions fatal unless -O allow-cond is used
2025-09-11 13:30:40 -06:00
Vern Paxson
693aa244f9
shift much of the internal use of ID* identifier pointers over to IDPtr objects
2025-09-03 11:19:31 -07:00
Tim Wojtulewicz
b592b6c998
Use .contains() instead of .find() or .count()
2025-09-02 16:42:52 +00:00
Tim Wojtulewicz
205c72d26f
Add some additional std::moves reported by Coverity
2025-07-23 15:17:53 -07:00
Vern Paxson
5c63133226
isolate Location specifics to private class variables to enforce correct line number ordering
2025-07-08 10:39:28 +02:00
Tim Wojtulewicz
c609d5c90a
Fix clang-tidy performance-inefficient-string-concatenation warnings
2025-05-30 08:12:29 -07:00
Vern Paxson
9f5fba7003
-O gen-C++ support for type expressions
2025-03-07 09:21:09 -08:00
Vern Paxson
a3b54b69a1
fixes for -O gen-standalone-C++ generation of lambdas
2025-01-14 17:02:12 -08:00
Vern Paxson
3d58732cb3
fixes for initializing globals when using -O gen-standalone-C++
2025-01-01 13:26:58 -08:00
Vern Paxson
0a813a53c7
-O gen-standalone-C++ fixes for recent more aggressive AST profiling
2024-12-12 14:27:12 -08:00
Vern Paxson
612d99e751
streamline generated -O C++ code by relying on per-function profiles rather than aggregate profile
2024-12-06 16:23:32 -08:00
Vern Paxson
c165e05b83
remove unnecessary header include
2024-09-27 13:23:06 -07:00
Arne Welzel
71e9c8d436
script_opt: Use Func::GetName()
2024-09-27 15:11:17 +02:00
Vern Paxson
769a3d958a
some minor tidying of -O gen-C++ sources
2024-08-13 14:29:26 -07:00
Vern Paxson
709d410fcd
regularized (some) types of pointers used in script optimization
2023-12-12 09:45:19 +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
4928e074d4
addressed some nits re "-O gen-C++" script optimization
2023-08-16 17:04:39 -07:00
Vern Paxson
6af0014a7b
fixes for compiling lambdas to C++
2023-08-16 17:03:37 -07:00
Vern Paxson
ecc93606c4
feature completeness for ZAM
2023-06-30 09:36:14 +02:00
Vern Paxson
46983cfb2f
refinements to LambdaExpr's to provide flexibility, support for ZVal captures
2023-06-30 09:36:14 +02:00
Vern Paxson
0c434ca4f8
changed function_ingredients struct to FunctionIngredients class with accessors
2023-04-02 11:34:16 -07: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
65a2900bb7
removed -O add-C++ option and updated documentation
2023-01-24 10:52:58 -08:00
Vern Paxson
18f4fcb5a4
Maintenance updates for -O gen-C++ / -O gen-standalone-C++
...
fixes for using BiFs in standalone global initializations
avoiding redundant global initializations
updates to maintenance scripts and notes
removal of an unused member variable
2023-01-12 14:08:45 -08: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
ee0a6f6835
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
2022-11-08 11:56:32 -08:00
Tim Wojtulewicz
0143d0cb86
Merge remote-tracking branch 'origin/topic/vern/CPP-Oct22-maint'
...
* origin/topic/vern/CPP-Oct22-maint:
-O C++ maintenance updates to test suite
-O gen-C++ maintenance: fixes for attributes & initializing globals
2022-10-17 16:19:04 -07:00
Vern Paxson
26dae9a5ae
-O gen-C++ maintenance: fixes for attributes & initializing globals
2022-10-14 08:37:45 -05:00
Tim Wojtulewicz
31a6ef266a
Fix recent Coverity findings
...
1491334: AUTO_CAUSES_COPY due to a for loop using auto& instead of const auto&
1498652: AUTO_CAUSES_COPY due to a for loop using auto& instead of const auto&
1498745: AUTO_CAUSES_COPY due to a for loop using auto& instead of const auto&
2022-10-12 15:56:03 -05:00
Vern Paxson
0687959f1c
use dynamic rather than static initialization of globals for scripts compiled to C++
2022-09-29 15:11:05 -07:00
Vern Paxson
dbae112bdc
C++ script generation fix for lambdas that have identical bodies
2022-09-16 16:46:35 -07:00
Tim Wojtulewicz
2abc82722f
Fix a swath of AUTO_CAUSES_COPY issues reported by Coverity
2022-08-15 09:45:46 -07:00
Tim Wojtulewicz
f624c18383
Deprecate bro_int_t and bro_uint_t
2022-07-12 12:01:23 -07:00
Tim Wojtulewicz
7c4fd382d9
Code modernization: Convert from deprecated C standard library headers
2022-06-27 09:47:31 -07:00
Vern Paxson
c6cd5d7a3b
make encountering uncompilable "standalone" functions to be a hard error
2021-12-23 11:38:09 -08:00
Vern Paxson
86288426fb
factoring of generating C++ initializations, no semantic changes
2021-12-12 12:41:16 -08:00
Vern Paxson
2f7137999f
restored support for incremental compilation of scripts to C++
2021-12-12 12:36:45 -08:00
Vern Paxson
9069e744f9
replace --optimize-only with --optimize-funcs and --optimize-files
2021-12-10 12:45:27 -08:00
Vern Paxson
8c59626eb9
reintroduction of "-O add-C++" option
2021-12-10 10:19:23 -08:00
Vern Paxson
a2cec7463f
suppress unneeded initializations
2021-11-24 12:17:16 -08:00
Vern Paxson
84423369b4
use iterator-based idiom for check-if-present-then-access
2021-11-22 15:28:15 -08:00
Vern Paxson
e1a760e674
extensive rewrite of generation & execution of run-time initialization
2021-11-07 17:00:19 -08:00
Tim Wojtulewicz
b2f171ec69
Reformat the world
2021-09-16 15:35:39 -07:00
Vern Paxson
b6daf14868
a number of low-level tweaks from code review
2021-09-08 10:23:38 -07:00
Vern Paxson
da6ac0b521
switch to ID definition regions; reworked driver functions; more info for reporting uncompilable functions
2021-09-08 10:23:38 -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
e1dc3e7b08
simpler workflow for -O gen-C++ ; also some hooks for -O gen-standalone-C++
2021-06-04 17:01:53 -07:00
Vern Paxson
c116b2b8ad
better initial workflow, thanks to Jon Siwek
2021-05-05 18:52:06 -07:00