Reserve an extra tag bit for the coming optimizations
author |
Steve Losh <steve@stevelosh.com> |
date |
Tue, 10 May 2016 19:33:09 +0000 |
parents |
b073c3d4a7a9
|
children |
12b69e64ece1
|
branches/tags |
(none) |
files |
src/wam/constants.lisp |
Changes
--- 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.")