/[gcl]/gcl/ansi-tests/let.lsp
ViewVC logotype

Diff of /gcl/ansi-tests/let.lsp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.10 by pfdietz, Sat Jan 8 02:07:05 2005 UTC revision 1.11 by pfdietz, Sat Jan 8 11:11:05 2005 UTC
# Line 89  Line 89 
89    
90  ;;; Tests of large number of LET variables  ;;; Tests of large number of LET variables
91  (deftest let.14  (deftest let.14
92    (let* ((n 1000)    (let* ((n 100)
93           (vars (mapcar #'gensym (make-list n :initial-element "G")))           (vars (mapcar #'gensym (make-list n :initial-element "G")))
94           (expr `(let ,(let ((i 0))           (expr `(let ,(let ((i 0))
95                          (mapcar #'(lambda (v) (list v (incf i))) vars))                          (mapcar #'(lambda (v) (list v (incf i))) vars))
# Line 130  Line 130 
130          y)))          y)))
131    :good)    :good)
132    
133    (deftest let.17a
134      (funcall
135       (compile
136        nil
137        '(lambda ()
138           (let ((x :bad))
139             (declare (special x))
140             (let ((x :good)) ;; lexical binding
141               (let ((y x))
142                 (declare (special x)) ;; free declaration
143                 y))))))
144      :good)
145    
146    (deftest let.18
147      (let ((foo 'special))
148        (declare (special foo))
149        (let ((foo 'lexical))
150          (locally (declare (special foo)))
151          foo))
152      lexical)
153    
154  ;;; Tests for LET*  ;;; Tests for LET*
155    
156  (deftest let*.1  (deftest let*.1
# Line 208  Line 229 
229    
230  ;;; Tests of large number of LET* variables  ;;; Tests of large number of LET* variables
231  (deftest let*.14  (deftest let*.14
232    (let* ((n 1000)    (let* ((n 100)
233           (vars (mapcar #'gensym (make-list n :initial-element "G")))           (vars (mapcar #'gensym (make-list n :initial-element "G")))
234           (expr `(let* ,(let ((i 0))           (expr `(let* ,(let ((i 0))
235                           (mapcar #'(lambda (v) (list v (incf i))) vars))                           (mapcar #'(lambda (v) (list v (incf i))) vars))
# Line 249  Line 270 
270          y)))          y)))
271    :good)    :good)
272    
273    (deftest let*.17a
274      (funcall
275       (compile
276        nil
277        '(lambda ()
278           (let ((x :bad))
279             (declare (special x))
280             (let ((x :good)) ;; lexical binding
281               (let* ((y x))
282                 (declare (special x)) ;; free declaration
283                 y))))))
284      :good)
285    
286    (deftest let*.18
287      (let ((x :bad1)
288            (z :bad2))
289        (declare (special x z))
290        (let ((x :good)
291              (z :good)) ;; lexical bindings
292          (let* ((y x)
293                 (w z))
294            (declare (special x)) ;; free declaration
295            (values y w))))
296      :good
297      :good)
298    
299    (deftest let*.19
300      (let ((foo 'special))
301        (declare (special foo))
302        (let* ((foo 'lexical))
303          (locally (declare (special foo)))
304          foo))
305      lexical)
306    

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26