~ chicken-core (chicken-5) 6a679103a60c60322bdc509ea374bd756703c685
commit 6a679103a60c60322bdc509ea374bd756703c685
Author: felix <felix@call-with-current-continuation.org>
AuthorDate: Sat May 15 01:04:44 2010 +0200
Commit: felix <felix@call-with-current-continuation.org>
CommitDate: Sat May 15 01:04:44 2010 +0200
fixed incorrect codegen for no-global-procedure-checks that caused hidden vars to be handled incorrectly
diff --git a/c-backend.scm b/c-backend.scm
index 65bf43b6..6b6c2323 100644
--- a/c-backend.scm
+++ b/c-backend.scm
@@ -279,8 +279,10 @@
(carg #f))
(gen #t "((C_proc" nf ")")
(cond (no-global-procedure-checks
- (set! carg
- (string-append "*((C_word*)lf[" (number->string index) "]+1)"))
+ (set! carg
+ (if block
+ (string-append "lf[" (number->string index) "]")
+ (string-append "*((C_word*)lf[" (number->string index) "]+1)")))
(gen "(void*)(*((C_word*)(" carg ")+1))"))
(block
(set! carg (string-append "lf[" (number->string index) "]"))
diff --git a/library.scm b/library.scm
index 275582fe..ff0aff8e 100644
--- a/library.scm
+++ b/library.scm
@@ -2733,7 +2733,7 @@ EOF
(##sys#print x #f port) )
(define-inline (*print-each lst)
- (for-each (cut ##sys#print <> #f ##sys#standard-output) lst) )
+ (for-each (lambda (x) (##sys#print x #f ##sys#standard-output)) lst) )
(define (print . args)
(*print-each args)
Trap