# HG changeset patch # User Steve Losh # Date 1471997536 0 # Node ID f7cc5624141a46800ec165f51b8a8294f32e0625 # Parent 0645e41d9d0e186e2a973ba6b9653e328750cdfc Doc tweaks diff -r 0645e41d9d0e -r f7cc5624141a docs/02-usage.markdown --- a/docs/02-usage.markdown Tue Aug 23 23:44:21 2016 +0000 +++ b/docs/02-usage.markdown Wed Aug 24 00:12:16 2016 +0000 @@ -6,6 +6,7 @@ ## Hello, Temperance ## Databases ## Rules +## Anonymous Variables ## Queries ## Lists ## Logic Frames diff -r 0645e41d9d0e -r f7cc5624141a src/wam.lisp --- a/src/wam.lisp Tue Aug 23 23:44:21 2016 +0000 +++ b/src/wam.lisp Wed Aug 24 00:12:16 2016 +0000 @@ -138,10 +138,12 @@ ;;; value is bound to. Unbound variables contain their own store index as ;;; a value. ;;; -;;; FUNCTOR cell values are a pointer to a `(fname . arity)` cons. +;;; FUNCTOR cell values are a pointer to a Lisp symbol. The next cell after +;;; a FUNCTOR cell is always a LISP-OBJECT cell with the fuctor's arity. ;;; ;;; CONSTANT cells are the same as functor cells, except that they always happen -;;; to refer to functors with an arity of zero. +;;; to refer to functors with an arity of zero and therefore don't need to be +;;; followed by another cell for the arity. ;;; ;;; LIST cell values are an index into the store, pointing at the first of two ;;; consecutive cells. The first cell is the car of the list, the second one is @@ -296,8 +298,7 @@ ;;;; Heap ;;; The WAM heap is all the memory left in the store after the local registers -;;; and stack have been accounted for. Because the store is adjustable and the -;;; heap lives at the end of it, the heap can grow if necessary. +;;; and stack have been accounted for. ;;; ;;; We reserve the first address in the heap as a sentinel, as an "unset" value ;;; for various pointers into the heap.