After some discussing some problem with method-function of accessor methods
(specifically, the code got NIL for a pv-cell),
On 7/7/07, Christophe Rhodes <csr21@...> wrote:
> I think I understand. The problem (I think) is that, in
> MAKE-STD-READER-METHOD-FUNCTION, the call to MAKE-METHOD-FUNCTION
> calls MAKE-METHOD-LAMBDA, which because of happening at the wrong time
> (MAKE-METHOD-FUNCTION is a macro!) doesn't return the right
> slot-name-lists. You can see that I worked around that in
> MAKE-STD-READER-METHOD-FUNCTION itself, but that doesn't fix the
> method function (-from fast-method-function) of the method itself,
> which is wrong.
I have a patch (attached) so that the method functions (for
STD-READER, STD-WRITER and STD-BOUNDP) close over cons cells that will
point to the right pv-table once the method has been initialised.
Unfortunately, it seems to trigger some circularity while PCL is
booting, so the previous broken version is used until boot is
complete. I don't know whether that's an issue at all.
The patch also includes a test that calls method-function of writer
and reader methods, in mop.impure.lisp (due to the use of
method-function). It builds and tests as usual on darwin/x86.