Commit graph

153 commits

Author SHA1 Message Date
Tim Wojtulewicz
9b15db25f6 Reorder fields in some classes for more compact memory layout 2021-07-14 14:59:49 -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
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
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
7904701ffb another set of tweaks per review comments 2021-06-09 09:41:41 -07:00
Vern Paxson
d4eb0224a1 addressed a number of code review comments 2021-06-07 10:52:19 -07:00
Vern Paxson
4ecf70f515 updates for documentation of functionality for compiling scripts to C++ 2021-06-04 17:15:15 -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
e722607bd9 updates to development helper scripts to support new workflow 2021-06-04 17:02:43 -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
2ec2e1e7d7 removal of can't-actually-be-executed code 2021-06-04 16:54:11 -07:00
Vern Paxson
47783cb9fd support "any" coercions for "-O gen-C++" 2021-06-02 15:58:16 -07:00
Vern Paxson
d8213246ea error propagation fix for AST reduction 2021-06-01 14:13:09 -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
8044926e00 employ explicit conversions to/from "any" and "vector of any" types 2021-05-30 18:05:11 -07:00
Vern Paxson
292bd1b671 more robust treatment of arithmetic coercions 2021-05-30 18:02:30 -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
9a429808ab directly construct records of known types, rather than requiring coercion 2021-05-30 17:47:28 -07:00
Vern Paxson
9900a3468c support for profiling function bodies w/o needing accompanying ScriptFunc object 2021-05-30 17:44:24 -07:00
Vern Paxson
143d306883 fix for AST optimization altering top-level body statement 2021-05-30 17:37:44 -07:00
Vern Paxson
22af54dda2 fix for analyzing variable usage inside of table initializers 2021-05-30 17:36:41 -07:00
Vern Paxson
86aafb7c84 fix for inlining type-based switch statements 2021-05-30 17:36:07 -07:00
Vern Paxson
9ba7e95bad fix for tracking the effects of += operations 2021-05-30 17:32:29 -07:00
Vern Paxson
efd03d41f8 convert scopes to be managed using IntrusivePtr's 2021-05-30 17:20:29 -07:00
Vern Paxson
f2f041b63b various accessors used by ZAM compiler 2021-05-30 17:16:03 -07:00
Vern Paxson
e697f351ad fixed cut-and-paste botch (redundant line of code) 2021-05-09 14:42:03 -07:00
Jon Siwek
1b825c51de Fix LGTM warnings in script_opt/CPP code
i.e. shadowed variables and "missing return values" (scare quotes)
2021-05-06 12:06:57 -07:00
Vern Paxson
ac257e4a86 bug fixes for stand-alone compiles with empty records 2021-05-05 19:32:30 -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
c116b2b8ad better initial workflow, thanks to Jon Siwek 2021-05-05 18:52:06 -07:00
Vern Paxson
4a1d5adcf4 remove optimization no longer needed 2021-05-05 17:08:18 -07:00
Vern Paxson
93e9801f89 removed redundant Traverse invocation 2021-05-05 16:55:05 -07:00
Vern Paxson
94ac72cd84 style nit: removed std:: where not needed due to "using" clause 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
e200016200 first cut at embedding filenames in C++ function names - for Justin to test 2021-05-05 16:55:05 -07:00
Vern Paxson
b5b87d0b15 fixes for personal build scripts - will go away once workflow is streamlined 2021-05-05 16:55:05 -07:00
Vern Paxson
2fdb8a1cc8 whoops removed a std:: from generated 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
bbe5ab39f6 porting fixes from Justin 2021-05-05 16:55:04 -07:00
Vern Paxson
22d060d461 documenting poor run-time error messages 2021-05-05 16:55:04 -07:00
Vern Paxson
605d636d94 README documentation 2021-05-05 16:55:04 -07:00
Vern Paxson
f6c841c737 minor tweaks tidyness tweaks 2021-05-05 16:55:04 -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
158e82a2c1 expand profiling to include values to which globals are assigned 2021-05-05 16:55:04 -07:00
Vern Paxson
dd05beff50 fixed missing profiling for ?$ operator 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
5efba9e115 Stmt tag for compiled-to-C++; Inliner knows to avoid it 2021-05-05 16:55:04 -07:00