# HG changeset patch # User Steve Losh # Date 1462908789 0 # Node ID 0a4b04d4dfa7fd754446cfe06f3273921f623c1d # Parent b073c3d4a7a97331e53670b94a5d4b8699b337b0 Reserve an extra tag bit for the coming optimizations diff -r b073c3d4a7a9 -r 0a4b04d4dfa7 src/wam/constants.lisp --- a/src/wam/constants.lisp Tue May 10 19:05:13 2016 +0000 +++ b/src/wam/constants.lisp Tue May 10 19:33:09 2016 +0000 @@ -3,13 +3,13 @@ (define-constant +cell-width+ 16 :documentation "Number of bits in each cell.") -(define-constant +cell-tag-width+ 2 +(define-constant +cell-tag-width+ 3 :documentation "Number of bits reserved for cell type tags.") (define-constant +cell-value-width+ (- +cell-width+ +cell-tag-width+) :documentation "Number of bits reserved for cell values.") -(define-constant +cell-tag-bitmask+ #b11 +(define-constant +cell-tag-bitmask+ #b111 :documentation "Bitmask for masking the cell type tags.") @@ -24,18 +24,21 @@ :documentation "Sentinel value used in the PC and CP.") -(define-constant +tag-null+ #b00 +(define-constant +tag-null+ #b000 :documentation "An empty cell.") -(define-constant +tag-structure+ #b01 +(define-constant +tag-structure+ #b001 :documentation "A structure cell.") -(define-constant +tag-reference+ #b10 +(define-constant +tag-reference+ #b010 :documentation "A pointer to a cell.") -(define-constant +tag-functor+ #b11 +(define-constant +tag-functor+ #b011 :documentation "A functor.") +(define-constant +tag-constant+ #b100 + :documentation "A constant (i.e. a 0-arity functor).") + (define-constant +register-count+ 2048 :documentation "The number of local registers the WAM has available.")