author | Jan Vrany <jan.vrany@labware.com> |
Wed, 08 Mar 2023 16:40:41 +0000 | |
branch | jv |
changeset 19643 | b3148ab32c03 |
parent 18532 | cccb41254edf |
permissions | -rw-r--r-- |
18532
cccb41254edf
Issue #239: Fix all Smalltak/X source files to be in unicode (UTF8 without BOM) and prefixed by "{ Encoding: utf8 }" when any unicode character is present
Patrik Svestka <patrik.svestka@gmail.com>
parents:
12431
diff
changeset
|
1 |
"{ Encoding: utf8 }" |
cccb41254edf
Issue #239: Fix all Smalltak/X source files to be in unicode (UTF8 without BOM) and prefixed by "{ Encoding: utf8 }" when any unicode character is present
Patrik Svestka <patrik.svestka@gmail.com>
parents:
12431
diff
changeset
|
2 |
|
9993 | 3 |
" |
10059 | 4 |
COPYRIGHT (c) 2010 by Jan Vrany, SWING Research Group. CTU in Prague |
5 |
All Rights Reserved |
|
9993 | 6 |
|
10059 | 7 |
Permission is hereby granted, free of charge, to any person |
8 |
obtaining a copy of this software and associated documentation |
|
9 |
files (the 'Software'), to deal in the Software without |
|
10 |
restriction, including without limitation the rights to use, |
|
11 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
12 |
copies of the Software, and to permit persons to whom the |
|
13 |
Software is furnished to do so, subject to the following |
|
14 |
conditions: |
|
15 |
||
16 |
The above copyright notice and this permission notice shall be |
|
17 |
included in all copies or substantial portions of the Software. |
|
18 |
||
19 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
20 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
21 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
22 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
23 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
24 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
25 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
26 |
OTHER DEALINGS IN THE SOFTWARE. |
|
9993 | 27 |
" |
28 |
"{ Package: 'stx:libtool' }" |
|
29 |
||
30 |
"{ NameSpace: Tools }" |
|
31 |
||
32 |
HierarchicalItem subclass:#ProfilerInfoItem |
|
33 |
instanceVariableNames:'method isBlock tally' |
|
34 |
classVariableNames:'' |
|
35 |
poolDictionaries:'' |
|
36 |
category:'Interface-Browsers-New-Profiler' |
|
37 |
! |
|
38 |
||
39 |
!ProfilerInfoItem class methodsFor:'documentation'! |
|
40 |
||
41 |
copyright |
|
42 |
" |
|
10059 | 43 |
COPYRIGHT (c) 2010 by Jan Vrany, SWING Research Group. CTU in Prague |
44 |
All Rights Reserved |
|
45 |
||
46 |
Permission is hereby granted, free of charge, to any person |
|
47 |
obtaining a copy of this software and associated documentation |
|
48 |
files (the 'Software'), to deal in the Software without |
|
49 |
restriction, including without limitation the rights to use, |
|
50 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
51 |
copies of the Software, and to permit persons to whom the |
|
52 |
Software is furnished to do so, subject to the following |
|
53 |
conditions: |
|
9993 | 54 |
|
10059 | 55 |
The above copyright notice and this permission notice shall be |
56 |
included in all copies or substantial portions of the Software. |
|
57 |
||
58 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
59 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
60 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
61 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
62 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
63 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
64 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
65 |
OTHER DEALINGS IN THE SOFTWARE. |
|
9993 | 66 |
" |
67 |
! ! |
|
68 |
||
69 |
!ProfilerInfoItem methodsFor:'accessing'! |
|
70 |
||
71 |
isBlock |
|
72 |
^ isBlock ? false |
|
73 |
||
74 |
"Created: / 01-12-2007 / 20:38:11 / janfrog" |
|
75 |
"Modified: / 01-12-2007 / 23:54:48 / janfrog" |
|
76 |
! |
|
77 |
||
78 |
isBlock:aBoolean |
|
79 |
isBlock := aBoolean. |
|
80 |
||
81 |
"Created: / 01-12-2007 / 20:38:11 / janfrog" |
|
82 |
! |
|
83 |
||
84 |
label |
|
85 |
^self tallyLabel, ' in ', |
|
86 |
self methodLabel, ' ', |
|
87 |
self packageLabel |
|
88 |
||
89 |
"Created: / 01-12-2007 / 20:46:01 / janfrog" |
|
90 |
! |
|
91 |
||
92 |
method |
|
93 |
^ method |
|
94 |
||
95 |
"Created: / 01-12-2007 / 20:38:11 / janfrog" |
|
96 |
! |
|
97 |
||
98 |
method:aCompiledMethod |
|
99 |
method := aCompiledMethod. |
|
100 |
||
101 |
"Created: / 01-12-2007 / 20:38:11 / janfrog" |
|
102 |
! |
|
103 |
||
104 |
methodClass |
|
105 |
||
106 |
| mthd | |
|
107 |
mthd := self method. |
|
10427 | 108 |
^mthd notNil |
109 |
ifTrue:[method mclass] |
|
110 |
ifFalse:[UndefinedObject] |
|
9993 | 111 |
|
112 |
"Created: / 01-12-2007 / 20:49:57 / janfrog" |
|
113 |
"Modified: / 28-08-2010 / 21:02:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10427 | 114 |
"Modified: / 02-08-2011 / 09:35:53 / cg" |
9993 | 115 |
! |
116 |
||
117 |
methodLabel |
|
118 |
||
119 |
^(self isBlock ifTrue:['[] in '] ifFalse:['']), |
|
10833 | 120 |
(self selector ? '???') , |
121 |
(' [' , (self methodClass isNil ifTrue:['???'] ifFalse:[self methodClass nameWithoutPrefix]) , ']') asText allBold |
|
9993 | 122 |
|
123 |
"Created: / 01-12-2007 / 20:56:29 / janfrog" |
|
124 |
"Modified: / 01-12-2007 / 23:58:35 / janfrog" |
|
10833 | 125 |
"Modified: / 18-10-2011 / 17:04:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
9993 | 126 |
! |
127 |
||
128 |
packageLabel |
|
12025 | 129 |
|pkg| |
9993 | 130 |
|
12025 | 131 |
pkg := method isNil ifTrue:['???'] ifFalse:[method package]. |
132 |
^('[' , pkg , ']') asText allItalic |
|
9993 | 133 |
|
134 |
"Created: / 01-12-2007 / 20:58:18 / janfrog" |
|
135 |
! |
|
136 |
||
137 |
selector |
|
138 |
||
139 |
| mthd | |
|
140 |
mthd := self method. |
|
10427 | 141 |
^mthd notNil |
142 |
ifTrue:[method selector] |
|
143 |
ifFalse:['<no method>'] |
|
9993 | 144 |
|
145 |
"Created: / 01-12-2007 / 20:49:13 / janfrog" |
|
146 |
"Modified: / 28-08-2010 / 21:00:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10427 | 147 |
"Modified (format): / 02-08-2011 / 09:35:32 / cg" |
9993 | 148 |
! |
149 |
||
150 |
tally |
|
151 |
^ tally ? 0 |
|
152 |
||
153 |
"Created: / 01-12-2007 / 20:38:11 / janfrog" |
|
154 |
"Modified: / 01-12-2007 / 23:43:58 / janfrog" |
|
155 |
! |
|
156 |
||
157 |
tally:anInteger |
|
158 |
tally := anInteger. |
|
159 |
||
160 |
"Created: / 01-12-2007 / 20:38:11 / janfrog" |
|
161 |
! |
|
162 |
||
163 |
tallyAdd: anInteger |
|
164 |
||
165 |
tally := self tally + anInteger |
|
166 |
||
167 |
"Created: / 01-12-2007 / 22:53:55 / janfrog" |
|
168 |
! |
|
169 |
||
170 |
tallyLabel |
|
171 |
||
172 |
^self tally printString , '% ' |
|
173 |
||
174 |
"Created: / 01-12-2007 / 20:47:09 / janfrog" |
|
175 |
! ! |
|
176 |
||
177 |
!ProfilerInfoItem methodsFor:'accessing - private'! |
|
178 |
||
179 |
setChildren: collection |
|
180 |
||
181 |
children := collection. |
|
182 |
children do:[:e|e parent:e] |
|
183 |
||
184 |
"Created: / 01-12-2007 / 20:43:36 / janfrog" |
|
185 |
! ! |
|
186 |
||
187 |
!ProfilerInfoItem methodsFor:'comparing'! |
|
188 |
||
189 |
= anotherMethodInfo |
|
190 |
||
191 |
^self class == anotherMethodInfo class |
|
192 |
and:[self method = anotherMethodInfo method |
|
193 |
and:[self isBlock = anotherMethodInfo isBlock]] |
|
194 |
||
195 |
"Created: / 01-12-2007 / 21:20:33 / janfrog" |
|
196 |
! |
|
197 |
||
198 |
hash |
|
199 |
||
200 |
^self method hash bitXor: [self isBlock hash] |
|
201 |
||
202 |
"Created: / 01-12-2007 / 21:17:01 / janfrog" |
|
203 |
! ! |
|
204 |
||
205 |
!ProfilerInfoItem class methodsFor:'documentation'! |
|
206 |
||
207 |
version_CVS |
|
12025 | 208 |
^ '$Header: /cvs/stx/stx/libtool/Tools__ProfilerInfoItem.st,v 1.5 2012-11-04 21:40:34 cg Exp $' |
9993 | 209 |
! |
210 |
||
12431
9f0c59c742d5
Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12401
diff
changeset
|
211 |
version_HG |
9f0c59c742d5
Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12401
diff
changeset
|
212 |
|
9f0c59c742d5
Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12401
diff
changeset
|
213 |
^ '$Changeset: <not expanded> $' |
9f0c59c742d5
Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12401
diff
changeset
|
214 |
! |
9f0c59c742d5
Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12401
diff
changeset
|
215 |
|
9993 | 216 |
version_SVN |
18532
cccb41254edf
Issue #239: Fix all Smalltak/X source files to be in unicode (UTF8 without BOM) and prefixed by "{ Encoding: utf8 }" when any unicode character is present
Patrik Svestka <patrik.svestka@gmail.com>
parents:
12431
diff
changeset
|
217 |
^ '§Id: Tools__ProfilerInfoItem.st 7486 2009-10-26 22:06:24Z vranyj1 §' |
9993 | 218 |
! ! |
12401
4714b9640528
Merged 235b77901045 and 8332590c5a41 (branch default)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
219 |