helpers for bigloo and gambit

svn: r3863
This commit is contained in:
Matthew Flatt 2006-07-28 13:54:27 +00:00
parent 2757a3e7cc
commit 968bd4adac
4 changed files with 44 additions and 0 deletions

View File

@ -0,0 +1,9 @@
(define-macro (time expr)
`(time-it (lambda () ,expr)))
(define (time-it thunk)
(thunk))
(define (error . x) #f)

View File

@ -0,0 +1,7 @@
(declare
(block)
(standard-bindings)
(extended-bindings)
(safe)
(interrupts-enabled)
)

View File

@ -0,0 +1,17 @@
(require (lib "process.ss"))
(define name (vector-ref (current-command-line-arguments) 0))
(with-output-to-file (format "~a.scm" name)
(lambda ()
(write `(module fft
(include "bigloo-prelude.sch")
(include ,(format "~a.sch" name))))
(newline))
'truncate/replace)
(when (system (format "bigloo -o ~a -Obench ~a.scm"
name name))
(delete-file (format "~a.scm" name))
(delete-file (format "~a.o" name)))

View File

@ -0,0 +1,11 @@
(require (lib "process.ss"))
(define name (vector-ref (current-command-line-arguments) 0))
(when (system (format "gsc -prelude '(include \"gambit-relude.ss\")' ~a.sch"
name))
(when (system (format "gcc -o ~a -O2 -D___SINGLE_HOST ~a.c ~a_.c -lgambc"
name name name))
(delete-file (format "~a.c" name))
(delete-file (format "~a_.c" name))))