Status: Accepted
Owner:
[hidden email]
CC:
[hidden email]
New issue 4672 by
[hidden email]: Lines of code of compiled methods
http://code.google.com/p/pharo/issues/detail?id=4672We have the following method:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
CompiledMethod>>linesOfCode
"An approximate measure of lines of code.
Includes comments, but excludes empty lines."
| lines |
lines := 0.
self getSource asString lineIndicesDo: [:start :endWithoutDelimiters :end |
endWithoutDelimiters > start ifTrue: [lines := lines+1]].
^lines
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Why empty lines are excluded? Does it make sense ? Why not simply "^ self
getSource lineCount"
White lines are important.
_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker