[armedbear-cvs] r11541 - trunk/abcl/src/org/armedbear/lisp

Ville Voutilainen vvoutilainen at common-lisp.net
Sun Jan 4 17:29:01 UTC 2009


Author: vvoutilainen
Date: Sun Jan  4 17:29:00 2009
New Revision: 11541

Log:
Look, I can do conditionals in the middle of a
backquote-form! :) Seriously, this commit removes
a tiny bit of copy-paste from define-resolver.


Modified:
   trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp

Modified: trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp	(original)
+++ trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp	Sun Jan  4 17:29:00 2009
@@ -931,16 +931,13 @@
 
 (defmacro define-resolver (opcodes args &body body)
   (let ((name (gensym)))
-    (if (listp opcodes)
-        `(progn
-           (defun ,name ,args , at body)
-           (eval-when (:load-toplevel :execute)
-             (dolist (op ',opcodes)
-               (setf (gethash op +resolvers+) (symbol-function ',name)))))
-        `(progn
-           (defun ,name ,args , at body)
-           (eval-when (:load-toplevel :execute)
-             (setf (gethash ,opcodes +resolvers+) (symbol-function ',name)))))))
+    `(progn
+       (defun ,name ,args , at body)
+       (eval-when (:load-toplevel :execute)
+	 ,(if (listp opcodes)
+	      `(dolist (op ',opcodes)
+		 (setf (gethash op +resolvers+) (symbol-function ',name)))
+	      `(setf (gethash ,opcodes +resolvers+) (symbol-function ',name)))))))
 
 ;; aload
 (define-resolver 25 (instruction)




More information about the armedbear-cvs mailing list