~ chicken-core (chicken-5) f5c87f894e1a94a7ae8355563b3e374d4480797b
commit f5c87f894e1a94a7ae8355563b3e374d4480797b
Author: felix <felix@call-with-current-continuation.org>
AuthorDate: Mon May 16 20:57:09 2011 +0200
Commit: felix <felix@call-with-current-continuation.org>
CommitDate: Wed May 18 04:29:03 2011 -0400
bootstrap-mode broke potential-value assignment for toplevel assignments, which causes wrong lambda-infos
diff --git a/compiler.scm b/compiler.scm
index e838c399..c695eb9d 100644
--- a/compiler.scm
+++ b/compiler.scm
@@ -223,7 +223,7 @@
; undefined -> <boolean> If true: variable is unknown yet but can be known later
; value -> <node> Variable has a known value
; local-value -> <node> Variable is declared local and has value
-; potential-value -> <node> Global variable was assigned this value
+; potential-value -> <node> Global variable was assigned this value (later turns into 'value)
; references -> (<node> ...) Nodes that are accesses of this variable (##core#variable nodes)
; boxed -> <boolean> If true: variable has to be boxed after closure-conversion
; contractable -> <boolean> If true: variable names contractable procedure
@@ -1764,18 +1764,8 @@
(walk val env localenv here #f)
(loop (cdr vars) (cdr vals)) ) ) ) ) )
- ((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
- (lambda (var) (put! db var 'unknown #t))
- vars)
- (let ([tl toplevel-scope])
- (set! toplevel-scope #f)
- (walk (car subs) (append localenv env) vars #f #f)
- (set! toplevel-scope tl) ) ) ) )
+ ((lambda)
+ (bomb "somebody used unprefixed `lambda'!"))
((##core#lambda ##core#direct_lambda)
(grow 1)
@@ -1812,8 +1802,8 @@
((standard)
(warning "redefinition of standard binding" var) )
((extended)
- (warning "redefinition of extended binding" var) ) )
- (put! db var 'potential-value val) )
+ (warning "redefinition of extended binding" var) ) ))
+ (put! db var 'potential-value val)
(unless (memq var localenv)
(grow 1)
(cond ((memq var env)
Trap