Don't eta-expand fixed arity primitive definitions.
authorJoe Marshall <jmarshall@alum.mit.edu>
Sat, 5 Sep 2009 20:27:44 +0000 (13:27 -0700)
committerJoe Marshall <jmarshall@alum.mit.edu>
Sat, 5 Sep 2009 20:27:44 +0000 (13:27 -0700)
src/runtime/sysmac.scm

index d3bcfb492721f74c913d63a4a199b580e2f54cd1..6afa288a10d3a6eca896e7f1411081aa774d8016 100644 (file)
@@ -34,18 +34,9 @@ USA.
      environment
      (let ((primitive-definition
            (lambda (variable-name primitive-args)
-             (let ((primitive
-                    (apply make-primitive-procedure primitive-args)))
-               (let ((arity (procedure-arity primitive)))
-                 (if (eqv? (procedure-arity-min arity)
-                           (procedure-arity-max arity))
-                     (let ((names
-                            (map (lambda (n) (symbol 'a n))
-                                 (iota (procedure-arity-min arity) 1))))
-                       `(DEFINE-INTEGRABLE (,variable-name ,@names)
-                          (,primitive ,@names)))
-                     `(DEFINE-INTEGRABLE ,variable-name
-                        ,primitive)))))))
+             `(DEFINE-INTEGRABLE ,variable-name 
+                ,(apply make-primitive-procedure primitive-args))
+             )))
        `(BEGIN ,@(map (lambda (name)
                        (cond ((not (pair? name))
                               (primitive-definition name (list name)))