17 lines
718 B
Org Mode
17 lines
718 B
Org Mode
Ok this actually sounds similar to my soluition. I have a variation on the smalltalk model,
|
|
|
|
|
|
** Reality Engine VM
|
|
|
|
I imagine that this is running on a turing machine with 2 stacks (one operation, one stack); harvard arch.
|
|
|
|
when a function gets called the function allocates N many "locals" onto the tape,
|
|
primitves are just the raw values,
|
|
complex values in locals are stored as ptrs to the positions in memory following the locals array.
|
|
|
|
Instead of just arrays, each array is wrapped in a linked list,
|
|
so its a ptr to the next link followed by the size followed by an array of raw data.
|
|
When modified it just adds the new values to the end of the list.
|
|
The list then can be "collapsed" back into a simple array.
|
|
|