From c9a1bef6fb64379dc86e1936865470a7d94ed9de Mon Sep 17 00:00:00 2001
From: ram <ram>
Date: Tue, 22 May 1990 13:46:38 +0000
Subject: [PATCH] Changed info cache initialization to directly do the
 necessary stuff at GLOBALDB-INIT time, rather than trying to get
 DEFINE-HASH-CACHE to do just this stuff.

---
 compiler/globaldb.lisp | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/compiler/globaldb.lisp b/compiler/globaldb.lisp
index c6c192cf0..a02732b79 100644
--- a/compiler/globaldb.lisp
+++ b/compiler/globaldb.lisp
@@ -477,24 +477,24 @@
 	 #x3FF)))
 
 
-(eval-when (compile load eval)
+(define-hash-cache info ((name eq) (type eq))
+  :values 2
+  :hash-function info-cache-hash
+  :hash-bits 10
+  :default (values nil :empty))
+
 
 ;;; INFO-CACHE-INIT  --  Internal
 ;;;
-;;;    Set up the info cache.  This is also called in GLOBALDB-INIT.
+;;;    Set up the info cache.  The top-level code of DEFINE-HASH-CACHE can't
+;;; initialize the cache, since it must be initialized before we run any
+;;; top-level forms. This is called in GLOBALDB-INIT.
 ;;;
-(defmacro info-cache-init ()
-  `(progn
-     (setq *cached-info-environment* nil)
-     (define-hash-cache info ((name eq) (type eq))
-       :values 2
-       :hash-function info-cache-hash
-       :hash-bits 10
-       :default (values nil :empty))))
-
-(info-cache-init)
-
-); Eval-When (Compile Load Eval)
+(defun info-cache-init ()
+  (setq *cached-info-environment* nil)
+  (setq *info-cache-vector* (make-array (* 4 (ash 2 10))))
+  (info-cache-clear)
+  (undefined-value))
 
 
 ;;; Whenever we GC, we must blow away the INFO cache, otherwise values might
@@ -970,7 +970,7 @@
     (setq *type-numbers*
 	  (make-array (ash 1 type-number-bits)  :initial-element nil)))
 
-  (info-cache-init)  
+  (info-cache-init)
   (function-info-init)
   (other-info-init))
 
-- 
GitLab