~ chicken-core (chicken-5) 27781ff69c3a5946bc65afba4e773280debffd23
commit 27781ff69c3a5946bc65afba4e773280debffd23 Author: Peter Bex <peter.bex@xs4all.nl> AuthorDate: Thu Feb 17 20:33:31 2011 +0100 Commit: Peter Bex <peter.bex@xs4all.nl> CommitDate: Thu Feb 17 20:33:31 2011 +0100 Change compiler macros and 'declare' statements so they explicitly look up symbols in the syntax env instead of stripping their syntax; in effect, this does the same thing diff --git a/compiler.scm b/compiler.scm index af6b673b..ec03085d 100644 --- a/compiler.scm +++ b/compiler.scm @@ -735,7 +735,7 @@ ((##core#define-compiler-syntax) (let* ((var (cadr x)) (body (caddr x)) - (name (##sys#strip-syntax var se #f))) + (name (lookup var se))) (when body (set! compiler-syntax (alist-cons @@ -763,7 +763,7 @@ (let ((bs (map (lambda (b) (##sys#check-syntax 'let-compiler-syntax b '(symbol . #(_ 0 1))) - (let ((name (##sys#strip-syntax (car b) se #f))) + (let ((name (lookup (car b) se))) (list name (and (pair? (cdr b)) @@ -1259,9 +1259,9 @@ (if (or (< n minlen) (> n (optional maxlen 99999))) (syntax-error "invalid declaration" spec) ) ) ) (define (stripa x) ; global aliasing - (##sys#strip-syntax x se #t)) + (globalize x)) (define (strip x) ; raw symbol - (##sys#strip-syntax x se)) + (##sys#strip-syntax x)) (define stripu ##sys#strip-syntax) (define (globalize sym) (if (symbol? sym)Trap