From: Christophe R. <cs...@ca...> - 2009-09-09 10:56:15
|
Attila Lendvai <att...@gm...> writes: >> If initialization is truly too slow for you, you might want to consider >> effectively extending or specializing the ctor optimization (which >> basically precomputes the association between keyword initargs and >> slots) for your case, which I think is probably the conclusion you've >> reached too. > > > http://common-lisp.net/cgi-bin/darcsweb/darcsweb.cgi/darcsweb.cgi?r=cl-dwim-wui;a=headblob;f=/src/component/sbcl-ctor-kludge.lisp > > as a reference, we've done that, extended sbcl ctor optimizations. > > it's ugly, because the sbcl ctor code does not provide customization > hooks as of now [...] I doubt the sbcl ctor code will ever provide "customization hooks". What it might do is be extended to work when there are non-standard methods on (setf slot-value-using-class), which if I read your code right is your issue. It should be relatively straightforward to extend SLOT-INIT-FORMS to call (setf slot-value-using-class) rather than (setf clos-slots-ref) when setting a location whose slot definition has an applicable method on (setf slot-value-using-class) -- and similarly adapting the boundp tests (though from your code that's not immediately relevant for you). Cheers, Christophe |