Start working on L2
This changes the compilation process to keep track of register types, which
we'll need to distinguish between local/permanent variables. It also makes
things a bit more obvious/safe when compiling argument registers because they're
tagged explicitly.
This also changes up the actual running of the code by actually using
CALL/PROCEED, though it's not fully fleshed out yet.
author |
Steve Losh <steve@stevelosh.com> |
date |
Wed, 13 Apr 2016 17:38:57 +0000 |
parents |
6138ec555cde |
children |
1dd07907df49 |
(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 ()
; either an address or the sentinal
`(integer 0 ,(1- +code-limit+)))
(deftype opcode ()
'(integer 0 12))