Add #no_capture args: ..T to reuse the backing array stack memory

This commit is contained in:
gingerBill
2024-07-14 11:39:05 +01:00
parent f98a7b84df
commit edc793d7c1
12 changed files with 136 additions and 57 deletions
+7
View File
@@ -181,6 +181,11 @@ char const *ProcCheckedState_strings[ProcCheckedState_COUNT] {
"Checked",
};
struct NoCaptureData {
Type *slice_type; // ..elem_type
isize max_count;
};
// DeclInfo is used to store information of certain declarations to allow for "any order" usage
struct DeclInfo {
DeclInfo * parent; // NOTE(bill): only used for procedure literals at the moment
@@ -219,6 +224,8 @@ struct DeclInfo {
Array<BlockLabel> labels;
Array<NoCaptureData> no_captures;
// NOTE(bill): this is to prevent a race condition since these procedure literals can be created anywhere at any time
struct lbModule *code_gen_module;
};