THE CONCATENING
This patch does something I've been dreading since I started: it concatenates
the registers, stack, and heap into one single big-ass array called the store.
This is how the original WAM was laid out (actually the original WAM has
EVERYTHING in one giant block of memory, but let's not get carried away here).
I was hoping I wouldn't have to do this, because the code reads a lot nicer when
these things are separate, but after reading ahead in the book I think I'm
pretty sure it had to be done.
The upside here is that now dereferencing things can be done without caring
where they live -- it's all just pointers into this giant array. For example:
a register could refer to a stack cell, or a heap cell could point at a stack
cell. The downside is that the stack is no longer adjustable (and things are
a bit less safe).
author |
Steve Losh <steve@stevelosh.com> |
date |
Sun, 08 May 2016 21:25:08 +0000 |
parents |
c60cac27a0a7 |
children |
cb324d188513 |
eeeee eeeee eeeee eeee eeeee
8 8 8 88 8 8 8 8 "
8eee8e 8 8 8e 8 8eee 8eeee
88 8 8 8 88 8 88 88
88eee8 8eee8 88 8 88ee 8ee88
Bones is a logic programming library for Common Lisp.
**Bones is still in development, don't actually try to use this for anything
yet. It should be usable by mid-2016.**
* **License:** MIT/X11
* **Documentation:** <http://sjl.bitbucket.org/bones/>
* **Code:** <http://bitbucket.org/sjl/bones/>
* **Issues:** <http://bitbucket.org/sjl/bones/issues/>
![I don't know what that means](https://i.imgur.com/EWPGAHa.gif)
License
-------
Copyright 2016 Steve Losh and contributors. Licensed as **MIT/X11**.