Define some WAM index types
author |
Steve Losh <steve@stevelosh.com> |
date |
Fri, 25 Mar 2016 11:49:06 +0000 |
parents |
2579f5d00526
|
children |
d2aa6ee9382a
|
branches/tags |
(none) |
files |
src/wam.lisp |
Changes
--- a/src/wam.lisp Fri Mar 25 11:48:00 2016 +0000
+++ b/src/wam.lisp Fri Mar 25 11:49:06 2016 +0000
@@ -110,10 +110,6 @@
;;;; Heap
-(deftype heap-index ()
- `(integer 0 ,array-total-size-limit))
-
-
(defun heap-debug (addr cell)
(cond
((= +tag-reference+ (cell-type cell))
@@ -154,6 +150,12 @@
;;;; BEHOLD: THE WAM
+(deftype heap-index ()
+ `(integer 0 ,(1- array-total-size-limit)))
+
+(deftype register-index ()
+ '(integer 0 15))
+
(defclass wam ()
((heap
:initform (make-array 16
@@ -172,6 +174,7 @@
:element-type 'heap-cell)
:documentation "An array of the X_i registers.")))
+
(defun make-wam ()
(make-instance 'wam))