lazily-evaluate meta evaluations on an as-needed basis - with callstacks in particular it is just too expensive to do all threads every frame up-front

This commit is contained in:
Ryan Fleury
2024-09-19 14:38:24 -07:00
parent 7bec50db75
commit cc61df0c7b
4 changed files with 201 additions and 163 deletions
+2
View File
@@ -118,6 +118,8 @@
#define DeferLoop(begin, end) for(int _i_ = ((begin), 0); !_i_; _i_ += 1, (end))
#define DeferLoopChecked(begin, end) for(int _i_ = 2 * !(begin); (_i_ == 2 ? ((end), 0) : !_i_); _i_ += 1, (end))
#define EachIndex(it, count) (U64 it = 0; it < (count); it += 1)
#define EachElement(it, array) (U64 it = 0; it < ArrayCount(array); it += 1)
#define EachEnumVal(type, it) (type it = (type)0; it < type##_COUNT; it = (type)(it+1))
#define EachNonZeroEnumVal(type, it) (type it = (type)1; it < type##_COUNT; it = (type)(it+1))