[squeak-dev] The Trunk: EToys-nice.73.mcz
commits at source.squeak.org
commits at source.squeak.org
Sun Aug 22 18:33:18 UTC 2010
Nicolas Cellier uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-nice.73.mcz
==================== Summary ====================
Name: EToys-nice.73
Author: nice
Time: 22 August 2010, 8:32:25.554 pm
UUID: 9ebe70ec-4d09-40b1-bcfc-a2db41cfc0de
Ancestors: EToys-ar.72
minor: avoid creating a SortedCollection when not necessary...
asSortedCollection asArray -> asArray sort
=============== Diff against EToys-ar.72 ===============
Item was changed:
----- Method: EtoysPresenter>>allExtantPlayers (in category 'intialize') -----
allExtantPlayers
"The initial intent here was to produce a list of Player objects associated with any Morph in the tree beneath the receiver's associatedMorph. whether it is the submorph tree or perhaps off on unseen bookPages. We have for the moment moved away from that initial intent, and in the current version we only deliver up players associated with the submorph tree only. <-- this note dates from 4/21/99
Call #flushPlayerListCache; to force recomputation."
| fullList |
playerList ifNotNil:
[^ playerList].
fullList := associatedMorph allMorphs select:
[:m | m player ~~ nil] thenCollect: [:m | m player].
fullList copy do:
[:aPlayer |
aPlayer class scripts do:
[:aScript | aScript isTextuallyCoded ifFalse:
[aScript currentScriptEditor ifNotNil: [:ed |
| objectsReferredToByTiles |
objectsReferredToByTiles := ed allMorphs
select:
[:aMorph | (aMorph isKindOf: TileMorph) and: [aMorph type == #objRef]]
thenCollect:
[:aMorph | aMorph actualObject].
fullList addAll: objectsReferredToByTiles]]]].
+ ^ playerList := fullList asSet asArray sort:
+ [:a :b | a externalName < b externalName]!
- ^ playerList := (fullList asSet asSortedCollection:
- [:a :b | a externalName < b externalName]) asArray!
Item was changed:
----- Method: SyntaxMorph classSide>>testAllMethodsOver: (in category 'as yet unclassified') -----
testAllMethodsOver: methodSize
"MessageTally spyOn: [SyntaxMorph testAllMethodsOver: 600]"
"Add up the total layout area for syntax morphs representing all
methods over the given size. This is a stress-test for SyntaxMorph
layout. A small value for the total area is also a figure of merit in the
presentation of Squeak source code in general."
"Results:
#(69 600 180820874 103700) 11/4
70% build morphs, 12% get source, 9% layout, 8% parse, 1% roundoff
Folded wide receivers, don't center keywords any more.
#(68 600 160033784 127727) 11/9
76% build morphs, 8% get source, 8% layout, 8% parse, 0% roundoff
Folded more messages, dropped extra vertical spacing in blocks.
#(68 600 109141704 137308) 11/10
79% build morphs, 6% get source, 8% layout, 7% parse
Folded more messages, dropped extra horizontal spacing.
#(68 600 106912968 132171) 11/10
80% build morphs, ??% get source, 11% layout, 7% parse
Unfolded keyword messages that will fit on one line.
#(68 600 96497372 132153) 11/10
81% build morphs, ??% get source, 8% layout, 8% parse
After alignment rewrite...
#(74 600 101082316 244799) 11/12
76% build morphs, 4% get source, 15% layout, 5% parse
After alignment rewrite...
#(74 600 101250620 204972) 11/15
74% build morphs, 6% get source, 13% layout, 7% parse
"
| biggies stats area |
biggies := self systemNavigation
allMethodsSelect: [:cm | cm size > methodSize].
stats := OrderedCollection new.
'Laying out all ' , biggies size printString , ' methods over ' , methodSize printString , ' bytes...'
displayProgressAt: Sensor cursorPoint
from: 1
to: biggies size
during: [:bar | biggies
withIndexDo: [:methodRef :i | | time |
bar value: i.
Utilities
setClassAndSelectorFrom: methodRef
in: [:aClass :aSelector | | source |
source := (aClass compiledMethodAt: aSelector) getSourceFromFile.
time := Time
millisecondsToRun: [ | tree morph |
tree := Compiler new
parse: source
in: aClass
notifying: nil.
morph := tree asMorphicSyntaxUsing: SyntaxMorph.
area := morph fullBounds area]].
stats add: {methodRef. area. time}]].
+ ^ {{
+ biggies size.
+ methodSize.
+ stats detectSum: [:a | a second].
+ stats detectSum: [:a | a third]
+ }.
+ stats asArray sort: [:x :y | x third >= y third]}!
- ^ {{biggies size. methodSize. stats
- detectSum: [:a | a second]. stats
- detectSum: [:a | a third]}. (stats
- asSortedCollection: [:x :y | x third >= y third]) asArray}!
More information about the Squeak-dev
mailing list
|