lambda-mountain
lambda-mountain copied to clipboard
Garbage Collection
It is time.
- ✓ implement malloc / free
- ✓add parser option to mark functions as hooks (λ:Hook. y)
- ✓ plural calling convention for fragments and functions that are marked as hooks
- ✓ rc::new
- ✓ single structs automatically knows its own Tag
- ✓ inc / del Rc (decrement and destroy if count <= zero)
- ✓ fix cdecl calling convention to work without full knowledge of stack state
- ✓ del hooks in unframe
- ✓ del hooks in function return, if, while
- ✓ increment for Rc, pass through
incfor all other types - sorted order for hook application
- when defining constructors, if a field has a destructor, then the whole type needs a destructor too
- Mov, Del, open, close, push, pop for rc.
- Constructor +1
- CopyMove +1
- discard StackVariable -1
- ✓ variable out of scope -1
- StackVariables should not hold a reference (data in transit is free)?
- Migrate compiler to reference counting, but don't free yet, and log all would-be crash sites
- Fix all compiler reference bugs, then actually reclaim unused memory