~ chicken-core (chicken-5) 4722762d1388325de22d4e9a4f3d6bcc8b7094f7
commit 4722762d1388325de22d4e9a4f3d6bcc8b7094f7 Author: felix <bunny351@gmail.com> AuthorDate: Thu Apr 22 16:52:13 2010 +0200 Commit: felix <bunny351@gmail.com> CommitDate: Thu Apr 22 16:52:13 2010 +0200 added ##core#toplevel-begin which works like ##core#begin, but isn't spliced by body-canonicalization diff --git a/compiler.scm b/compiler.scm index 763f2147..e521d70d 100644 --- a/compiler.scm +++ b/compiler.scm @@ -109,6 +109,7 @@ ; (##core#lambda ({<variable>}+ [. <variable>]) <body>) ; (##core#set! <variable> <exp>) ; (##core#begin <exp> ...) +; (##core#toplevel-begin <exp> ...) ; (##core#include <string>) ; (##core#loop-lambda <llist> <body>) ; (##core#undefined) @@ -957,7 +958,7 @@ (eval/meta (cadr x)) '(##core#undefined) ) - ((##core#begin) + ((##core#begin ##core#toplevel-begin) (if (pair? (cdr x)) (canonicalize-begin-body (let fold ([xs (cdr x)]) diff --git a/eval.scm b/eval.scm index 54eb945c..8d135070 100644 --- a/eval.scm +++ b/eval.scm @@ -387,7 +387,7 @@ (compile '(##core#undefined) e #f tf cntr se) ) ] ) (lambda (v) (if (##core#app test v) (##core#app cns v) (##core#app alt v))) ) ] - [(##core#begin) + [(##core#begin ##core#toplevel-begin) (let* ((body (##sys#slot x 1)) (len (length body)) ) (case lenTrap