stage2: use indexes for Decl objects

Rather than allocating Decl objects with an Allocator, we instead allocate
them with a SegmentedList. This provides four advantages:
 * Stable memory so that one thread can access a Decl object while another
   thread allocates additional Decl objects from this list.
 * It allows us to use u32 indexes to reference Decl objects rather than
   pointers, saving memory in Type, Value, and dependency sets.
 * Using integers to reference Decl objects rather than pointers makes
   serialization trivial.
 * It provides a unique integer to be used for anonymous symbol names,
   avoiding multi-threaded contention on an atomic counter.
This commit is contained in:
Andrew Kelley
2022-04-19 21:51:08 -07:00
parent 4f527e5d36
commit f7596ae942
31 changed files with 2584 additions and 2181 deletions

File diff suppressed because it is too large Load Diff