X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ftype-init.lisp;h=064d4523967d5e640d705e726e8c2b08bbb67de7;hb=cee8ef591040db9a79cdd19297867672a9529051;hp=ff7b4a2674427c26a23c8f7204a64f2905bbdf02;hpb=a530bbe337109d898d5b4a001fc8f1afa3b5dc39;p=sbcl.git diff --git a/src/code/type-init.lisp b/src/code/type-init.lisp index ff7b4a2..064d452 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 +;;;; 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,45 +17,18 @@ (in-package "SB!KERNEL") -(file-comment - "$Header$") - -;;; 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 - #+sb-show (progn - (/show0 "doing class with name=..") - #+sb-xc-host (/show0 name) - #-sb-xc-host (%primitive print (symbol-name name))) - (when trans-p - (/show0 "in TRANS-P case") - (let ((class (class-cell-class (find-class-cell name))) - (type (specifier-type translation))) - (setf (built-in-class-translation class) 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) - (mod #x100000000) - (unsigned-byte 1) (unsigned-byte 2) (unsigned-byte 4) - (unsigned-byte 8) (unsigned-byte 16) (unsigned-byte 32) - (signed-byte 8) (signed-byte 16) (signed-byte 32))) + (mod #x100000000) + (unsigned-byte 1) (unsigned-byte 2) (unsigned-byte 4) + (unsigned-byte 8) (unsigned-byte 16) (unsigned-byte 32) + (signed-byte 8) (signed-byte 16) (signed-byte 32))) ;;; built-in symbol type specifiers (/show0 "precomputing built-in symbol type specifiers") -(precompute-types *standard-type-names*) +(precompute-types *!standard-type-names*) -;;; FIXME: It should be possible to do this in the cross-compiler, -;;; but currently the cross-compiler's type system is too dain-bramaged to -;;; handle it. (Various consistency checks are disabled when this flag -;;; is false, and the cross-compiler's type system can't pass these -;;; checks. Some of the problems are quite severe, e.g. mismatch between -;;; LAYOUTs generated by DEF!STRUCT and LAYOUTs generated by real -;;; DEFSTRUCT due to DEF!STRUCT not understanding raw slots -- it's -;;; actually somewhat remarkable that the system works..) -; #+sb-xc-host (setf *type-system-initialized* t) +#+sb-xc-host (setf *type-system-initialized* t) (/show0 "done with type-init.lisp")