Tim Wojtulewicz
d2045d1834
Fix clang-tidy bugprone-unused-local-non-trivial-variable warnings
2025-05-27 11:58:27 -07:00
Tim Wojtulewicz
12356a6393
Remove unnecessary #includes in script_opt
2025-05-19 10:25:05 -07:00
Tim Wojtulewicz
f7495831a2
Use const auto references to avoid some copies
2025-04-08 11:01:21 -07:00
Vern Paxson
e1a859c31b
-O gen-C++ support for pattern-to-pattern comparison
2025-03-07 10:32:15 -08:00
Vern Paxson
f48f3af79a
-O gen-C++ support for pattern vector comparisons
2025-03-07 09:55:15 -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
519fec2592
switched CPPCompile::Canonicalize() to take std::string instead of const char*
2024-11-04 08:22:37 -08: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
Vern Paxson
37c1f6641c
script optimization support for "add" and "delete" being expressions
2024-05-29 12:40:06 -07:00
Vern Paxson
7c8c83efc4
factor script optimization Expr AST nodes out of main AST header
2024-04-25 09:15:13 -07:00
Vern Paxson
4e253aae0a
optimize generation of "-O gen-C++" code for table/vector size operations
2024-04-25 09:15:12 -07:00
Vern Paxson
54877e9dec
fixed bug where appending an empty vector to a vector-of-vector's had no effect
2024-03-08 19:09:43 +01:00
Vern Paxson
f573036099
script optimization fixes for pattern tables
2023-12-12 09:45:19 +01:00
Vern Paxson
709d410fcd
regularized (some) types of pointers used in script optimization
2023-12-12 09:45:19 +01:00
Arne Welzel
c8bab6a0ec
IndexType: Add IsPatternIndex(), like IsSubNetIndex()
2023-11-21 10:34:16 +01:00
Vern Paxson
61fcca8482
script optimization support for using strings to index table[pattern] values
2023-11-21 10:34:16 +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
434a7e059d
introduce internal "mask" expression node to avoid mixed-type overloading of "/"
2023-09-26 14:39:26 -07:00
Vern Paxson
80eed34985
-O gen-C++ fixes for compatibility with GH-3249 changes
...
minor -O gen-C++ BTest updates
2023-09-01 12:17:38 -07:00
Vern Paxson
5480dc8869
fixes for compiling function calls that return non-error nil ValPtr's
2023-07-13 13:06:42 -07:00
Tim Wojtulewicz
64b78f6fb9
Use emplace_back over push_back where appropriate
2023-07-07 09:17:05 -07:00
Vern Paxson
b6464814c9
the "Capture" struct is now a class
2023-06-30 09:36:14 +02:00
Vern Paxson
18be4ba91b
-O gen-C++ refinements for BiF failures, negative vector indices, boolean vector operations
2023-06-15 15:07:18 -07:00
Vern Paxson
2e2afa5e11
compile-scripts-to-C++ speedups by switching to raw record access
2023-04-10 11:43:40 -07: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
b7f7d32bf7
Fix for EnumVal's returning their underlying value
...
Change EnumVal()->AsEnum() to zeek_int_t.
2023-03-08 10:10:24 +01:00
Vern Paxson
52775bea89
maintenance updates for -O C++
2022-12-04 17:59:14 -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
Tim Wojtulewicz
2739275b88
Merge remote-tracking branch 'jsoref/spelling-src'
...
* jsoref/spelling-src:
Spelling src
2022-11-11 12:49:15 -07:00
Josh Soref
cd201aa24e
Spelling src
...
These are non-functional changes.
* accounting
* activation
* actual
* added
* addresult
* aggregable
* aligned
* alternatively
* ambiguous
* analysis
* analyzer
* anticlimactic
* apparently
* application
* appropriate
* arithmetic
* assignment
* assigns
* associated
* authentication
* authoritative
* barrier
* boundary
* broccoli
* buffering
* caching
* called
* canonicalized
* capturing
* certificates
* ciphersuite
* columns
* communication
* comparison
* comparisons
* compilation
* component
* concatenating
* concatenation
* connection
* convenience
* correctly
* corresponding
* could
* counting
* data
* declared
* decryption
* defining
* dependent
* deprecated
* detached
* dictionary
* directional
* directly
* directory
* discarding
* disconnecting
* distinguishes
* documentation
* elsewhere
* emitted
* empty
* endianness
* endpoint
* enumerator
* essentially
* evaluated
* everything
* exactly
* execute
* explicit
* expressions
* facilitates
* fiddling
* filesystem
* flag
* flagged
* for
* fragments
* guarantee
* guaranteed
* happen
* happening
* hemisphere
* identifier
* identifies
* identify
* implementation
* implemented
* implementing
* including
* inconsistency
* indeterminate
* indices
* individual
* information
* initial
* initialization
* initialize
* initialized
* initializes
* instantiate
* instantiated
* instantiates
* interface
* internal
* interpreted
* interpreter
* into
* it
* iterators
* length
* likely
* log
* longer
* mainly
* mark
* maximum
* message
* minimum
* module
* must
* name
* namespace
* necessary
* nonexistent
* not
* notifications
* notifier
* number
* objects
* occurred
* operations
* original
* otherwise
* output
* overridden
* override
* overriding
* overwriting
* ownership
* parameters
* particular
* payload
* persistent
* potential
* precision
* preexisting
* preservation
* preserved
* primarily
* probably
* procedure
* proceed
* process
* processed
* processes
* processing
* propagate
* propagated
* prototype
* provides
* publishing
* purposes
* queue
* reached
* reason
* reassem
* reassemble
* reassembler
* recommend
* record
* reduction
* reference
* regularly
* representation
* request
* reserved
* retrieve
* returning
* separate
* should
* shouldn't
* significant
* signing
* simplified
* simultaneously
* single
* somebody
* sources
* specific
* specification
* specified
* specifies
* specify
* statement
* subdirectories
* succeeded
* successful
* successfully
* supplied
* synchronization
* tag
* temporarily
* terminating
* that
* the
* transmitted
* true
* truncated
* try
* understand
* unescaped
* unforwarding
* unknown
* unknowndata
* unspecified
* update
* usually
* which
* wildcard
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2022-11-09 12:08:15 -05: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
AmazingPP
f2bfa61fc6
Add bitshift operators
2022-07-21 11:12:30 +08:00
Tim Wojtulewicz
f624c18383
Deprecate bro_int_t and bro_uint_t
2022-07-12 12:01:23 -07:00
Vern Paxson
56140046d3
final changes for -O C++ feature completeness, mainly "when" statement support
2022-05-12 14:07:36 -07:00
Vern Paxson
bcebe27ced
updates for compile-to-C++
2022-03-23 15:36:36 -07:00
Vern Paxson
fa142438fe
logic (other than in profiling) for assignments that yield separate values
2022-01-07 14:18:42 -08:00
Vern Paxson
52ed9351a9
fixes for compiling vector operations to C++
2021-12-12 12:33:38 -08:00
Tim Wojtulewicz
56b421db9f
Merge remote-tracking branch 'origin/topic/vern/cpp-maint-dec21'
...
* origin/topic/vern/cpp-maint-dec21:
fixes for vector operations
flag globals initialized to opaque values as non-compilable
skip type signatures for lambdas
fix for translating filenames beginning with numbers to C++ variable names
remove unnecessary includes
2021-12-10 13:12:58 -07:00
Vern Paxson
ac74943f26
fixes for vector operations
2021-12-10 09:32:42 -08:00
Vern Paxson
9d884c0285
remove unnecessary includes
2021-12-10 09:27:07 -08:00
Vern Paxson
a1324a882d
update script-to-C++ compilation for new record constructor internals
2021-12-06 09:39:58 -05: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
b2f171ec69
Reformat the world
2021-09-16 15:35:39 -07:00
Tim Wojtulewicz
0b342b7bfa
Merge remote-tracking branch 'origin/topic/vern/CPP-workflow2'
...
* origin/topic/vern/CPP-workflow2:
low-level coding style fixes
support for standalone compiled scripts to export globals with module qualifiers
updates for documentation of functionality for compiling scripts to C++
fixes for standalone C++ scripts making types & variables/functions available
fixed bug limiting availability of load_CPP() BiF
updates to development helper scripts to support new workflow
simpler workflow for -O gen-C++ ; also some hooks for -O gen-standalone-C++
ReplaceBody now deletes a body if the replacement is nil
removal of can't-actually-be-executed code
2021-07-01 08:46:53 -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
2ec2e1e7d7
removal of can't-actually-be-executed code
2021-06-04 16:54:11 -07:00