~ chicken-core (chicken-5) 118aa8b5e3b49e1d18aee9617356dcbdb7631ac0
commit 118aa8b5e3b49e1d18aee9617356dcbdb7631ac0 Author: felix <felix@call-with-current-continuation.org> AuthorDate: Tue May 24 08:27:24 2011 +0200 Commit: felix <felix@call-with-current-continuation.org> CommitDate: Tue May 24 08:27:24 2011 +0200 applied missing fix for incorrect removal of unprefixed lambda handling diff --git a/compiler.scm b/compiler.scm index c695eb9d..760fb2ef 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 (later turns into 'value) +; potential-value -> <node> Global variable was assigned this value (used for lambda-info) ; 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,8 +1764,18 @@ (walk val env localenv here #f) (loop (cdr vars) (cdr vals)) ) ) ) ) ) - ((lambda) - (bomb "somebody used unprefixed `lambda'!")) + ((lambda) ; this is an intermediate lambda, slightly different + (grow 1) ; from '##core#lambda nodes (params = (LLIST)); + (decompose-lambda-list ; CPS will convert this into ##core#lambda + (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) ) ) ) ) ((##core#lambda ##core#direct_lambda) (grow 1)Trap