src/wam/types.lisp @ 6138ec555cde

Change functor representation

Functors are now (symbol . arity) pairs in the functor table, and the functor
cells simply contain the address into the table and nothing more.
author Steve Losh <steve@stevelosh.com>
date Tue, 05 Apr 2016 15:00:28 +0000
parents 6dc3f4e03454
children fdb771cc2b8c
(in-package #:bones.wam)

(deftype heap-cell ()
  `(unsigned-byte ,+cell-width+))

(deftype heap-cell-tag ()
  `(unsigned-byte ,+cell-tag-width+))

(deftype heap-cell-value ()
  `(unsigned-byte ,+cell-value-width+))


(deftype heap-index ()
  `(integer 0 ,(1- +heap-limit+)))

(deftype register-index ()
  `(integer 0 ,(1- +register-count+)))

(deftype functor-index ()
  `(integer 0 ,(1- array-total-size-limit)))


(deftype arity ()
  `(integer 0 ,+maximum-arity+))

(deftype functor ()
  '(cons symbol arity))


(deftype code-word ()
  `(unsigned-byte ,+code-word-size+))

(deftype code-index ()
  `(integer 0 ,(1- +code-limit+)))

(deftype opcode ()
  '(integer 0 12))