[Ecls-list] Generic-function-method-class not dispatched correctly...

Pascal Costanza pc at p-cos.net
Sun Sep 9 17:11:29 UTC 2012


Hi,

It seems this bug report has not been acknowledged. Did I report it correctly to this mailing list, or is there a better way to report it?

Best,
Pascal

On 2 Sep 2012, at 16:38, Pascal Costanza <pc at p-cos.net> wrote:

> Hi,
> 
> [Working on an update of Closer to MOP for ECL 12.7.1, which is more work than usual… ;)]
> 
> This is a bug in ECL 12.7.1. Here is a transcript to illustrate this:
> 
>> (use-package :clos)
> 
> T
>> (defun ext-generic-function-method-class (gf) (generic-function-method-class gf))
> 
> EXT-GENERIC-FUNCTION-METHOD-CLASS
>> (compile 'ext-generic-function-method-class)
> 
> ;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
> ;;;
> ;;; End of Pass 1.
> EXT-GENERIC-FUNCTION-METHOD-CLASS
> NIL
> NIL
>> (defclass my-generic-function (standard-generic-function) () (:metaclass funcallable-standard-class))
> 
> #<The FUNCALLABLE-STANDARD-CLASS MY-GENERIC-FUNCTION>
>> (defmethod generic-function-method-class :after ((gf my-generic-function)) (print :foo))
> 
> #<standard-method GENERIC-FUNCTION-METHOD-CLASS (#<The FUNCALLABLE-STANDARD-CLASS MY-GENERIC-FUNCTION>)>
>> (defgeneric test (object) (:generic-function-class my-generic-function))
> 
> #<my-generic-function TEST>
>> (ext-generic-function-method-class #'test)
> 
> #<The STANDARD-CLASS STANDARD-METHOD>
>> (generic-function-method-class #'test)
> 
> :FOO 
> #<The STANDARD-CLASS STANDARD-METHOD>
> 
> 
> The fact that ext-generic-function-method-class is compiled seems to be important here, and it seems that the dispatch is fixed to the methods known at the time it is compiled. But I'm just guessing here…
> 
> 
> Pascal
> 
> --
> Pascal Costanza
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Ecls-list mailing list
> Ecls-list at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ecls-list

--
Pascal Costanza







More information about the ecl-devel mailing list