Commit graph

33 commits

Author SHA1 Message Date
Tim Wojtulewicz
b592b6c998 Use .contains() instead of .find() or .count() 2025-09-02 16:42:52 +00:00
Tim Wojtulewicz
c609d5c90a Fix clang-tidy performance-inefficient-string-concatenation warnings 2025-05-30 08:12:29 -07: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
2e69a8870a introduced simplified initialization for non-standalone -O gen-C++ code
tied -O gen-standalone-C++ to use of --optimize-files
2024-12-06 16:25:22 -08:00
Vern Paxson
519fec2592 switched CPPCompile::Canonicalize() to take std::string instead of const char* 2024-11-04 08:22:37 -08:00
Arne Welzel
71e9c8d436 script_opt: Use Func::GetName() 2024-09-27 15:11:17 +02:00
Vern Paxson
0ca2f9a8b2 speedups for compilation of initializers in -O gen-C++ generated code 2024-08-13 14:43:17 -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
Tim Wojtulewicz
73adf2bf01 CPP code-gen: Mark child classes final, remove final from function defs 2023-07-25 08:39:31 -07: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
3b3cea799b fixes for -O gen-standalone-C++ 2021-12-12 12:36:08 -08:00
Vern Paxson
9d884c0285 remove unnecessary includes 2021-12-10 09:27:07 -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
9af6b2f48d clang-format: Set penalty for breaking after assignment operator 2021-09-27 10:49:48 -07:00
Tim Wojtulewicz
4423574d26 clang-format: Set IndentCaseBlocks to false 2021-09-27 10:49:48 -07: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
9a9995bdd1 tracking of optimization information associated with identifiers 2021-09-08 10:23:38 -07:00
Vern Paxson
30cb91fe35 low-level coding style fixes 2021-06-29 15:17:34 -07:00
Vern Paxson
b4f025dda9 support for standalone compiled scripts to export globals with module qualifiers 2021-06-11 08:49:52 -07:00
Vern Paxson
725aa558a7 fixes for standalone C++ scripts making types & variables/functions available 2021-06-04 17:14:46 -07:00
Jon Siwek
3e85375010 Fix various compiler/linter warnings in script_opt/CPP code 2021-05-05 16:55:05 -07:00
Vern Paxson
72413f315c decluttered code by removing "std::" - no semantic changes
(also some whitespace fixes)
2021-05-05 16:55:05 -07:00
Vern Paxson
863be9436b the bulk of the compiler 2021-05-05 16:55:04 -07:00