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
This commit is contained in:
Vern Paxson 2022-11-08 11:56:32 -08:00
parent bc0284aefa
commit ee0a6f6835
40 changed files with 257 additions and 158 deletions

View file

@ -423,13 +423,15 @@ public:
// to map elements in slots/constants/types to record field offsets.
std::vector<int> map;
///// The following three apply to looping over the elements of tables.
///// The following four apply to looping over the elements of tables.
// Frame slots of iteration variables, such as "[v1, v2, v3] in aggr".
// A negative value means "skip assignment".
std::vector<int> loop_vars;
// Their types.
// Their types and whether they're managed.
std::vector<TypePtr> loop_var_types;
std::vector<bool> lvt_is_managed;
// Type associated with the "value" entry, for "k, value in aggr"
// iteration.