nibi-lang / nibi

An interpreted list processing language inspired by Lisp
GNU Affero General Public License v3.0
3 stars 2 forks source link

Locator removal, external indexing #103

Closed bosley closed 1 year ago

bosley commented 1 year ago

Since all cells are heap stored, there is no reason we need to embed the locators into the cell themselves. If we have an external mechanism that ties a locator to a cell memory address we can reference the locators without moving them around with the cell. This means that the interpreter object could store them on their behalf, reducing the cell size.

bosley commented 1 year ago

Reduced to the same size as if we used an indicator number to index into by simply switching the shared_ptr usage for locator_ptr to the ref_counted_c

bosley commented 1 year ago

https://github.com/nibi-lang/nibi/pull/113