This commit is contained in:
Ryan Fleury
2026-04-20 09:57:31 -07:00
parent a1978d9fe9
commit b7644a1d34
+1
View File
@@ -37,6 +37,7 @@
//
// [ ] we keep flat tables of symbols, *but*, "sort" by containing unit. unit -> [f, opl) of procedures, globals, threadvars, constants, etc.
// [ ] container can also be a unit, so you can also go from procedure/global/tvar -> unit
// [ ] *OR*, because we can guarantee that the units themselves will be sorted from lowest -> highest in all symbol tables, we can simply binary search the unit table (small) with a symbol's index to find its corresponding unit. that way, no need to duplicate e.g. namespaces and so on across units. and actually, we have to do this, because containers can be types, and those cannot be unit-locked.
//
// [ ] symbols only store their *partly-qualified name*, e.g. `x` for A::B::C::x
// [ ] default name maps look up *partly-qualified names*