Commit graph

21 commits

Author SHA1 Message Date
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
5c38f7637d -O gen-C++ fix for run-time warnings for "when" lambdas 2024-09-27 13:23:06 -07:00
Vern Paxson
0ca2f9a8b2 speedups for compilation of initializers in -O gen-C++ generated code 2024-08-13 14:43:17 -07:00
Dominik Charousset
cebb85b1e8 Fix unsafe and inefficient uses of copy_string
Add a new overload to `copy_string` that takes the input characters plus
size. The new overload avoids inefficient scanning of the input for the
null terminator in cases where we know the size beforehand. Furthermore,
this overload *must* be used when dealing with input character sequences
that may have no null terminator, e.g., when the input is from a
`std::string_view` object.
2023-11-03 15:25:38 +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
7aa310ee50 Fix a bunch of -Wunqualified-std-cast-call warnings from clang 15 2023-03-24 13:58:01 -07:00
Vern Paxson
a934acc4f1 use a subclass of TableType for incremental construction of compiled scripts 2023-03-08 10:19:21 +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
ce7e253dfd Fixed bad memory access in compiled-to-C++ scripts when initializing attributes 2023-02-14 15:18:10 -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
Elad Solomon
98a0e242ad Fixed invokation of make_enum__CPP 2022-11-09 18:15:34 +02:00
Vern Paxson
26dae9a5ae -O gen-C++ maintenance: fixes for attributes & initializing globals 2022-10-14 08:37:45 -05:00
Tim Wojtulewicz
bf98c1e9c8 Merge remote-tracking branch 'origin/topic/vern/CPP-global-init'
* origin/topic/vern/CPP-global-init:
  updates to -O C++ user and maintenance documentation
  use dynamic rather than static initialization of globals for scripts compiled to C++
  safety checking for initializing scripts compiled to C++
  fixes for initializing scripts compiled to C++
  restructured tracking of initializations of globals for script compilation
2022-10-03 09:45:19 -07: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
96668ca0d3 fixes for compiling "standalone" C++ scripts 2022-09-24 14:56:42 -07:00
Vern Paxson
7b8d92b4f6 C++ compilation support for RE /s operator 2022-09-16 16:44:00 -07:00
Matthew Luckie
11f8729997 remove deprecated union and timer types, addressing #1898 2022-02-19 19:17:51 +13:00
Vern Paxson
2f7137999f restored support for incremental compilation of scripts to C++ 2021-12-12 12:36:45 -08:00
Vern Paxson
ffbbacd3b1 switch looping over vectors to use iterators 2021-11-18 08:58:04 -08:00
Vern Paxson
3ea362be91 fix for case-sensitive file systems 2021-11-07 17:54:56 -08:00
Vern Paxson
e1a760e674 extensive rewrite of generation & execution of run-time initialization 2021-11-07 17:00:19 -08:00