~ chicken-core (chicken-5) 9ac7ea68f9598a1432cbf03317e57ec3a9cda735
commit 9ac7ea68f9598a1432cbf03317e57ec3a9cda735
Author: felix <felix@call-with-current-continuation.org>
AuthorDate: Sun Mar 20 18:19:31 2011 +0100
Commit: felix <felix@call-with-current-continuation.org>
CommitDate: Sun Mar 20 18:19:31 2011 +0100
use fft benchmark for specialization test in runtests
diff --git a/tests/fft.scm b/tests/fft.scm
index 693a7d56..49fd8e5d 100644
--- a/tests/fft.scm
+++ b/tests/fft.scm
@@ -1,8 +1,14 @@
-(declare (standard-bindings)
- (extended-bindings)
- (block)
- (not safe)
- )
+;;;; fft.scm - fft benchmark, by Bradley Lucier
+
+
+(cond-expand
+ ((not chicken) ; disable in CHICKEN to test specialization in safe mode
+ (declare
+ (standard-bindings)
+ (extended-bindings)
+ (block)
+ (not safe)))
+ (else))
;;; All the following redefinitions are *ignored* by the Gambit compiler
;;; because of the declarations above.
@@ -2067,8 +2073,10 @@
(direct-fft-recursive-4 a table)
(inverse-fft-recursive-4 a table)))))
-(let-optionals (command-line-arguments)
- ((iters "2000")
- (n "11"))
- (test (string->number iters) (string->number n)))
-
+(cond-expand
+ (chicken
+ (let-optionals (command-line-arguments)
+ ((iters "2000")
+ (n "11"))
+ (test (string->number iters) (string->number n))))
+ (else (test 2000 11)))
diff --git a/tests/runtests.sh b/tests/runtests.sh
index f04b33ed..acdc988a 100644
--- a/tests/runtests.sh
+++ b/tests/runtests.sh
@@ -57,6 +57,12 @@ echo "======================================== compiler tests (unboxing) ..."
$compile compiler-tests-3.scm -unsafe -unboxing
./a.out
+echo "======================================== compiler tests (specialization) ..."
+$compile fft.scm -O3 -d0 -disable-interrupts -b -o fft1
+$compile fft.scm -O3 -d0 -disable-interrupts -b -o fft2 -specialize
+/usr/bin/time fft1 1000 7
+/usr/bin/time fft2 1000 7
+
echo "======================================== compiler inlining tests ..."
$compile inlining-tests.scm -optimize-level 3
./a.out
Trap