[Openmcl-devel] Problem with class-prototype

Gary Byers gb at clozure.com
Fri Jan 1 13:58:48 PST 2010


This should be fixed in the trunk as of r13351; assuming that the fix is correct,
I can't think of any reason not to apply the changes to 1.4 as well.

Most of the problems had to do with code trying to discriminate between 
STANDARD-OBJECTs and [STANDARD-]GENERIC-FUNCTIONs (as the TYPE-ERROR
indicates) and not handling FUNCALLABLE-STANDARD-OBJECTs correctly (if at all).
I didn't do an exhaustive search to see if any other code was confused about
this.

(Additionally, getting past that incorrect type discrimination by causing
UPDATE-INSTANCE-FOR-REDEFINED-CLASS on a STANDARD-GENERIC-FUNCTION ran into
code that tried to treat the STANDARD-GENERIC-FUNCTION as if it was a
STANDARD-OBJECT, and that may have been what caused the memory faults you
saw.)

Lastly: a bug report to the mailing list is much better than no bug report
at all, but entering the bug in Trac is even better.  (We did a server
upgrade a month or so ago and there have been problems with parts of Trac
that mail forgotten Trac passwords.  Matt seems to have fixed those problems,
so anyone who's been discouraged from filing bugs in Trac because of this
should feel free to fire away.)

On Fri, 1 Jan 2010, Pascal Costanza wrote:

> Hi there,
>
> Happy new year!
>
> class-prototype doesn't seem to interact well with redefinition of classes with metaclass funcallable-standard-class. See the following transcript:
>
> ? (defclass foo () ())
> #<STANDARD-CLASS FOO>
> ? (class-prototype (find-class 'foo))
> #<FOO #x300041443BED>
> ? (defclass foo () ())
> #<STANDARD-CLASS FOO>
> ? (class-prototype (find-class 'foo))
> #<FOO #x300041443BED>
> ? (defclass bar () ()
>    (:metaclass funcallable-standard-class))
> #<FUNCALLABLE-STANDARD-CLASS BAR>
> ? (class-prototype (find-class 'bar))
> #<BAR #x30004143F9DF>
> ? (defclass bar () ()
>    (:metaclass funcallable-standard-class))
> #<FUNCALLABLE-STANDARD-CLASS BAR>
> ? (class-prototype (find-class 'bar))
>> Error: value #<error printing BAR #x30004143F9DF> is not of the expected type (OR CCL::STANDARD-INSTANCE STANDARD-GENERIC-FUNCTION).
>> While executing: CCL::UPDATE-OBSOLETE-INSTANCE, in process listener(1).
>> Type :POP to abort, :R for a list of available restarts.
>> Type :? for other options.
>
>
> In other situations, I get an 'invalid memory operation' there, or something like that.
>
> Any idea?
>
> Best,
> Pascal
>
> -- 
> Pascal Costanza, mailto:pc at p-cos.net, http://p-cos.net
> Vrije Universiteit Brussel
> Software Languages Lab
> Pleinlaan 2, B-1050 Brussel, Belgium
>
>
>
>
>
>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>
>



More information about the Openmcl-devel mailing list