Constant-fold STRING->SYMBOL.
authorChris Hanson <org/chris-hanson/cph>
Mon, 7 Dec 1992 18:42:23 +0000 (18:42 +0000)
committerChris Hanson <org/chris-hanson/cph>
Mon, 7 Dec 1992 18:42:23 +0000 (18:42 +0000)
v7/src/sf/usiexp.scm

index 4c8236059d6968226c0795b114b8d626eea76c87..0326827ea8bd12c01f75b71dcc04ed8610784fe0 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: usiexp.scm,v 4.11 1992/12/02 20:20:38 cph Exp $
+$Id: usiexp.scm,v 4.12 1992/12/07 18:42:23 cph Exp $
 
 Copyright (c) 1988-1992 Massachusetts Institute of Technology
 
@@ -441,6 +441,14 @@ MIT in each case. |#
 (define (make-type-test type operand)
   (make-combination (ucode-primitive object-type?)
                    (list (constant/make type) operand)))
+
+(define (string->symbol-expansion operands if-expanded if-not-expanded block)
+  block
+  (if (and (pair? operands)
+          (string? (car operands))
+          (null? (cdr operands)))
+      (if-expanded (constant/make (string->symbol (car operands))))
+      (if-not-expanded)))
 \f
 ;;;; Tables
 
@@ -514,6 +522,7 @@ MIT in each case. |#
     second
     seventh
     sixth
+    string->symbol
     third
     values
     vector?
@@ -592,6 +601,7 @@ MIT in each case. |#
    second-expansion
    seventh-expansion
    sixth-expansion
+   string->symbol-expansion
    third-expansion
    values-expansion
    vector?-expansion