Avi,
I forgot to ask you two things:
in one hand, that I don't see a #removeKey: in the TSTree. It can have it? in the other hand, what about the Btree that can search it's keys with wilcards (like #matchesForPrefix: for TSTree)?
best regards,
Sebastián Sastre
ssastre@seaswork.com.ar Seaswork Special Software Solutions www.seaswork.com.ar
-----Mensaje original----- De: squeak-dev-bounces@lists.squeakfoundation.org [mailto:squeak-dev-bounces@lists.squeakfoundation.org] En nombre de Sebastián Sastre Enviado el: Miércoles, 06 de Octubre de 2004 17:22 Para: 'The general-purpose Squeak developers list' Asunto: RE: Relative independence of odbs: IndexedCollection,the update problem
Avi,
that helped !... Comment: speed is not critical here because it has to be sent only at index creation time (once).
By the way, this indexes are in fact HomogeneousIndex, because the nature of the method wrappers that do not tolerate heterogenity. Because of that I've made a IndexedCollection subclass called HomogeneousIndexedCollection. This will be more efficient (I hope) but it only can store objects of the same class. The intention is to also have the IndexedCollection (who uses a proxy, minimal object, DNU, etc approach) with some lesser efficience but tolerating heterogenity.
I put the methodwrapper in the index, so the lifetime of the wrapper will be in sync with the lifetime of the index who want's to be arawe of that method call. I made a Registry class var in the indexes so they can receive a #finalize call when garbage collected, so they can uninstall the wrapper before disapear. I'm not completely convinced of this approach. Why they are not GC at once, and the wrapper uninstalled, when a workspace script variable that is the only who knows the collection is set to nil? (they actually do but I only see it after sending Smalltalk garbageCollect) What do you think? When do you think the uninstallation of the methodWrappers should be done? There are others/best approach you can see?
best regards,
Sebastián Sastre
ssastre@seaswork.com.ar Seaswork Special Software Solutions www.seaswork.com.ar
-----Mensaje original----- De: squeak-dev-bounces@lists.squeakfoundation.org [mailto:squeak-dev-bounces@lists.squeakfoundation.org] En nombre de Avi Bryant Enviado el: Jueves, 30 de Septiembre de 2004 17:53 Para: The general-purpose Squeak developers list Asunto: Re: Relative independence of odbs: IndexedCollection,the update problem
On Sep 30, 2004, at 10:15 PM, Sebastian Sastre wrote:
In your previous email you said that the system can know wich
methods
modify a defined instVar by scanning the bytecode. As I never make somethig like that I ask you to explain me a little more about this.
Probably the easiest is to use Behavior>>whichSelectorsStoreInto:. It only does the search for a specific inst var, but you can either send it once for each inst var in the class, or modify it to search for any stores (which would be faster).
Avi
--- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.772 / Virus Database: 519 - Release Date: 01/10/2004
--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.772 / Virus Database: 519 - Release Date: 01/10/2004
--- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.772 / Virus Database: 519 - Release Date: 01/10/2004
--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.772 / Virus Database: 519 - Release Date: 01/10/2004