From 08e1cbe91080a0c4b4e986ad7642285f3c227d2a Mon Sep 17 00:00:00 2001 From: Douglas Katzman Date: Wed, 2 Mar 2016 08:04:16 -0500 Subject: [PATCH] Dump ctypes such as STRING, LIST, RATIO as constants. --- src/code/early-type.lisp | 9 +++++++-- src/compiler/generic/genesis.lisp | 4 +--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/code/early-type.lisp b/src/code/early-type.lisp index edb696aa7..c5f02b0b6 100644 --- a/src/code/early-type.lisp +++ b/src/code/early-type.lisp @@ -951,6 +951,9 @@ expansion happened." (every (lambda (x) (recurse (key-info-type x))) (args-type-keywords ctype)) (if (fun-type-p ctype) (recurse (fun-type-returns ctype)) t))) + (compound-type (every #'recurse (compound-type-types ctype))) + (negation-type (recurse (negation-type-type ctype))) + (array-type (recurse (array-type-element-type ctype))) (cons-type (and (recurse (cons-type-car-type ctype)) (recurse (cons-type-cdr-type ctype)))) (member-type @@ -962,8 +965,10 @@ expansion happened." (typep (numeric-type-high ctype) '(or float (cons float)))) nil t)) - ;; HAIRY is just an s-expression, so it's dumpable - ((or named-type character-set-type hairy-type) t)))) + (classoid nil) + ;; HAIRY is just an s-expression, so it's dumpable. Same for simd-pack + ((or named-type character-set-type hairy-type #!+sb-simd-pack simd-pack-type) + t)))) (setf (get '!specifier-type :sb-cold-funcall-handler/for-value) (lambda (arg) diff --git a/src/compiler/generic/genesis.lisp b/src/compiler/generic/genesis.lisp index a4978dc44..5a6e11f69 100644 --- a/src/compiler/generic/genesis.lisp +++ b/src/compiler/generic/genesis.lisp @@ -1114,9 +1114,7 @@ core and return a descriptor to it." (gethash name *cold-layouts*) result))) ;;; Convert SPECIFIER (equivalently OBJ) to its representation as a ctype -;;; in the cold core. Presently this is used only for NAMED-TYPE, -;;; but the code is capable of dumping more complex structure so that -;;; things like (SPECIFIER-TYPE 'LIST) can be dump as constants. +;;; in the cold core. (defvar *ctype-cache*) (defun ctype-to-core (specifier obj) (declare (type ctype obj)) -- 2.11.4.GIT