From: Christophe Rhodes Date: Wed, 25 Jun 2003 09:30:55 +0000 (+0000) Subject: 0.8.0.78.vector-nil-string.9: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=4680204d81349894f47d2ba5fcfc92ecf4e725d3;p=sbcl.git 0.8.0.78.vector-nil-string.9: Indeed, with a little build rearrangement, we don't need a temporary SB!XC:DEFTYPE FIXNUM, so let's do that instead. ... move some of src/code/type-init.lisp into src/code/class-init.lisp --- diff --git a/build-order.lisp-expr b/build-order.lisp-expr index 28b3f1d..82c49dd 100644 --- a/build-order.lisp-expr +++ b/build-order.lisp-expr @@ -376,6 +376,8 @@ ("src/code/cross-type" :not-target) ("src/compiler/generic/vm-type") ("src/compiler/proclaim") + + ("src/code/class-init") ("src/code/typecheckfuns") ;; The DEFSTRUCT machinery needs SB!XC:SUBTYPEP, defined in @@ -399,11 +401,10 @@ ("src/compiler/compiler-error") ("src/code/type-init") - ;; Now that the type system is initialized, fix up UNKNOWN types that ;; have crept in. ("src/compiler/fixup-type") - + ;; These define target types needed by fndb.lisp. ("src/code/package") ("src/code/random") diff --git a/src/code/class-init.lisp b/src/code/class-init.lisp new file mode 100644 index 0000000..45a52ec --- /dev/null +++ b/src/code/class-init.lisp @@ -0,0 +1,32 @@ +;;;; When this file's top level forms are run, it precomputes the +;;;; translations for built in classes. This stuff is split off from +;;;; the other type stuff to get around problems with everything +;;;; needing to be loaded before everything else. This file is the +;;;; first to exercise the type machinery. + +;;;; This software is part of the SBCL system. See the README file for +;;;; more information. +;;;; +;;;; This software is derived from the CMU CL system, which was +;;;; written at Carnegie Mellon University and released into the +;;;; public domain. The software is in the public domain and is +;;;; provided with absolutely no warranty. See the COPYING and CREDITS +;;;; files for more information. + +(in-package "SB!KERNEL") + +;;; built-in classes +(/show0 "beginning class-init.lisp") +(dolist (x *built-in-classes*) + (destructuring-bind (name &key (translation nil trans-p) &allow-other-keys) + x + (/show0 "doing class with NAME=..") + (/primitive-print (symbol-name name)) + (when trans-p + (/show0 "in TRANS-P case") + (let ((classoid (classoid-cell-classoid (find-classoid-cell name))) + (type (specifier-type translation))) + (setf (built-in-classoid-translation classoid) type) + (setf (info :type :builtin name) type))))) + +(/show0 "done with class-init.lisp") diff --git a/src/code/class.lisp b/src/code/class.lisp index 4b2f936..9c60ee0 100644 --- a/src/code/class.lisp +++ b/src/code/class.lisp @@ -1158,9 +1158,8 @@ :depth 3 :inherits (instance))))) -;;; comment from CMU CL: -;;; See also type-init.lisp where we finish setting up the -;;; translations for built-in types. +;;; See also src/code/class-init.lisp where we finish setting up the +;;; translations for built-in types. (!cold-init-forms (dolist (x *built-in-classes*) #-sb-xc-host (/show0 "at head of loop over *BUILT-IN-CLASSES*") diff --git a/src/code/deftypes-for-target.lisp b/src/code/deftypes-for-target.lisp index ab58e4e..87f6d3e 100644 --- a/src/code/deftypes-for-target.lisp +++ b/src/code/deftypes-for-target.lisp @@ -24,11 +24,6 @@ ;;;; standard types -;;; also has a definition in src/code/class.lisp, but we need it -;;; earlier for array specialization. -(sb!xc:deftype fixnum () - '(integer #.sb!xc:most-negative-fixnum #.sb!xc:most-positive-fixnum)) - (sb!xc:deftype boolean () '(member t nil)) (sb!xc:deftype mod (n) @@ -59,7 +54,7 @@ (sb!xc:deftype extended-char () #!+sb-doc - "Type of characters that aren't base-char's. None in CMU CL." + "Type of CHARACTERs that aren't BASE-CHARs." '(and character (not base-char))) (sb!xc:deftype standard-char () diff --git a/src/code/type-init.lisp b/src/code/type-init.lisp index 9792ef2..9f40927 100644 --- a/src/code/type-init.lisp +++ b/src/code/type-init.lisp @@ -1,10 +1,10 @@ ;;;; When this file's top level forms are run, it precomputes the ;;;; translations for commonly used type specifiers. This stuff is ;;;; split off from the other type stuff to get around problems with -;;;; everything needing to be loaded before everything else. This is -;;;; the first file which really exercises the type stuff. This stuff -;;;; is also somewhat implementation-dependent in that implementations -;;;; may want to precompute other types which are important to them. +;;;; everything needing to be loaded before everything else. This +;;;; stuff is also somewhat implementation-dependent in that +;;;; implementations may want to precompute other types which are +;;;; important to them. ;;;; This software is part of the SBCL system. See the README file for ;;;; more information. @@ -17,20 +17,6 @@ (in-package "SB!KERNEL") -;;; built-in classes -(/show0 "beginning type-init.lisp") -(dolist (x *built-in-classes*) - (destructuring-bind (name &key (translation nil trans-p) &allow-other-keys) - x - (/show0 "doing class with NAME=..") - (/primitive-print (symbol-name name)) - (when trans-p - (/show0 "in TRANS-P case") - (let ((classoid (classoid-cell-classoid (find-classoid-cell name))) - (type (specifier-type translation))) - (setf (built-in-classoid-translation classoid) type) - (setf (info :type :builtin name) type))))) - ;;; numeric types (/show0 "precomputing numeric types") (precompute-types '((mod 2) (mod 4) (mod 16) (mod #x100) (mod #x10000) diff --git a/version.lisp-expr b/version.lisp-expr index 96b3b50..1728cf3 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.8.0.78.vector-nil-string.8" +"0.8.0.78.vector-nil-string.9"