Commit graph

42 commits

Author SHA1 Message Date
Vern Paxson
a6f9d69c91 fixup! shift much of the internal use of ID* identifier pointers over to IDPtr objects 2025-09-03 11:20:29 -07: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
a3078f3132 Fix clang-tidy modernize-use-emplace findings 2025-06-06 11:43:06 -07:00
Tim Wojtulewicz
cb8c35748a Fix clang-tidy performance-unnecessary-copy-initialization warnings 2025-05-30 08:12:29 -07:00
Tim Wojtulewicz
dbecfb5a2a Fix clang-tidy bugprone-branch-clone warnings 2025-05-27 11:58:27 -07:00
Vern Paxson
4b719ef45a script optimization for record operations sourced (in part) from other records 2024-06-24 09:38:37 +02:00
Vern Paxson
aab5324e20 addressed some Coverity nits 2024-06-04 10:36:36 -07:00
Vern Paxson
9e5977f24e Fix for ZAM inlining of nested function calls with the same parameter names 2024-05-15 17:32:13 -07:00
Vern Paxson
86d3c932b7 make same_expr() functionality accessible as a utility 2024-04-25 09:15:12 -07:00
Vern Paxson
e5bb63c662 fixes & enhancements to location information associated w/ AST nodes & ZAM optimization 2024-02-06 11:03:02 +01:00
Vern Paxson
bae87fb606 script optimization fixes for "concretizing" vector-of-any's 2024-01-15 15:03:56 +01:00
Vern Paxson
709d410fcd regularized (some) types of pointers used in script optimization 2023-12-12 09:45:19 +01:00
Vern Paxson
dd389c0380 splitting off script optimization CSE into its own source files 2023-12-12 09:45:19 +01:00
Vern Paxson
740a087765 reworked AST optimizers analysis of side effects during aggregate operations & calls 2023-12-06 12:26:27 -08:00
Vern Paxson
4ec9a23ce6 retention of superseded AST elements to prevent pointer mis-aliasing 2023-11-10 11:06:16 +01:00
Vern Paxson
b489cfc508 greater ZAM optimization of inlined function calls 2023-11-10 09:57:35 +01:00
Vern Paxson
9bfe18473d allow explicitly marking an identifier as equivalent to special '_' identifier 2023-11-10 09:56:59 +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
8f92e0d39b ZAM fixes for record creation and table indexing potentially having side-effects 2023-09-27 11:38:21 -07:00
Vern Paxson
1ff490b41c more extensive ZAM inlining & compilation of lambdas 2023-07-17 16:31:30 -07:00
Vern Paxson
1b2cd0c767 migrated some raw pointers to smart pointers 2023-07-11 16:04:30 -07:00
Vern Paxson
3f9f47980a updates to ZAM to track recent changes in script semantics 2021-12-04 20:24:39 -05: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
da6ac0b521 switch to ID definition regions; reworked driver functions; more info for reporting uncompilable functions 2021-09-08 10:23:38 -07:00
Tim Wojtulewicz
5e00f78920 Fix a number of Coverity findings
- 1458048: Use-after-free in the SQLite logger
- 1457823: Missing a break statement in script-opt reduction
- 1453966: Dead code in CompHash
- 1445417: Unintialized variable in StaticHash64
- 1437716: Unintialized variables in FileInfo in scan.l
2021-07-02 11:18:19 -07:00
Vern Paxson
b7c9940221 gracefully deal with "eval" exceptions that occur during AST reduction 2021-05-30 17:48:14 -07:00
Vern Paxson
9ba7e95bad fix for tracking the effects of += operations 2021-05-30 17:32:29 -07:00
Jon Siwek
f2d3bf3037 Merge remote-tracking branch 'origin/topic/vern/ast-opt'
- Removed a stray `printf()` from script-opt Reduce code

* origin/topic/vern/ast-opt: (23 commits)
  Tweak minor const-ref/std::move things in script-opt code
  Add alternative 'xform' baseline for test: broker.store.create-failure
  Add explicit return value to Reducer::SameOp()
  fixed AST transformation logic for boolean expressions
  don't know how I overlooked these minor test suite updates
  "opt" btest baseline updates due to AST optimizations changing printed code
  "opt" baseline exceptions due to incompatibility with optimize-AST and -u
  new "opt" btest alternative
  update to "xform" test suite baseline due to recent line number changes
  logic for driving AST optimization when requested
  methods implementing AST optimization (aliasing, constant propagation, CSE)
  helper class checking if common-subexpression elimination opportunity is valid
  helper function for comparing collections of definition points
  track more information about temporary variables
  simplify and tidy up some interfaces
  enable setting "-O optimize-AST" option
  fix for reducing operations on boolean vectors
  control whether checking for type-equivalence generates warnings
  remove unneeded virtual method (same as inherited method)
  accessors for additional Expr subclasses
  ...
2021-03-08 18:33:04 -08:00
Jon Siwek
b66f4ad500 Tweak minor const-ref/std::move things in script-opt code 2021-03-08 15:50:04 -08:00
Jon Siwek
0ef315d143 Add explicit return value to Reducer::SameOp()
Helps tools that don't realize the implications of [[noreturn]] on
the Reporter::InternalError() in this case.
2021-03-08 12:39:39 -08:00
Vern Paxson
77f04935a8 methods implementing AST optimization (aliasing, constant propagation, CSE) 2021-02-27 11:36:15 -08:00
Vern Paxson
34ccd3e417 helper class checking if common-subexpression elimination opportunity is valid 2021-02-27 11:35:01 -08:00
Vern Paxson
ec97c9b042 helper function for comparing collections of definition points 2021-02-27 11:32:06 -08:00
Vern Paxson
64ef7f0eb2 simplify and tidy up some interfaces 2021-02-27 11:07:39 -08:00
Vern Paxson
743f5cfef6 fix includes to have proper prefixes 2021-02-27 08:28:15 -08:00
Vern Paxson
772834e375 whitespace micro-preening 2021-02-05 21:03:10 -08:00
Vern Paxson
6f20c0da3f inlining fix: propagate identifier attributes (such as &is_set) 2021-02-03 16:46:07 -08:00
Jon Siwek
b4cf393475 Adjust some Reducer ref-counting and IntrusivePtr usage 2021-01-14 00:24:12 -08:00
Vern Paxson
03085d45e5 simplified some vestigial complexity I noticed when flipping through diffs 2021-01-10 17:36:03 -08:00
Vern Paxson
607e9950bf implementation for Reduce class - code now links 2021-01-10 14:14:09 -08:00