[Ecls-list] And another CLOS Bug...

Pascal Costanza pc at p-cos.net
Mon Nov 30 08:45:31 UTC 2009


On 30 Nov 2009, at 08:57, Juan Jose Garcia-Ripoll wrote:

> On Mon, Nov 30, 2009 at 1:01 AM, Pascal Costanza <pc at p-cos.net> wrote:
>> Hi,
>> 
>> The only bug that remains at the moment is the the spurious type check in initialize-instance when there is a dynamic-extent declaration.
> 
> That is weird. I must have overlooked it. But ECL does not support
> dynamic-extent: it will simply ignore the declaration. Something else
> must be going on here.

If I write this:

(defmethod initialize-instance :around ((gf my-generic-function) &rest args)
  (declare (dynamic-extent args))
  ...)

Somewhere along the lines the ECL compiler adds the following declarations:

(defmethod initialize-instance :around ((gf my-generic-function) &rest args)
  (declare (type my-generic-function gf)
           (si::no-check-type gf)
           (dynamic-extent args))
  ...)

At some stage, it then turns the type declaration into (type function gf), because that seems easier to check. However, the si::no-check-type declaration should prevent any type checking on the specified variable. That seems to be fine when dynamic-extent is gone, but when it's there, that doesn't seem to happen anymore.

My guess is that the bug is somewhere there, where the 'optional-check-type instructions are generated.


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










More information about the ecl-devel mailing list