~ chicken-core (chicken-5) 106b4b7406682c703581fa0d0dc8dfd0a2d3bc4b
commit 106b4b7406682c703581fa0d0dc8dfd0a2d3bc4b Author: felix <felix@call-with-current-continuation.org> AuthorDate: Wed Dec 23 15:01:10 2009 +0100 Commit: felix <felix@call-with-current-continuation.org> CommitDate: Wed Dec 23 15:01:10 2009 +0100 trivial compiler things diff --git a/batch-driver.scm b/batch-driver.scm index d90d8eef..4fc08f2f 100644 --- a/batch-driver.scm +++ b/batch-driver.scm @@ -117,7 +117,11 @@ (define (print-expr mode dbgmode xs) (when (print-header mode dbgmode) - (for-each pretty-print xs) ) ) + (for-each + (lambda (x) + (pretty-print x) + (newline)) + xs) ) ) (define (infohook class data val) (let ([data2 ((or ##sys#default-read-info-hook (lambda (a b c) b)) class data val)]) diff --git a/compiler.scm b/compiler.scm index 0b13ba37..5a938965 100644 --- a/compiler.scm +++ b/compiler.scm @@ -1744,9 +1744,9 @@ (walk val env localenv here #f) (loop (cdr vars) (cdr vals)) ) ) ) ) ) - ((lambda) - (grow 1) - (decompose-lambda-list + ((lambda) ; why do we have 2 cases for lambda? + (grow 1) ; the reason for this should be tracked down + (decompose-lambda-list ; and this case removed (first params) (lambda (vars argc rest) (for-each diff --git a/manual/Non-standard macros and special forms b/manual/Non-standard macros and special forms index 6529beb8..1e87523a 100644 --- a/manual/Non-standard macros and special forms +++ b/manual/Non-standard macros and special forms @@ -299,7 +299,7 @@ for example. <macro>(define-compiler-syntax NAME TRANSFORMER)</macro><br> <macro>(define-compiler-syntax (NAME VAR ...) BODY ...)</macro> -Defines what is usually called a ''compiler macro'': {{NAME}} should be the +Defines what is usually called a ''compiler macro'' in Lisp: {{NAME}} should be the name of a globally or locally bound procedure. Any direct call to this procedure will be transformed before compilation, which allows arbitrary rewritings of function calls. @@ -313,6 +313,9 @@ In the interpreter this form does nothing and returns an unspecified value. Compiler-syntax is always local to the current compilation unit and can not be exported. +{{define-compiler-syntax}} should only be used at top-level. Local compiler-syntax +can be defined with {{let-compiler-syntax}}. + <scheme> (define-compiler-syntax + (syntax-rules () diff --git a/manual/Using the compiler b/manual/Using the compiler index 248f66a9..d29cf70b 100644 --- a/manual/Using the compiler +++ b/manual/Using the compiler @@ -167,8 +167,8 @@ Possible options are: -optimize-level 1 is equivalent to -optimize-leaf-routines -optimize-level 2 is equivalent to -optimize-leaf-routines -inline -optimize-level 3 is equivalent to -optimize-leaf-routines -local -inline - -optimize-level 4 is equivalent to -optimize-leaf-routines -local -inline -unsafe - -optimize-level 5 is equivalent to -optimize-leaf-routines -block -inline -unsafe -lambda-lift -disable-interrupts -no-trace -no-lambda-info + -optimize-level 4 is equivalent to -optimize-leaf-routines -local -inline -unsafe -unboxing + -optimize-level 5 is equivalent to -optimize-leaf-routines -block -inline -unsafe -unboxing -lambda-lift -disable-interrupts -no-trace -no-lambda-info ; -output-file FILENAME : Specifies the pathname of the generated C file. Default is {{FILENAME.c}}.Trap