On Mar 2, 2009, at 09:06 , Stéphane Ducasse wrote:
I continued to code a little tool based on code of Alain to detect deadcode, so far I'm too sick to have clear idea why it freezes on Morph.
This kinda reminds me of that moment in the horror film when you want to yell "Don't go in there!" at the characters on the screen.
lol
Except that you should do it from within the film itself and sit down watching ourselves. :)
May be I should use reflectivity or byesurgeon for that.
...or use objects as methods or method wrappers. I did a quick experiment with the package http://www.squeaksource.com/ObjectsAsMethodsWrap.html from Markus Gälli. Just had to fix the send of #removeSeletorSimply: with #removeSelectorSilently: to make it work (@Markus, could you add this or give me write access?). ((PackageInfo named: 'Morphic') classes gather: [ :each | ObjectAsOneTimeMethodWrapper installOnClass: each ]) inspect gets you a collection of wrapper objects which you can ask #executed. I opened all tools and menus in the image and got 2100 methods executed out of 6518. HTH, Adrian
But I'm curious to see until where we can go expecially since the dnu method and automatic recompilation is in place before transforming the methods.
Something else which is striking is that it is easier to redo a root hierarchy than doing a root morph
ProtoObject subclass then....
doesNotUnderstand: aMessage
| sel category | sel := aMessage selector. Transcript show: 'Does not understand ', aMessage selector printString ; cr. category := (Morph organization categoryOfElement: sel). self class compile: (Morph sourceCodeAt: sel) classified: category. ^ aMessage sentTo: self.
works for Object but not for Morph.
Stef
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project