Added a warning in DEFINE-OPEN-CODER so warn about primitives that are
authorStephen Adams <edu/mit/csail/zurich/adams>
Fri, 8 Mar 1996 15:57:43 +0000 (15:57 +0000)
committerStephen Adams <edu/mit/csail/zurich/adams>
Fri, 8 Mar 1996 15:57:43 +0000 (15:57 +0000)
unknown because if they are introduced before applicat, applicat will
insert a %primitive-apply.

v8/src/compiler/midend/rtlgen.scm

index 5ad17baa1662bfa2fdff678ee0f3f5fa39191dec..c7cd56f8e305ad8523c05eb2ec5254cf642ea905 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: rtlgen.scm,v 1.41 1995/09/08 16:49:08 adams Exp $
+$Id: rtlgen.scm,v 1.42 1996/03/08 15:57:43 adams Exp $
 
 Copyright (c) 1994-1995 Massachusetts Institute of Technology
 
@@ -2863,9 +2863,15 @@ MIT in each case. |#
 (define (define-open-coder name-or-object nargs
          vhandler shandler phandler ohandler sphandler
          #!optional requires-form?)
-  (let ((rator (if (known-operator? name-or-object)
-                  name-or-object
-                  (make-primitive-procedure name-or-object nargs))))
+  (let ((rator
+        (if (known-operator? name-or-object)
+            name-or-object
+            (let ((prim (make-primitive-procedure name-or-object nargs)))
+              (if (not (known-operator? prim))
+                  ;; Applicat makes these into %primitive-apply
+                  (warn "Unknown operator: open coder will never be called"
+                        name-or-object))
+              prim))))
     (hash-table/put!
      *open-coders*
      rator