Update of /cvsroot/sbcl/sbcl
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28622
Declassification of INSTANCE and FUNCALLABLE-INSTANCE.
It turns out that the classes INSTANCE and
FUNCALLABLE-INSTANCE, as expressed in instance-pointer-lowtag
and funcallable-instance-widetag, are incompatible with the
MOP's notion of classes: the types INSTANCE and
FUNCALLABLE-INSTANCE are necessarily disjoint (no instance can
have a widetag of anything other than instance-header-widetag),
but FUNCALLABLE-STANDARD-OBJECT is required to be a subclass of
STANDARD-OBJECT, and must therefore have the superclasses of
STANDARD-OBJECT among its superclasses. If INSTANCE is one of
those, FUNCALLABLE-INSTANCE cannot be, so F-S-Os would not be of
type FUNCALLABLE-INSTANCE (which is wrong); if it is not one of
those, then ordinary S-Os would not be of type INSTANCE (which
is wrong). CMUCL, at the time of writing, exhibits type system
confusion in this area, as demonstrated by CSR cmucl-imp
So, we need to do something else; probably most straightforward
to make INSTANCE and FUNCALLABLE-INSTANCE named types, as they
are of the same order of specialness as e.g. T -- not quite as
special, but almost. Some hacking later...
... the usual type system dance. Play whack-a-mole with test
failures and compilation failures until they all go
away. Primtype, class, typetran, and so on are
... somewhat hacky code for determining when a class is subtypep
instance / funcallable-instance.
... different hard-coded constants for genesis; don't make a
special instance-layout, because the instance class is
... just to prove we've achieved something, make STANDARD-OBJECT
a superclass of FUNCALLABLE-STANDARD-OBJECT.
(Supporting METAOBJECT should be straightforward now)
... many many new tests, both of the before-xc variety (it's
amazing in how many ways I can get the type system
wrong) and of the regular form. Also add some
ctor tests that aren't exercised yet.
RCS file: /cvsroot/sbcl/sbcl/NEWS,v
retrieving revision 1.872
retrieving revision 1.873
diff -u -d -r1.872 -r1.873
--- NEWS 6 Sep 2005 15:58:55 -0000 1.872
+++ NEWS 9 Sep 2005 14:16:17 -0000 1.873
@@ -28,6 +28,8 @@
funcallable-instances. (reported by Cyrus Harmon)
* bug fix: FUNCTIONP and (LAMBDA (X) (TYPEP X 'FUNCTION)) are now
consistent, even on internal alternate-metaclass objects.
+ * bug fix: SB-MOP:FUNCALLABLE-STANDARD-OBJECT is now a subclass of
+ STANDARD-OBJECT, as required by AMOP.
** bug fix: parent thread now can be gc'ed even with a live
RCS file: /cvsroot/sbcl/sbcl/version.lisp-expr,v
retrieving revision 1.2398
retrieving revision 1.2399
diff -u -d -r1.2398 -r1.2399
--- version.lisp-expr 9 Sep 2005 11:39:33 -0000 1.2398
+++ version.lisp-expr 9 Sep 2005 14:16:17 -0000 1.2399
@@ -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".)