Dear List,

I was wondering whether there is a fast way to know the method call  
stack depth. Something like what follows does the job:

-=-=-=-=-=-=-=-=-=-=-=-=
| depth running |
depth := 0.
running := thisContext.
[ running sender notNil ] whileTrue: [ running := running sender.  
depth := depth + 1].
depth
-=-=-=-=-=-=-=-=-=-=-=-=

But it is rather slow. Anyone has a suggestion?

Cheers,
Alexandre
-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to