Eval has no more free variables
authorAndy Wingo <wingo@pobox.com>
Sun, 13 Apr 2014 12:22:22 +0000 (14:22 +0200)
committerAndy Wingo <wingo@pobox.com>
Sun, 13 Apr 2014 12:22:22 +0000 (14:22 +0200)
* module/ice-9/eval.scm (primitive-eval): Expand out the call to
  make-general-closure, so that make-general-closure becomes
  well-known.  Now eval has no more free variables!

module/ice-9/eval.scm

index ef82de4..89d17cd 100644 (file)
          (let ((proc
                 (if (null? tail)
                     (make-fixed-closure eval nreq body env)
-                    (if (null? (cdr tail))
-                        (make-rest-closure eval nreq body env)
-                        (apply make-general-closure env body nreq tail)))))
+                    (mx-bind
+                     tail (rest? . tail)
+                     (if (null? tail)
+                         (make-rest-closure eval nreq body env)
+                         (mx-bind
+                          tail (nopt kw inits alt)
+                          (make-general-closure env body nreq rest?
+                                                nopt kw inits alt)))))))
            (let lp ((meta meta))
              (unless (null? meta)
                (set-procedure-property! proc (caar meta) (cdar meta))