~ chicken-core (chicken-5) bf1bba56845da74aa37407a5b185a320610dcae7
commit bf1bba56845da74aa37407a5b185a320610dcae7
Author: felix <felix@call-with-current-continuation.org>
AuthorDate: Sat Jul 18 23:11:11 2015 +0200
Commit: felix <felix@call-with-current-continuation.org>
CommitDate: Sat Jul 18 23:11:11 2015 +0200
use av instead of stack when restoring args in trampoline
diff --git a/c-backend.scm b/c-backend.scm
index 2dc3cddf..62fa4deb 100644
--- a/c-backend.scm
+++ b/c-backend.scm
@@ -604,11 +604,10 @@
[nsrv '()] )
(define (restore n)
- (do ((i (- n 1) (- i 1))
- (j 0 (+ j 1)) )
- ((negative? i))
- (gen #t "C_word t" i "=C_pick(" j ");") )
- (gen #t "C_adjust_stack(-" n ");") )
+ (do ((i 0 (add1 i))
+ (j (sub1 n) (sub1 j)))
+ ((>= i n))
+ (gen #t "C_word t" i "=av[" j "];")))
(##sys#hash-table-for-each
(lambda (id ll)
Trap