Ignore eager-integration-switch and eta-substitution-switch.
authorJoe Marshall <jmarshall@alum.mit.edu>
Tue, 9 Feb 2010 17:07:52 +0000 (09:07 -0800)
committerJoe Marshall <jmarshall@alum.mit.edu>
Tue, 9 Feb 2010 17:07:52 +0000 (09:07 -0800)
src/sf/subst.scm

index 2c168a63e171883f2aee618f95161d0ab3c7128f..967940815b4bd78eb3c1fda1638f4d17591c30a4 100644 (file)
@@ -139,9 +139,7 @@ USA.
             (else
              (error "Unknown operation" operation))))
         (lambda ()
-          (if *eager-integration-switch
-              (try-safe-integration)
-              (integration-failure))))))))
+          (integration-failure)))))))
 \f
 (define (integrate/name-if-safe expr reference environment
                                operations safe-operations if-win if-fail)
@@ -251,9 +249,7 @@ USA.
           (else
            (error "Unknown operation" operation))))
        (lambda ()
-        (if *eager-integration-switch
-            (try-safe-integration)
-            (integration-failure)))))))
+        (integration-failure))))))
 \f
 ;;;; Binding
 
@@ -411,34 +407,14 @@ you ask for.
                          (if rest
                              (append required optional (list rest))
                              (append required optional))))
-           (if (and *eta-substitution-switch
-                    (combination? body)
-                    (null? optional)
-                    (null? rest)
-                    (let ((operands (combination/operands body)))
-                      (match-up? operands required))
-                    (set/empty?
-                     (set/intersection
-                      (list->set variable? eq? required)
-                      (free/expression (combination/operator body)))))
-               (combination/operator body)
                (procedure/make (procedure/scode procedure)
                                block
                                name
                                required
                                optional
                                rest
-                               body))))))))
-
-(define (match-up? operands required)
-  (if (null? operands)
-      (null? required)
-      (and (not (null? required))
-          (let ((this-operand (car operands))
-                (this-required (car required)))
-            (and (reference? this-operand)
-                 (eq? (reference/variable this-operand) this-required)
-                 (match-up? (cdr operands) (cdr required)))))))
+                               body)))))))
+
 \f
 (define-method/integrate 'COMBINATION
   (lambda (operations environment combination)