Update of /project/movitz/cvsroot/movitz/losp/muerte In directory clnet:/tmp/cvs-serv17019
Modified Files: arithmetic-macros.lisp Log Message: Make (in principle) all macros compiled into run-time. There are notable exceptions still, which need to be worked on.
--- /project/movitz/cvsroot/movitz/losp/muerte/arithmetic-macros.lisp 2007/11/19 20:39:52 1.20 +++ /project/movitz/cvsroot/movitz/losp/muerte/arithmetic-macros.lisp 2008/03/17 17:24:42 1.21 @@ -10,7 +10,7 @@ ;;;; Author: Frode Vatvedt Fjeld frodef@acm.org ;;;; Created at: Sat Jul 17 13:42:46 2004 ;;;; -;;;; $Id: arithmetic-macros.lisp,v 1.20 2007/11/19 20:39:52 ffjeld Exp $ +;;;; $Id: arithmetic-macros.lisp,v 1.21 2008/03/17 17:24:42 ffjeld Exp $ ;;;; ;;;;------------------------------------------------------------------
@@ -24,9 +24,12 @@
(defmacro number-double-dispatch ((x y) &rest clauses) `(let ((x ,x) (y ,y)) - (cond ,@(loop for ((x-type y-type) . then-body) in clauses - collect `((and (typep x ',x-type) (typep y ',y-type)) - ,@then-body)) + (cond ,@(mapcar (lambda (clause) + (destructuring-bind ((x-type y-type) . then-body) + clause + `((and (typep x ',x-type) (typep y ',y-type)) + ,@then-body))) + clauses) (t (error "Not numbers or not implemented: ~S or ~S." x y)))))
@@ -517,7 +520,7 @@
;;;
-(defmacro define-number-relational (name 2op-name condition &key (defun-p t) 3op-name) +(defmacro/cross-compilation define-number-relational (name 2op-name condition &key (defun-p t) 3op-name) `(progn ,(when condition `(define-compiler-macro ,2op-name (n1 n2 &environment env)