[Pkg] The Trunk: Tools-nice.171.mcz
commits at source.squeak.org
commits at source.squeak.org
Tue Feb 9 08:53:44 UTC 2010
Nicolas Cellier uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-nice.171.mcz
==================== Summary ====================
Name: Tools-nice.171
Author: nice
Time: 9 February 2010, 9:53:25.331 am
UUID: 94579577-1940-7c4d-9588-f40861e5f43b
Ancestors: Tools-dtl.170
remove useless temps
avoid unnecessary non local return
=============== Diff against Tools-dtl.170 ===============
Item was changed:
----- Method: ProcessBrowser>>setUpdateCallbackAfter: (in category 'updating') -----
setUpdateCallbackAfter: seconds
+ [(Delay forSeconds: seconds) wait.
- | d |
- d := Delay forSeconds: seconds.
- [d wait.
- d := nil.
Project current addDeferredUIMessage: [self updateProcessList]] fork!
Item was changed:
----- Method: ProcessBrowser>>nextContext (in category 'process list') -----
nextContext
+ | initialProcessIndex initialStackIndex |
- | initialProcessIndex initialStackIndex found |
searchString isEmpty ifTrue: [ ^false ].
initialProcessIndex := self processListIndex.
initialStackIndex := self stackListIndex.
- found := false.
initialProcessIndex
to: self processList size
+ do: [:pi | self processListIndex: pi.
- do: [:pi | found
- ifFalse: [self processListIndex: pi.
self stackNameList
+ withIndexDo: [:name :si | (pi ~= initialProcessIndex
+ or: [si > initialStackIndex])
- withIndexDo: [:name :si | (found not
- and: [pi ~= initialProcessIndex
- or: [si > initialStackIndex]])
ifTrue: [(name includesSubString: searchString)
ifTrue: [self stackListIndex: si.
+ ^true]]]].
+ self processListIndex: initialProcessIndex.
+ self stackListIndex: initialStackIndex.
+ ^ false!
- found := true]]]]].
- found
- ifFalse: [self processListIndex: initialProcessIndex.
- self stackListIndex: initialStackIndex].
- ^ found!
Item was changed:
----- Method: TimeProfileBrowser>>setClassAndSelectorIn: (in category 'private') -----
setClassAndSelectorIn: csBlock
"Decode strings of the form <selectorName> (<className> [class]) "
self flag: #mref. "fix for faster references to methods"
+ ^[ | strm string class parens sel |
- [ | strm string class parens sel |
string := self selection asString.
string first == $* ifTrue: [^contents := nil]. "Ignore lines starting with *"
parens := string includes: $(. "Does it have open-paren?"
strm := ReadStream on: string.
parens
ifTrue: [strm skipTo: $(. "easy case"
class := strm upTo: $).
strm next: 2.
sel := strm upToEnd]
ifFalse: [strm position: (string findString: ' class>>').
strm position > 0
ifFalse: [strm position: (string findLast: [ :ch | ch == $ ])]
ifTrue:
[ | subString | "find the next to last space character"
subString := strm contents copyFrom: 1 to: (string findLast: [ :ch | ch == $ ]) - 1.
strm position: (subString findLast: [ :ch | ch == $ ])].
"ifFalse: [strm position: (string findLast: [ :ch | ch == $ ])."
class := strm upTo: $>.
strm next.
sel := strm upToEnd].
+ MessageSet parse: (class, ' ', sel) toClassAndSelector: csBlock]
+ on: Error do: [:ex | contents := nil]!
- ^ MessageSet parse: (class, ' ', sel) toClassAndSelector: csBlock]
- on: Error do: [:ex | ^ contents := nil]!
More information about the Packages
mailing list