From: Joe Marshall Date: Sat, 5 Sep 2009 20:27:44 +0000 (-0700) Subject: Don't eta-expand fixed arity primitive definitions. X-Git-Tag: 20100708-Gtk~348 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=4877f8f68ef1fee566183b6ccfbad8a6fd021095;p=mit-scheme.git Don't eta-expand fixed arity primitive definitions. --- diff --git a/src/runtime/sysmac.scm b/src/runtime/sysmac.scm index d3bcfb492..6afa288a1 100644 --- a/src/runtime/sysmac.scm +++ b/src/runtime/sysmac.scm @@ -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)))