author | Stefan Vogel <sv@exept.de> |
Tue, 28 Apr 2020 16:22:26 +0200 | |
changeset 25375 | b784fc06a5eb |
parent 24787 | da4c7b37af78 |
permissions | -rw-r--r-- |
24787 | 1 |
"{ Encoding: utf8 }" |
2 |
||
14273 | 3 |
" |
4 |
COPYRIGHT (c) 2012 by Claus Gittinger |
|
5 |
All Rights Reserved |
|
6 |
||
7 |
This software is furnished under a license and may be used |
|
8 |
only in accordance with the terms of that license and with the |
|
9 |
inclusion of the above copyright notice. This software may not |
|
10 |
be provided or otherwise made available to, or used by, any |
|
11 |
other person. No title to or ownership of the software is |
|
12 |
hereby transferred. |
|
13 |
" |
|
14 |
"{ Package: 'stx:libbasic' }" |
|
15 |
||
17342
0cbab4ee5dc8
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
17107
diff
changeset
|
16 |
"{ NameSpace: Smalltalk }" |
0cbab4ee5dc8
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
17107
diff
changeset
|
17 |
|
14273 | 18 |
Method variableSubclass:#MethodWithBreakpoints |
19 |
instanceVariableNames:'originalMethod' |
|
16603
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
20 |
classVariableNames:'BreakpointedMethods' |
14273 | 21 |
poolDictionaries:'' |
22 |
category:'Kernel-Methods' |
|
23 |
! |
|
24 |
||
25 |
!MethodWithBreakpoints class methodsFor:'documentation'! |
|
26 |
||
27 |
copyright |
|
28 |
" |
|
29 |
COPYRIGHT (c) 2012 by Claus Gittinger |
|
30 |
All Rights Reserved |
|
31 |
||
32 |
This software is furnished under a license and may be used |
|
33 |
only in accordance with the terms of that license and with the |
|
34 |
inclusion of the above copyright notice. This software may not |
|
35 |
be provided or otherwise made available to, or used by, any |
|
36 |
other person. No title to or ownership of the software is |
|
37 |
hereby transferred. |
|
38 |
" |
|
39 |
! |
|
40 |
||
41 |
documentation |
|
42 |
" |
|
43 |
support for line-Breakpoints |
|
44 |
||
45 |
instances of me are created when line-breakpoints are placed. |
|
46 |
The only function I serve is to provide the originalMethod information, |
|
47 |
and an easy way to check for having a breakpoint (is breakpointed). |
|
48 |
||
49 |
[author:] |
|
50 |
Claus Gittinger |
|
51 |
||
52 |
[see also:] |
|
53 |
Tools::BreakpointService |
|
54 |
" |
|
55 |
! ! |
|
56 |
||
16603
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
57 |
!MethodWithBreakpoints class methodsFor:'instance creation'! |
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
58 |
|
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
59 |
new |
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
60 |
|newMethod| |
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
61 |
|
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
62 |
newMethod := super new. |
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
63 |
BreakpointedMethods add:newMethod. |
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
64 |
^ newMethod |
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
65 |
! |
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
66 |
|
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
67 |
new:numLiterals |
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
68 |
|newMethod| |
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
69 |
|
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
70 |
newMethod := super new:numLiterals. |
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
71 |
BreakpointedMethods add:newMethod. |
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
72 |
^ newMethod |
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
73 |
! ! |
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
74 |
|
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
75 |
!MethodWithBreakpoints class methodsFor:'class initialization'! |
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
76 |
|
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
77 |
initialize |
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
78 |
BreakpointedMethods := WeakIdentitySet new. |
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
79 |
! ! |
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
80 |
|
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
81 |
!MethodWithBreakpoints class methodsFor:'misc'! |
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
82 |
|
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
83 |
removeAllBreakpoints |
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
84 |
"remove all statement breakpoints on any method in the whole system" |
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
85 |
|
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
86 |
MethodWithBreakpoints allBreakpointedMethods do:[:m | m restoreOriginalMethod] |
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
87 |
! ! |
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
88 |
|
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
89 |
!MethodWithBreakpoints class methodsFor:'queries'! |
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
90 |
|
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
91 |
allBreakpointedMethods |
16790
3d7753eeb111
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16603
diff
changeset
|
92 |
|invalidBreakpoints| |
3d7753eeb111
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16603
diff
changeset
|
93 |
|
16603
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
94 |
BreakpointedMethods isNil ifTrue:[^ #() ]. |
16790
3d7753eeb111
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16603
diff
changeset
|
95 |
invalidBreakpoints := BreakpointedMethods select:[:m | m mclass isNil]. |
17107
03c9aab4bbb3
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16790
diff
changeset
|
96 |
invalidBreakpoints do:[:each | BreakpointedMethods remove:each ifAbsent:nil]. |
16790
3d7753eeb111
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16603
diff
changeset
|
97 |
^ BreakpointedMethods asOrderedCollection |
16603
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
98 |
! ! |
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
99 |
|
14273 | 100 |
!MethodWithBreakpoints methodsFor:'accessing'! |
101 |
||
102 |
originalMethod |
|
24787 | 103 |
"return the original method; the one without breakpoints" |
104 |
||
14273 | 105 |
^ originalMethod |
106 |
! |
|
107 |
||
108 |
originalMethod:something |
|
109 |
originalMethod := something. |
|
24787 | 110 |
! |
111 |
||
112 |
originalMethodIfWrapped |
|
113 |
"return the original method; the one without breakpoints" |
|
114 |
||
115 |
^ originalMethod ? self |
|
14273 | 116 |
! ! |
117 |
||
15928
c73eba7ee86c
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
15718
diff
changeset
|
118 |
!MethodWithBreakpoints methodsFor:'enumeration'! |
c73eba7ee86c
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
15718
diff
changeset
|
119 |
|
c73eba7ee86c
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
15718
diff
changeset
|
120 |
breakpointsDo:aBlock |
c73eba7ee86c
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
15718
diff
changeset
|
121 |
self literalsDo:[:lit | |
c73eba7ee86c
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
15718
diff
changeset
|
122 |
lit class == Breakpoint ifTrue:[ |
c73eba7ee86c
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
15718
diff
changeset
|
123 |
aBlock value:lit |
c73eba7ee86c
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
15718
diff
changeset
|
124 |
] |
c73eba7ee86c
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
15718
diff
changeset
|
125 |
]. |
c73eba7ee86c
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
15718
diff
changeset
|
126 |
|
c73eba7ee86c
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
15718
diff
changeset
|
127 |
"Created: / 03-02-2014 / 10:34:45 / cg" |
c73eba7ee86c
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
15718
diff
changeset
|
128 |
! ! |
c73eba7ee86c
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
15718
diff
changeset
|
129 |
|
15505
4c46f8a71f52
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
14273
diff
changeset
|
130 |
!MethodWithBreakpoints methodsFor:'misc'! |
4c46f8a71f52
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
14273
diff
changeset
|
131 |
|
16603
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
132 |
disableAllBreakpoints |
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
133 |
"disable all of my breakpoints" |
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
134 |
|
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
135 |
self breakpointsDo:[:bp | bp disable]. |
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
136 |
! |
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
137 |
|
19851 | 138 |
disableBreakpointInLine:lineNr |
139 |
"disable one of my breakpoints" |
|
140 |
||
141 |
self breakpointsDo:[:bp | |
|
142 |
bp line == lineNr ifTrue:[ |
|
143 |
bp disable |
|
144 |
]. |
|
145 |
]. |
|
146 |
! |
|
147 |
||
15505
4c46f8a71f52
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
14273
diff
changeset
|
148 |
restoreOriginalMethod |
4c46f8a71f52
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
14273
diff
changeset
|
149 |
"remove myself - i.e. replace by the original method |
4c46f8a71f52
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
14273
diff
changeset
|
150 |
(i.e. the one without line breakpoints)" |
4c46f8a71f52
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
14273
diff
changeset
|
151 |
|
16413
74b15e61126e
Fixed MethodWithBreakpoints>>#restoreOriginalMethod
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15928
diff
changeset
|
152 |
| cls selector original | |
15505
4c46f8a71f52
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
14273
diff
changeset
|
153 |
|
4c46f8a71f52
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
14273
diff
changeset
|
154 |
(cls := self mclass) notNil ifTrue:[ |
4c46f8a71f52
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
14273
diff
changeset
|
155 |
(selector := self selector) notNil ifTrue:[ |
15718
061ac6f47a57
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
15505
diff
changeset
|
156 |
self breakPoint:#cg. |
16603
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
157 |
"/ disable my breakpoints, in case it is currently active |
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
158 |
self disableAllBreakpoints. |
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
159 |
|
16413
74b15e61126e
Fixed MethodWithBreakpoints>>#restoreOriginalMethod
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15928
diff
changeset
|
160 |
originalMethod notNil ifTrue:[ |
74b15e61126e
Fixed MethodWithBreakpoints>>#restoreOriginalMethod
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15928
diff
changeset
|
161 |
original := originalMethod |
74b15e61126e
Fixed MethodWithBreakpoints>>#restoreOriginalMethod
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15928
diff
changeset
|
162 |
] ifFalse:[ |
74b15e61126e
Fixed MethodWithBreakpoints>>#restoreOriginalMethod
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15928
diff
changeset
|
163 |
original := self programmingLanguage compilerClass |
74b15e61126e
Fixed MethodWithBreakpoints>>#restoreOriginalMethod
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15928
diff
changeset
|
164 |
compile: self source |
74b15e61126e
Fixed MethodWithBreakpoints>>#restoreOriginalMethod
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15928
diff
changeset
|
165 |
in: self mclass |
74b15e61126e
Fixed MethodWithBreakpoints>>#restoreOriginalMethod
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15928
diff
changeset
|
166 |
notifying:nil |
74b15e61126e
Fixed MethodWithBreakpoints>>#restoreOriginalMethod
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15928
diff
changeset
|
167 |
install:false |
74b15e61126e
Fixed MethodWithBreakpoints>>#restoreOriginalMethod
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15928
diff
changeset
|
168 |
ifFail:[ self error:'Failed to recompile method' ]. |
16415
8edd95b72ac5
Oops, when creating new method for restore, preserve package and category.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16413
diff
changeset
|
169 |
original setPackage: self package. |
8edd95b72ac5
Oops, when creating new method for restore, preserve package and category.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16413
diff
changeset
|
170 |
original setCategory: self category . |
16413
74b15e61126e
Fixed MethodWithBreakpoints>>#restoreOriginalMethod
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15928
diff
changeset
|
171 |
]. |
16603
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
172 |
cls basicAddSelector:selector withMethod:original. |
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
173 |
BreakpointedMethods remove:self ifAbsent:[]. |
15505
4c46f8a71f52
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
14273
diff
changeset
|
174 |
] |
4c46f8a71f52
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
14273
diff
changeset
|
175 |
] |
15718
061ac6f47a57
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
15505
diff
changeset
|
176 |
|
061ac6f47a57
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
15505
diff
changeset
|
177 |
"Modified: / 29-08-2013 / 01:17:05 / cg" |
16415
8edd95b72ac5
Oops, when creating new method for restore, preserve package and category.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16413
diff
changeset
|
178 |
"Modified: / 10-05-2014 / 11:03:19 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
15505
4c46f8a71f52
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
14273
diff
changeset
|
179 |
! ! |
4c46f8a71f52
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
14273
diff
changeset
|
180 |
|
14273 | 181 |
!MethodWithBreakpoints methodsFor:'queries'! |
182 |
||
17342
0cbab4ee5dc8
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
17107
diff
changeset
|
183 |
hasEnabledBreakpoints |
0cbab4ee5dc8
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
17107
diff
changeset
|
184 |
"true if any of my breakpoints is actually enabled" |
0cbab4ee5dc8
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
17107
diff
changeset
|
185 |
|
0cbab4ee5dc8
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
17107
diff
changeset
|
186 |
self breakpointsDo:[:any | |
20530 | 187 |
any isEnabled ifTrue:[ |
188 |
any isTracepoint ifFalse:[ ^ true]. |
|
189 |
]. |
|
190 |
]. |
|
191 |
^ false. |
|
192 |
! |
|
193 |
||
194 |
hasEnabledTracepoints |
|
195 |
"true if any of my tracepoints is actually enabled" |
|
196 |
||
197 |
self breakpointsDo:[:any | |
|
198 |
any isEnabled ifTrue:[ |
|
199 |
any isTracepoint ifTrue:[ |
|
200 |
^ true |
|
201 |
]. |
|
202 |
]. |
|
17342
0cbab4ee5dc8
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
17107
diff
changeset
|
203 |
]. |
0cbab4ee5dc8
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
17107
diff
changeset
|
204 |
^ false. |
23741 | 205 |
! ! |
206 |
||
207 |
!MethodWithBreakpoints methodsFor:'testing'! |
|
17342
0cbab4ee5dc8
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
17107
diff
changeset
|
208 |
|
14273 | 209 |
isMethodWithBreakpoints |
210 |
^ true |
|
211 |
||
212 |
"Created: / 01-08-2012 / 17:26:59 / cg" |
|
213 |
! ! |
|
214 |
||
215 |
!MethodWithBreakpoints class methodsFor:'documentation'! |
|
216 |
||
217 |
version |
|
19851 | 218 |
^ '$Header$' |
14273 | 219 |
! |
220 |
||
221 |
version_CVS |
|
19851 | 222 |
^ '$Header$' |
14273 | 223 |
! ! |
15505
4c46f8a71f52
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
14273
diff
changeset
|
224 |
|
16603
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
225 |
|
f416f263fe99
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
16415
diff
changeset
|
226 |
MethodWithBreakpoints initialize! |