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

Frode Vatvedt Fjeld ffjeld at common-lisp.net
Fri Jul 16 00:02:04 UTC 2004


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

Modified Files:
	inspect.lisp 
Log Message:
Added %make-bignum.

Date: Thu Jul 15 17:02:03 2004
Author: ffjeld

Index: movitz/losp/muerte/inspect.lisp
diff -u movitz/losp/muerte/inspect.lisp:1.21 movitz/losp/muerte/inspect.lisp:1.22
--- movitz/losp/muerte/inspect.lisp:1.21	Thu Jul 15 14:07:04 2004
+++ movitz/losp/muerte/inspect.lisp	Thu Jul 15 17:02:03 2004
@@ -10,7 +10,7 @@
 ;;;; Author:        Frode Vatvedt Fjeld <frodef at acm.org>
 ;;;; Created at:    Fri Oct 24 09:50:41 2003
 ;;;;                
-;;;; $Id: inspect.lisp,v 1.21 2004/07/15 21:07:04 ffjeld Exp $
+;;;; $Id: inspect.lisp,v 1.22 2004/07/16 00:02:03 ffjeld Exp $
 ;;;;                
 ;;;;------------------------------------------------------------------
 
@@ -306,6 +306,16 @@
       (:movl :ecx (:eax :edx #.movitz:+other-type-offset+))
       (:subl 4 :edx)
       (:jnc 'copy-bignum-loop))))
+
+(defun %make-bignum (bigits)
+  (macrolet
+      ((do-it ()
+	 `(with-inline-assembly (:returns :eax)
+	    (:compile-two-forms (:eax :ecx) (malloc-non-pointer-words (1+ bigits)) bigits)
+	    (:shll 16 :ecx)
+	    (:orl ,(movitz:tag :bignum 0) :ecx)
+	    (:movl :ecx (:eax ,movitz:+other-type-offset+)))))
+    (do-it)))
 
 (defun print-bignum (x)
   (check-type x bignum)





More information about the Movitz-cvs mailing list