Add an error check to MAKE-COMBINATION for an operator that's a
authorChris Hanson <org/chris-hanson/cph>
Wed, 13 Feb 2008 14:26:47 +0000 (14:26 +0000)
committerChris Hanson <org/chris-hanson/cph>
Wed, 13 Feb 2008 14:26:47 +0000 (14:26 +0000)
non-primitive procedure.  This is the most likely screw case from the
recent change in the handling of primitive integrations.

v7/src/runtime/scomb.scm

index 6ee79b8b02e5cb2a1a58a204c8d0c6ec68c547a8..4cd8d428c31d2c850eab105449115ea235c11f5a 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: scomb.scm,v 14.28 2008/01/30 20:02:35 cph Exp $
+$Id: scomb.scm,v 14.29 2008/02/13 14:26:47 cph Exp $
 
 Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
     1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
@@ -244,6 +244,11 @@ USA.
       (object-type? (ucode-type primitive-combination-3) object)))
 
 (define (make-combination operator operands)
+  (if (and (procedure? operator)
+          (not (primitive-procedure? operator)))
+      (error:wrong-type-argument operator
+                                "operator expression"
+                                'MAKE-COMBINATION))
   (if (and (memq operator combination/constant-folding-operators)
           (let loop ((operands operands))
             (or (null? operands)