From 993c261469bbf6201c6fae04fcdf255d38cf419d Mon Sep 17 00:00:00 2001 From: Stas Boukarev Date: Thu, 3 Oct 2013 20:28:05 +0400 Subject: [PATCH] Forward referenced classoid-cells can now be loaded from FASLs. When (defun x (x) (typep x 'bar)) (defclass bar () ()) is compiled twice, the typecheck is optimized and a classoid-cell is dumped into the FASL, but upon load in a new instance it's reconstructed using FIND-CLASSOID-CELL with :errorp t, resulting in an error, defeating the stated reason for indirection. Fixes lp#746132. --- NEWS | 2 ++ src/code/class.lisp | 2 +- src/code/early-type.lisp | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 062aa90..35a671d 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,8 @@ changes relative to sbcl-1.1.12: ** use the whole of the positive-fixnum range for SXHASH of fixnums * enhancement: The error message when calling an undefined alien function includes the name of the function on x86-64. + * bug fix: forward references to classes in fasls can now be loaded. + (lp#746132) changes in sbcl-1.1.12 relative to sbcl-1.1.11: * enhancement: Add sb-bsd-sockets:socket-shutdown, for calling diff --git a/src/code/class.lisp b/src/code/class.lisp index 6b868bd..fc7ed29 100644 --- a/src/code/class.lisp +++ b/src/code/class.lisp @@ -685,7 +685,7 @@ (:make-load-form-fun (lambda (c) `(find-classoid-cell ',(classoid-cell-name c) - :errorp t))) + :create t))) #-no-ansi-print-object (:print-object (lambda (s stream) (print-unreadable-object (s stream :type t) diff --git a/src/code/early-type.lisp b/src/code/early-type.lisp index a5f8e30..de364eb 100644 --- a/src/code/early-type.lisp +++ b/src/code/early-type.lisp @@ -153,7 +153,7 @@ (type-hash-value rest) 42) ;; Results (logand #xFF (sxhash t/nil)) - ;; hardcoded to avoid relying on the xc host. + ;; hardcoded to avoid relying on the xc host. (if allowp 194 11)) -- 1.7.10.4