[movitz-cvs] CVS movitz
ffjeld
ffjeld at common-lisp.net
Wed Nov 8 08:57:05 UTC 2006
Update of /project/movitz/cvsroot/movitz
In directory clnet:/tmp/cvs-serv1708
Modified Files:
compiler-types.lisp
Log Message:
Teach compiler about the ratio type.
--- /project/movitz/cvsroot/movitz/compiler-types.lisp 2005/08/21 23:29:44 1.25
+++ /project/movitz/cvsroot/movitz/compiler-types.lisp 2006/11/08 08:57:05 1.26
@@ -10,7 +10,7 @@
;;;; Author: Frode Vatvedt Fjeld <frodef at acm.org>
;;;; Created at: Wed Sep 10 00:40:07 2003
;;;;
-;;;; $Id: compiler-types.lisp,v 1.25 2005/08/21 23:29:44 ffjeld Exp $
+;;;; $Id: compiler-types.lisp,v 1.26 2006/11/08 08:57:05 ffjeld Exp $
;;;;
;;;;------------------------------------------------------------------
@@ -233,7 +233,7 @@
;;;
(defparameter *tb-bitmap*
- '(hash-table character function cons keyword symbol vector array integer :tail)
+ '(hash-table character function cons keyword symbol vector array integer ratio :tail)
"The union of these types must be t.")
(defun basic-typep (x type)
@@ -255,7 +255,9 @@
(fixnum
(typep x 'movitz-fixnum))
(bignum
- (typep x 'movitz-bignum))))
+ (typep x 'movitz-bignum))
+ (ratio
+ (typep x 'movitz-ratio))))
(defun type-code (first-type &rest types)
"Find the code (a bitmap) for (or , at types)."
@@ -364,7 +366,7 @@
(or (type-code-p 'integer code)
(and integer-range
(numscope-memberp integer-range (movitz-bignum-value x)))))
- (t (dolist (bt '(symbol character function cons hash-table vector)
+ (t (dolist (bt '(symbol character function cons hash-table vector ratio)
(error "Cant decide typep for ~S." x))
(when (basic-typep x bt)
(return (type-code-p bt code))))))
More information about the Movitz-cvs
mailing list