[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: goops and memoization
From: |
Neil Jerram |
Subject: |
Re: goops and memoization |
Date: |
21 Nov 2002 23:50:20 +0000 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
>>>>> "Mikael" == Mikael Djurfeldt <address@hidden> writes:
Mikael> (An alternative solution is to implement compile-method in
Mikael> C, memoizing the source code while walking through it. In
Mikael> fact, that could mean that we don't need to call
Mikael> procedure-source => no need to unmemoize code.)
A further possibility occurs to me - transforming the method
definition at define-method time something like this:
(define-macro (make-method gf specializers formals . body)
`(letrec ((m (lambda ,formals
(define (next-method)
(call-next-method ,gf
,specializers
m
,@formals))
,@body)))
m))
Given the gf and specializers, call-next-method works out a list of
applicable methods (probably cached) in the same way as for a normal
gf application, then it looks through this list for m and applies the
method after m to the supplied arguments (formals).
Would this kind of approach work?
Neil
- goops and memoization, Dirk Herrmann, 2002/11/16
- Re: goops and memoization, Neil Jerram, 2002/11/17
- Re: goops and memoization, Dirk Herrmann, 2002/11/20
- Re: goops and memoization, Mikael Djurfeldt, 2002/11/20
- Re: goops and memoization, Mikael Djurfeldt, 2002/11/20
- Re: goops and memoization,
Neil Jerram <=
- Re: goops and memoization, Mikael Djurfeldt, 2002/11/21
- Re: goops and memoization, Mikael Djurfeldt, 2002/11/21
- Re: goops and memoization, Neil Jerram, 2002/11/24
- Re: goops and memoization, Mikael Djurfeldt, 2002/11/24
- Re: goops and memoization, Neil Jerram, 2002/11/21
- Re: goops and memoization, Mikael Djurfeldt, 2002/11/21
- Re: goops and memoization, Neil Jerram, 2002/11/29
- Re: goops and memoization, Neil Jerram, 2002/11/29
- Re: goops and memoization, Neil Jerram, 2002/11/21
- Re: goops and memoization, Dirk Herrmann, 2002/11/24