[movitz-cvs] CVS update: movitz/compiler.lisp

Frode Vatvedt Fjeld ffjeld at common-lisp.net
Mon Jul 12 09:11:08 UTC 2004


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

Modified Files:
	compiler.lisp 
Log Message:
Fixed new-binding-location, which didn't do the right thing with the
default argument.

Date: Mon Jul 12 02:11:08 2004
Author: ffjeld

Index: movitz/compiler.lisp
diff -u movitz/compiler.lisp:1.73 movitz/compiler.lisp:1.74
--- movitz/compiler.lisp:1.73	Sun Jul 11 15:58:56 2004
+++ movitz/compiler.lisp	Mon Jul 12 02:11:07 2004
@@ -8,7 +8,7 @@
 ;;;; Created at:    Wed Oct 25 12:30:49 2000
 ;;;; Distribution:  See the accompanying file COPYING.
 ;;;;                
-;;;; $Id: compiler.lisp,v 1.73 2004/07/11 22:58:56 ffjeld Exp $
+;;;; $Id: compiler.lisp,v 1.74 2004/07/12 09:11:07 ffjeld Exp $
 ;;;;                
 ;;;;------------------------------------------------------------------
 
@@ -2375,10 +2375,11 @@
 
 (defun new-binding-location (binding map &key (default nil default-p))
   (check-type binding (or binding (cons keyword binding)))
-  (cdr (or (assoc binding map)
-	   (if default-p
-	       default
-	     (error "No location for ~S." binding)))))
+  (let ((x (assoc binding map)))
+    (cond
+     (x (cdr x))
+     (default-p default)
+     (t (error "No location for ~S." binding)))))
 
 (defun make-binding-map () nil)
 





More information about the Movitz-cvs mailing list