* last commit on alt-cogen and beginning of alt-alt-cogen :-)

This commit is contained in:
Abdulaziz Ghuloum
2007-03-09 14:01:17 -05:00
parent 893a2decc8
commit 5bb666bf7f
14 changed files with 773 additions and 186 deletions
+21
View File
@@ -0,0 +1,21 @@
(add-tests-with-string-output "allocating procedures live-across a call"
[(let ([g
(lambda (y)
(let ([f (lambda (x) y)])
(map f '(1 2 3))
(map f '(1 2 3))))])
(g 2)) => "(2 2 2)\n"]
[(let ()
(define (mklist i ac)
(cond
[(#%$fxzero? i) ac]
[else (mklist (#%$fxsub1 i) (#%cons i ac))]))
(define (leng ls n)
(cond
[(null? ls) n]
[else (leng (#%$cdr ls) (#%$fxadd1 n))]))
(leng (mklist 10000000 '()) 0)) => "10000000\n"]
)