sketch out unified RDI_Variable to replace RDI_GlobalVariable, RDI_ThreadVariable, RDI_Local, and RDI_Constant, & plug into new RDI structured namespaces

This commit is contained in:
Ryan Fleury committed 2026-03-09 15:15:48 -07:00
1 parent 408b3af27c
commit 5badc7f325
4 files changed
+83 -41

No files matched your search

-38
View File
@@ -1521,44 +1521,6 @@ p2r_convert(Arena *arena, P2R_ConvertParams *params)
lane_sync();
RDIM_SrcFileChunkList all_src_files = *all_src_files__sequenceless;
//////////////////////////////////////////////////////////////
//- rjf: gather user-defined namespaces
//
ProfScope("gather user-defined namespaces")
{
U64 *sym_take_counter = lane_idx() == 0 ? push_array(scratch.arena, U64, 1) : 0;
lane_sync_u64(&sym_take_counter, 0);
for(;;)
{
//- rjf: take next sym
U64 sym_idx = ins_atomic_u64_inc_eval(sym_take_counter) - 1;
if(sym_idx >= all_syms_count)
{
break;
}
//- rjf: unpack sym
Temp scratch = scratch_begin(&arena, 1);
CV_SymParsed *sym = all_syms[sym_idx];
//- rjf: iterate namespaces
for(CV_RecIter iter = {0}; cv_rec_next(sym->data, &sym->sym_ranges, 0, &iter);)
{
switch(iter.kind)
{
default:{}break;
case CV_SymKind_UNAMESPACE:
{
String8 string = str8_cstring_capped(iter.struct_base, iter.opl);
// TODO(rjf)
}break;
}
}
scratch_end(scratch);
}
}
//////////////////////////////////////////////////////////////
//- rjf: types pass 1: produce type forward resolution map
//