Update of /project/movitz/cvsroot/movitz In directory common-lisp.net:/tmp/cvs-serv1920
Modified Files: eval.lisp Log Message: Re-wrote movitz-constantp more reasonably.
Date: Wed Apr 14 17:56:08 2004 Author: ffjeld
Index: movitz/eval.lisp diff -u movitz/eval.lisp:1.5 movitz/eval.lisp:1.6 --- movitz/eval.lisp:1.5 Tue Apr 13 12:30:36 2004 +++ movitz/eval.lisp Wed Apr 14 17:56:08 2004 @@ -9,7 +9,7 @@ ;;;; Created at: Thu Nov 2 17:45:05 2000 ;;;; Distribution: See the accompanying file COPYING. ;;;; -;;;; $Id: eval.lisp,v 1.5 2004/04/13 16:30:36 ffjeld Exp $ +;;;; $Id: eval.lisp,v 1.6 2004/04/14 21:56:08 ffjeld Exp $ ;;;; ;;;;------------------------------------------------------------------
@@ -59,11 +59,7 @@ (defun movitz-constantp (form &optional (environment nil)) (let ((form (translate-program form :cl :muerte.cl))) (typecase form - (boolean t) - (number t) (keyword t) - (character t) - (string t) (symbol (or (movitz-env-get form 'constantp nil environment) (typep (movitz-binding form environment) 'constant-object-binding))) (cons (case (car form) @@ -73,7 +69,8 @@ ((muerte.cl:+ muerte.cl:- muerte.cl:*) (every (lambda (sub-form) (movitz-constantp sub-form environment)) - (cdr form)))))))) + (cdr form))))) + (t t)))) ; anything else is self-evaluating.
(defun isconst (x)