Nicolas Cellier uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-nice.380.mcz==================== Summary ====================
Name: Kernel-nice.380
Author: nice
Time: 19 January 2010, 12:38:51.701 am
UUID: 06edff56-56d3-4b50-baf5-34cdd716ca88
Ancestors: Kernel-nice.379
Fast-up linesOfCode
=============== Diff against Kernel-nice.379 ===============
Item was changed:
----- Method: CompiledMethod>>linesOfCode (in category 'source code management') -----
linesOfCode
"An approximate measure of lines of code.
+ Includes comments, but excludes empty lines."
+ | lines |
- Includes comments, but excludes blank lines."
- | strm line lines |
lines := 0.
+ self getSource asString lineIndicesDo: [:start :endWithoutDelimiters :end |
+ endWithoutDelimiters > start ifTrue: [lines := lines+1]].
+ ^lines!
- strm := ReadStream on: self getSource.
- [strm atEnd] whileFalse:
- [line := strm upTo: Character cr.
- line isEmpty ifFalse: [lines := lines+1]].
- ^lines !