[movitz-cvs] CVS update: movitz/losp/muerte/typep.lisp

Frode Vatvedt Fjeld ffjeld at common-lisp.net
Wed Jul 7 09:42:37 UTC 2004


Update of /project/movitz/cvsroot/movitz/losp/muerte
In directory common-lisp.net:/tmp/cvs-serv22817/losp/muerte

Modified Files:
	typep.lisp 
Log Message:
I've been offline for a while, but working sometimes on this file.
Mostly it's about the migration to the new movitz-basic-vectors.
Date: Wed Jul  7 02:42:36 2004
Author: ffjeld

Index: movitz/losp/muerte/typep.lisp
diff -u movitz/losp/muerte/typep.lisp:1.19 movitz/losp/muerte/typep.lisp:1.20
--- movitz/losp/muerte/typep.lisp:1.19	Thu Jun 17 12:44:49 2004
+++ movitz/losp/muerte/typep.lisp	Wed Jul  7 02:42:36 2004
@@ -9,7 +9,7 @@
 ;;;; Created at:    Fri Dec  8 11:07:53 2000
 ;;;; Distribution:  See the accompanying file COPYING.
 ;;;;                
-;;;; $Id: typep.lisp,v 1.19 2004/06/17 19:44:49 ffjeld Exp $
+;;;; $Id: typep.lisp,v 1.20 2004/07/07 09:42:36 ffjeld Exp $
 ;;;;                
 ;;;;------------------------------------------------------------------
 
@@ -99,9 +99,47 @@
 	 (make-vector-typep (element-type)
 	   (assert (= 1 (- (bt:slot-offset 'movitz::movitz-vector 'movitz::element-type)
 			   (bt:slot-offset 'movitz::movitz-vector 'movitz::type))))
+	   (let ((old-type-code (dpb (bt:enum-value 'movitz::movitz-vector-element-type element-type)
+				     (byte 8 8)
+				     (movitz:tag :vector)))
+		 (type-code (dpb (bt:enum-value 'movitz::movitz-vector-element-type element-type)
+				 (byte 8 8)
+				 (movitz:tag :basic-vector))))
+	     `(with-inline-assembly-case ()
+;;;		(do-case (:boolean-branch-on-false)
+;;;		  (:compile-form (:result-mode :eax) ,object)
+;;;		  (:leal (:eax ,(- (movitz::tag :other))) :ecx)
+;;;		  (:testb 7 :cl)
+;;;		  (:branch-when :boolean-zf=0)
+;;;		  (:cmpw ,type-code
+;;;			 (:eax ,(bt:slot-offset 'movitz::movitz-vector 'movitz::type)))
+;;;		  (:branch-when :boolean-zf=0))
+;;;		(do-case (:boolean-branch-on-true :same :labels (vector-typep-failed))
+;;;		  (:compile-form (:result-mode :eax) ,object)
+;;;		  (:leal (:eax ,(- (movitz::tag :other))) :ecx)
+;;;		  (:testb 7 :cl)
+;;;		  (:jnz 'vector-typep-failed)
+;;;		  (:cmpw ,type-code
+;;;			 (:eax ,(bt:slot-offset 'movitz::movitz-vector 'movitz::type)))
+;;;		  (:branch-when :boolean-zf=1)
+;;;		  vector-typep-failed)
+		(do-case (t :boolean-zf=1 :labels (vector-typep-failed))
+		  (:compile-form (:result-mode :eax) ,object)
+		  (:leal (:eax ,(- (movitz::tag :other))) :ecx)
+		  (:testb 7 :cl)
+		  (:jnz 'vector-typep-failed)
+		  (:cmpw ,old-type-code
+			 (:eax ,(bt:slot-offset 'movitz::movitz-vector 'movitz::type)))
+		  (:je 'vector-typep-failed)
+		  (:cmpw ,type-code
+			 (:eax ,(bt:slot-offset 'movitz::movitz-vector 'movitz::type)))
+		 vector-typep-failed))))
+	 (make-basic-vector-typep (element-type)
+	   (assert (= 1 (- (bt:slot-offset 'movitz::movitz-vector 'movitz::element-type)
+			   (bt:slot-offset 'movitz::movitz-vector 'movitz::type))))
 	   (let ((type-code (dpb (bt:enum-value 'movitz::movitz-vector-element-type element-type)
 				 (byte 8 8)
-				 (movitz:tag :vector))))
+				 (movitz:tag :basic-vector))))
 	     `(with-inline-assembly-case ()
 		(do-case (:boolean-branch-on-false)
 		  (:compile-form (:result-mode :eax) ,object)
@@ -119,7 +157,7 @@
 		  (:cmpw ,type-code
 			 (:eax ,(bt:slot-offset 'movitz::movitz-vector 'movitz::type)))
 		  (:branch-when :boolean-zf=1)
-		  vector-typep-failed)
+		 vector-typep-failed)
 		(do-case (t :boolean-zf=1 :labels (vector-typep-failed))
 		  (:compile-form (:result-mode :eax) ,object)
 		  (:leal (:eax ,(- (movitz::tag :other))) :ecx)
@@ -127,7 +165,7 @@
 		  (:jnz 'vector-typep-failed)
 		  (:cmpw ,type-code
 			 (:eax ,(bt:slot-offset 'movitz::movitz-vector 'movitz::type)))
-		  vector-typep-failed))))
+		 vector-typep-failed))))
 	 (make-function-typep (funobj-type)
 	   (assert (= 1 (- (bt:slot-offset 'movitz::movitz-funobj 'movitz::funobj-type)
 			   (bt:slot-offset 'movitz::movitz-funobj 'movitz::type))))
@@ -240,9 +278,9 @@
 		((vector array)
 		 `(typep ,object '(or old-vector basic-vector)))
 		(simple-vector
-		 (make-vector-typep :any-t))
+		 (make-basic-vector-typep :any-t))
 		(string
-		 (make-vector-typep :character))
+		 (make-basic-vector-typep :character))
 		(vector-u8
 		 (make-vector-typep :u8))
 		(vector-u16





More information about the Movitz-cvs mailing list