xo-interpreter: prep for xo-symboltable
This commit is contained in:
parent
78c6c5cde9
commit
7b82ace806
2 changed files with 15 additions and 4 deletions
17
README.md
17
README.md
|
|
@ -1,3 +1,16 @@
|
||||||
# xo-alloc -- arena allocator with rudimentary GC support
|
# xo-alloc -- arena allocator and incremental garbage collector
|
||||||
|
|
||||||
Xo-alloc is a lightweight arena allocator
|
# Rules for writing garbage-collected classes.
|
||||||
|
|
||||||
|
Topics
|
||||||
|
* allocation - allocate Objects (inheriting xo::Object) before owned scratch space.
|
||||||
|
Can relax this if/when abandon the bad-for-locality use of two pointers
|
||||||
|
into to-space to keep track of grey objects. Want to use stack anyway
|
||||||
|
so we can do depth-first search.
|
||||||
|
* destructors - can omit except for finalization
|
||||||
|
* assignment - MUST USE Object::assign_member() to assign pointers to gc-owned memory.
|
||||||
|
Only necessary for old->new pointers, so don't need to worry about this
|
||||||
|
for initialization.
|
||||||
|
* finalization - not supported (yet)
|
||||||
|
|
||||||
|
- padding - use IAlloc::with_padding(z) for hand-allocated objects.
|
||||||
|
|
|
||||||
|
|
@ -191,8 +191,6 @@ namespace xo {
|
||||||
**/
|
**/
|
||||||
virtual std::size_t _shallow_size() const = 0;
|
virtual std::size_t _shallow_size() const = 0;
|
||||||
|
|
||||||
// TODO: _shallow_move() also overwrite *this with gc-only forwarding object point to C
|
|
||||||
|
|
||||||
/** if subject is allocated by GC:
|
/** if subject is allocated by GC:
|
||||||
* - create copy C in to-space
|
* - create copy C in to-space
|
||||||
* - destination C will be nursery|tenured depending on location of this.
|
* - destination C will be nursery|tenured depending on location of this.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue