From 83ab3d736dab33abcd12c215fa0540c87971682c Mon Sep 17 00:00:00 2001
From: ram <ram>
Date: Sat, 10 Feb 1990 20:06:52 +0000
Subject: [PATCH] Added code to %DEFINE-INFO-TYPE that bumps up *TYPE-COUNTER*
 so as to prevent the type number from being reused.  This allows new types to
 be defined without clobbering the old type numbers.

---
 compiler/globaldb.lisp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/compiler/globaldb.lisp b/compiler/globaldb.lisp
index 14023ccb6..5e776b09e 100644
--- a/compiler/globaldb.lisp
+++ b/compiler/globaldb.lisp
@@ -213,10 +213,13 @@
 ;;; %Define-Info-Type  --  Internal
 ;;;
 ;;;    If there is no such type, create it.  In any case, set the type
-;;; specifier for the value.  The class must exist.
+;;; specifier for the value.  The class must exist.  We bump *TYPE-COUNTER* to
+;;; after our number so that it won't be reused by any new info type
+;;; definition.
 ;;;
 (defun %define-info-type (class type type-spec number)
   (declare (simple-string class type) (type type-number number))
+  (setq *type-counter* (max *type-counter* (1+ number)))
   (let* ((class-info (class-info-or-lose class))
 	 (old (find-type-info type class-info))
 	 (res (or old
-- 
GitLab