Commit graph

84 commits

Author SHA1 Message Date
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
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
b5b58b0a3a "-O compile-all" option to specify compilation of inlined functions 2021-06-01 09:24:17 -07:00
Vern Paxson
7855557e92 compile inlined functions if they're also used indirectly 2021-06-01 09:05:01 -07:00
Vern Paxson
143d306883 fix for AST optimization altering top-level body statement 2021-05-30 17:37:44 -07:00
Vern Paxson
efd03d41f8 convert scopes to be managed using IntrusivePtr's 2021-05-30 17:20:29 -07:00
Vern Paxson
e697f351ad fixed cut-and-paste botch (redundant line of code) 2021-05-09 14:42:03 -07:00
Vern Paxson
2b0f1c9d6e remove -O force-C++, and also some inadvertently replicated code 2021-05-05 19:11:17 -07:00
Vern Paxson
93e9801f89 removed redundant Traverse invocation 2021-05-05 16:55:05 -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
24e92fa54a hooks for activating the compiler & associated BiF 2021-05-05 16:55:04 -07:00
Vern Paxson
863be9436b the bulk of the compiler 2021-05-05 16:55:04 -07:00
Vern Paxson
72f62f398a FuncInfo now tracks priority; some tidying/widening of its accessors 2021-05-05 16:55:04 -07:00
Vern Paxson
0b45ff2179 optionally hash original, not extended, form of records for profiling
profile types associated with global initializations
incorporate type name, if present, into type hash
2021-04-01 20:20:12 -07:00
Jon Siwek
fb33597372 Merge branch 'master' into topic/vern/cpp-prep-profiling 2021-03-31 12:02:17 -07:00
Vern Paxson
297adf3486 function profiling rewritten - more detailed info, supports global profiling 2021-03-25 16:17:32 -07:00
Vern Paxson
e5a0b2c04c whitespace adjustment 2021-03-24 21:52:20 -07:00
Vern Paxson
95b89be571 put global statements into a quasi-function to support script optimization 2021-03-24 21:22:03 -07:00
Vern Paxson
7294bb34be fixes for propagating optimization options, and pruning script function analysis 2021-03-18 08:40:48 -07:00
Vern Paxson
faf1b65ec4 logic for driving AST optimization when requested 2021-02-27 11:39:44 -08:00
Vern Paxson
64ef7f0eb2 simplify and tidy up some interfaces 2021-02-27 11:07:39 -08:00
Vern Paxson
d38cc04e83 enable setting "-O optimize-AST" option 2021-02-27 10:59:27 -08:00
Vern Paxson
94b85e3527 driver glue for invoking use-def construction 2021-02-06 10:58:56 -08:00
Vern Paxson
a067f4c5b0 some tidying with smart pointers 2021-02-06 09:49:37 -08:00
Vern Paxson
12c9b5ede5 flag/environment variable for dumping use-defs 2021-02-05 22:26:24 -08:00
Vern Paxson
cb9a959978 tidier memory management 2021-02-02 17:00:28 -08:00
Vern Paxson
2f0d02c878 driver class for generating RDs across an AST, and logic to invoke it 2021-01-23 10:54:43 -08:00
Vern Paxson
732633ebb4 option handling for new -u/-uu flag for reporting usage issues 2021-01-23 10:25:06 -08:00
Jon Siwek
12f9ba5f37 Guard against nullptr deref after AST-reduction consistency checks
Addresses Coverity issue 1443771
2021-01-19 11:22:52 -08:00
Jon Siwek
81fa7f7e3d Switch AnalyOpt::only_func to optional<string>
Nothing of consequence; may help express meaning and memory management.
2021-01-13 13:19:46 -08:00
Vern Paxson
e2edb622ac logic for driving the script optimization process 2021-01-10 14:18:11 -08:00
Jon Siwek
7b2ee2514e Tweak FuncInfo memory management
Idea being for everything to be automatically released when process
exits just so there's less potential noise from leak profilers.
2020-12-13 17:06:57 -08:00
Vern Paxson
c42586af2c inlining of Zeek script functions 2020-11-19 16:16:59 -08:00