rosella/libcompiler
Jesse D. McDonald 9e789dce14 First version of simplified garbage collector.
For now, this GC is non-generational, and much slower than the old
version. It tracks objects by a fixed object ID rather than changeable
memory address. Small object (eight bytes or less) are stored directly
in the array, indexed by object ID, while larger object are allocated
with malloc() (for now) and stored in the array as a pointer. Object
IDs are stored as 32-bit integers, even on 64-bit platforms.

Advantages:
- Simpler design
- Requires less memory on 64-bit platforms
- Object IDs don't change when running the GC
- No need to store a random "hash" value in vectors/strings/structs
- Can hash pairs by identity, not just value
- Can move objects individually, without fixing up all references
- Can determine object type from value, without another memory access

Disadvantages:
- Lower initial performance (non-generational, relies on malloc())
- 32-bit values place a (high) limit on total number of objects
- Must explicitly free unreachable object IDs after GC
2012-07-14 13:47:58 -05:00
..
compiler.scm Implement simple self-hosting compiler (src/compiler.rls). 2012-07-14 13:47:39 -05:00
mapper.scm Implement simple self-hosting compiler (src/compiler.rls). 2012-07-14 13:47:39 -05:00
optimizer.scm Implement simple self-hosting compiler (src/compiler.rls). 2012-07-14 13:47:39 -05:00
primitives.scm First version of simplified garbage collector. 2012-07-14 13:47:58 -05:00
reader.scm Implement simple self-hosting compiler (src/compiler.rls). 2012-07-14 13:47:39 -05:00
simplifier.scm Implement simple self-hosting compiler (src/compiler.rls). 2012-07-14 13:47:39 -05:00
utilities.scm Implement simple self-hosting compiler (src/compiler.rls). 2012-07-14 13:47:39 -05:00
writer.scm First version of simplified garbage collector. 2012-07-14 13:47:58 -05:00