guile enable step5 test

This commit is contained in:
Nala Ginrut 2015-04-01 00:29:08 +08:00
parent f040d9fbf4
commit 8d3e71edaf
2 changed files with 8 additions and 3 deletions

View file

@ -41,7 +41,7 @@ EXCLUDE_TESTS += test^ruby^step5 # test completes, even at 100,000
EXCLUDE_TESTS += test^rust^step5 # no catching stack overflows
EXCLUDE_TESTS += test^ocaml^step5 # test completes, even at 1,000,000
EXCLUDE_TESTS += test^vb^step5 # completes at 10,000
EXCLUDE_TESTS += test^guile^step5 # completes on 2.1+, even at 1,000,000
#EXCLUDE_TESTS += test^guile^step5 # completes on 2.1+, even at 1,000,000
EXCLUDE_PERFS = perf^mal # TODO: fix this

View file

@ -101,7 +101,7 @@
((null? body) (throw 'mal-error "fn*: bad lambda in form " ast))
((= 1 (length body)) (tco-loop (car body) nenv))
(else
(let ((mexpr (take rest (1- (length body))))
(let ((mexpr (take body (1- (length body))))
(tail-call (car (take-right body 1))))
(eval_seq mexpr nenv)
(tco-loop tail-call nenv)))))))
@ -123,4 +123,9 @@
(lambda (k . e)
(format #t "Error: ~a~%" (car e))))))
(REPL)
;; NOTE: we have to reduce stack size to pass step5 test
((@ (system vm vm) call-with-stack-overflow-handler)
1024
(lambda () (REPL))
(lambda k (throw 'mal-error "stack overflow")))