1
|
1 |
"
|
5
|
2 |
COPYRIGHT (c) 1992 by Claus Gittinger
|
1
|
3 |
All Rights Reserved
|
|
4 |
|
|
5 |
This software is furnished under a license and may be used
|
|
6 |
only in accordance with the terms of that license and with the
|
|
7 |
inclusion of the above copyright notice. This software may not
|
|
8 |
be provided or otherwise made available to, or used by, any
|
|
9 |
other person. No title to or ownership of the software is
|
|
10 |
hereby transferred.
|
|
11 |
"
|
|
12 |
|
|
13 |
Object subclass:#ObjectMemory
|
|
14 |
instanceVariableNames:''
|
2
|
15 |
classVariableNames:'InternalErrorHandler UserInterruptHandler TimerInterruptHandler
|
|
16 |
SpyInterruptHandler StepInterruptHandler ExceptionInterruptHandler
|
|
17 |
ErrorInterruptHandler MemoryInterruptHandler SignalInterruptHandler
|
|
18 |
ChildSignalInterruptHandler DisposeInterruptHandler
|
|
19 |
RecursionInterruptHandler IOInterruptHandler
|
|
20 |
|
|
21 |
AllocationFailureSignal
|
10
|
22 |
IncrementalGCLimit
|
|
23 |
Dependents'
|
1
|
24 |
poolDictionaries:''
|
|
25 |
category:'System-Support'
|
|
26 |
!
|
|
27 |
|
|
28 |
ObjectMemory comment:'
|
|
29 |
|
5
|
30 |
COPYRIGHT (c) 1992 by Claus Gittinger
|
1
|
31 |
All Rights Reserved
|
|
32 |
|
10
|
33 |
$Header: /cvs/stx/stx/libbasic/Attic/ObjMem.st,v 1.5 1993-11-08 02:31:07 claus Exp $
|
2
|
34 |
'!
|
|
35 |
|
|
36 |
!ObjectMemory class methodsFor:'documentation'!
|
|
37 |
|
|
38 |
documentation
|
|
39 |
"
|
1
|
40 |
This class contains access methods to the system memory -
|
|
41 |
in previous versions this stuff used to be in the Smalltalk class.
|
|
42 |
It has been separated for better overall structure.
|
|
43 |
|
2
|
44 |
kludge:
|
|
45 |
The InterruptHandler variables are known by the runtime system -
|
|
46 |
they are the objects that get an interrupt message when the event
|
|
47 |
occurs.
|
|
48 |
|
|
49 |
ClassVariables:
|
|
50 |
|
|
51 |
InternalErrorHandler gets informed, when some runtime error occurs
|
|
52 |
(usually fatal)
|
|
53 |
|
|
54 |
UserInterruptHandler gets informed when CNTL-C is pressed
|
|
55 |
TimerInterruptHandler gets alarm timer interrupts
|
|
56 |
SpyInterruptHandler another alarm timer
|
|
57 |
StepInterruptHandler gets single step interrupts
|
|
58 |
ExceptionInterruptHandler gets floating point exceptions
|
|
59 |
ErrorInterruptHandler gets graphic device errors
|
|
60 |
MemoryInterruptHandler gets out of memory conditions
|
|
61 |
SignalInterruptHandler gets unix signals
|
|
62 |
ChildSignalInterruptHandler gets child death signals
|
|
63 |
DisposeInterruptHandler gets informed, when an object is disposed from
|
|
64 |
a shadowArray
|
|
65 |
RecursionInterruptHandler gets recursion limit violations
|
|
66 |
IOInterruptHandler get SIGIO unix signals
|
|
67 |
|
|
68 |
AllocationFailureSignal signal raised when a new fails (see Behavior)
|
|
69 |
IngrementalGCLimit number of bytes, that must be allocated since
|
|
70 |
last full garbage collect to turn on incremental
|
|
71 |
collector.
|
10
|
72 |
Dependents keep my dependents locally (its faster) for
|
|
73 |
all those registries
|
2
|
74 |
"
|
|
75 |
! !
|
|
76 |
|
|
77 |
!ObjectMemory class methodsFor:'initialization'!
|
|
78 |
|
|
79 |
initialize
|
|
80 |
AllocationFailureSignal isNil ifTrue:[
|
|
81 |
AllocationFailureSignal := (Signal new) mayProceed:true.
|
|
82 |
AllocationFailureSignal notifierString:'allocation failure'.
|
|
83 |
].
|
|
84 |
IncrementalGCLimit := 500000.
|
|
85 |
! !
|
|
86 |
|
|
87 |
!ObjectMemory class methodsFor:'signal access'!
|
|
88 |
|
|
89 |
allocationFailureSignal
|
|
90 |
^ AllocationFailureSignal
|
|
91 |
! !
|
1
|
92 |
|
10
|
93 |
!ObjectMemory class methodsFor:'dependents access'!
|
|
94 |
|
|
95 |
dependents
|
|
96 |
"return the colleciton of my dependents"
|
|
97 |
|
|
98 |
^ Dependents
|
|
99 |
!
|
|
100 |
|
|
101 |
dependents:aCollection
|
|
102 |
"set the dependents collection"
|
|
103 |
|
|
104 |
Dependents := aCollection
|
|
105 |
! !
|
|
106 |
|
1
|
107 |
!ObjectMemory class methodsFor:'cache management'!
|
|
108 |
|
|
109 |
flushInlineCachesForClass:aClass
|
|
110 |
"flush inlinecaches for calls to aClass"
|
|
111 |
|
|
112 |
%{ /* NOCONTEXT */
|
|
113 |
__flushInlineCachesFor(aClass);
|
|
114 |
%}
|
|
115 |
!
|
|
116 |
|
|
117 |
flushInlineCachesWithArgs:nargs
|
|
118 |
"flush inlinecaches for calls with nargs arguments"
|
|
119 |
|
|
120 |
%{ /* NOCONTEXT */
|
|
121 |
__flushInlineCaches(_intVal(nargs));
|
|
122 |
%}
|
|
123 |
!
|
|
124 |
|
|
125 |
flushInlineCachesFor:aClass withArgs:nargs
|
|
126 |
"flush inlinecaches for calls to aClass with nargs arguments"
|
|
127 |
|
|
128 |
%{ /* NOCONTEXT */
|
|
129 |
__flushInlineCachesForAndNargs(aClass, _intVal(nargs));
|
|
130 |
%}
|
|
131 |
!
|
|
132 |
|
|
133 |
flushInlineCaches
|
|
134 |
"flush all inlinecaches"
|
|
135 |
|
|
136 |
%{ /* NOCONTEXT */
|
|
137 |
__flushAllInlineCaches();
|
|
138 |
%}
|
|
139 |
!
|
|
140 |
|
|
141 |
flushMethodCacheFor:aClass
|
|
142 |
"flush the method cache for sends to aClass"
|
|
143 |
|
|
144 |
%{ /* NOCONTEXT */
|
|
145 |
__flushMethodCacheFor(aClass);
|
|
146 |
%}
|
|
147 |
!
|
|
148 |
|
|
149 |
flushMethodCache
|
|
150 |
"flush the method cache"
|
|
151 |
|
|
152 |
%{ /* NOCONTEXT */
|
|
153 |
__flushMethodCache();
|
|
154 |
%}
|
|
155 |
!
|
|
156 |
|
2
|
157 |
flushCachesFor:aClass
|
|
158 |
"flush method and inline caches for aClass"
|
|
159 |
|
|
160 |
%{ /* NOCONTEXT */
|
|
161 |
__flushMethodCacheFor(aClass);
|
|
162 |
__flushInlineCachesFor(aClass);
|
|
163 |
%}
|
|
164 |
!
|
|
165 |
|
1
|
166 |
flushCaches
|
2
|
167 |
"flush method and inline caches for all classes"
|
1
|
168 |
|
|
169 |
%{ /* NOCONTEXT */
|
|
170 |
__flushMethodCache();
|
|
171 |
__flushAllInlineCaches();
|
|
172 |
%}
|
|
173 |
! !
|
|
174 |
|
|
175 |
!ObjectMemory class methodsFor:'enumeration'!
|
|
176 |
|
|
177 |
allObjectsDo:aBlock
|
|
178 |
"evaluate the argument, aBlock for all objects in the system"
|
2
|
179 |
|
|
180 |
|work|
|
1
|
181 |
%{
|
2
|
182 |
nonTenuringScavenge(__context);
|
|
183 |
/*
|
|
184 |
* allObjectsDo needs a temporary to hold newSpace objects
|
|
185 |
*/
|
|
186 |
__allObjectsDo(&aBlock, &work COMMA_CON);
|
|
187 |
%}
|
|
188 |
!
|
|
189 |
|
|
190 |
allOldObjectsDo:aBlock
|
|
191 |
"evaluate the argument, aBlock for all old objects in the system.
|
|
192 |
For debugging and tests only - do not use"
|
|
193 |
%{
|
|
194 |
__allObjectsDo(&aBlock, (OBJ *)0 COMMA_CON);
|
1
|
195 |
%}
|
|
196 |
! !
|
|
197 |
|
2
|
198 |
!ObjectMemory class methodsFor:'handler access'!
|
|
199 |
|
|
200 |
internalErrorHandler
|
|
201 |
^ InternalErrorHandler
|
|
202 |
!
|
|
203 |
|
|
204 |
userInterruptHandler
|
|
205 |
^ UserInterruptHandler
|
|
206 |
!
|
|
207 |
|
|
208 |
userInterruptHandler:aHandler
|
|
209 |
UserInterruptHandler := aHandler
|
|
210 |
!
|
|
211 |
|
|
212 |
timerInterruptHandler
|
|
213 |
^ TimerInterruptHandler
|
|
214 |
!
|
|
215 |
|
10
|
216 |
timerInterruptHandler:aHandler
|
|
217 |
TimerInterruptHandler := aHandler
|
|
218 |
!
|
|
219 |
|
2
|
220 |
spyInterruptHandler
|
|
221 |
^ SpyInterruptHandler
|
|
222 |
!
|
|
223 |
|
|
224 |
spyInterruptHandler:aHandler
|
|
225 |
SpyInterruptHandler := aHandler
|
|
226 |
!
|
|
227 |
|
|
228 |
stepInterruptHandler
|
|
229 |
^ StepInterruptHandler
|
|
230 |
!
|
|
231 |
|
|
232 |
stepInterruptHandler:aHandler
|
|
233 |
StepInterruptHandler := aHandler
|
|
234 |
!
|
|
235 |
|
|
236 |
exceptionInterruptHandler
|
|
237 |
^ ExceptionInterruptHandler
|
|
238 |
!
|
|
239 |
|
|
240 |
errorInterruptHandler
|
|
241 |
^ ErrorInterruptHandler
|
|
242 |
!
|
|
243 |
|
|
244 |
errorInterruptHandler:aHandler
|
|
245 |
ErrorInterruptHandler := aHandler
|
|
246 |
!
|
|
247 |
|
|
248 |
memoryInterruptHandler
|
|
249 |
^ MemoryInterruptHandler
|
|
250 |
!
|
|
251 |
|
|
252 |
signalInterruptHandler
|
|
253 |
^ SignalInterruptHandler
|
|
254 |
!
|
|
255 |
|
|
256 |
childSignalInterruptHandler
|
|
257 |
^ ChildSignalInterruptHandler
|
|
258 |
!
|
|
259 |
|
|
260 |
disposeInterruptHandler
|
|
261 |
^ DisposeInterruptHandler
|
|
262 |
!
|
|
263 |
|
|
264 |
disposeInterruptHandler:aHandler
|
|
265 |
DisposeInterruptHandler := aHandler
|
|
266 |
!
|
|
267 |
|
|
268 |
recursionInterruptHandler
|
|
269 |
^ RecursionInterruptHandler
|
|
270 |
!
|
|
271 |
|
|
272 |
ioInterruptHandler
|
|
273 |
^ IOInterruptHandler
|
|
274 |
!
|
|
275 |
|
|
276 |
ioInterruptHandler:aHandler
|
|
277 |
IOInterruptHandler := aHandler
|
|
278 |
! !
|
|
279 |
|
1
|
280 |
!ObjectMemory class methodsFor:'queries'!
|
|
281 |
|
|
282 |
newSpaceUsed
|
10
|
283 |
"return the number of bytes allocated for new objects.
|
|
284 |
The returned value is usually obsolete as soon as you do
|
|
285 |
something ..."
|
1
|
286 |
|
|
287 |
%{ /* NOCONTEXT */
|
|
288 |
RETURN ( _MKSMALLINT(__newSpaceUsed()) );
|
|
289 |
%}
|
|
290 |
"ObjectMemory newSpaceUsed"
|
|
291 |
!
|
|
292 |
|
|
293 |
oldSpaceUsed
|
10
|
294 |
"return the number of bytes allocated for old objects.
|
|
295 |
(This includes the free lists)"
|
1
|
296 |
|
|
297 |
%{ /* NOCONTEXT */
|
|
298 |
RETURN ( _MKSMALLINT(__oldSpaceUsed()) );
|
|
299 |
%}
|
|
300 |
"ObjectMemory oldSpaceUsed"
|
|
301 |
!
|
|
302 |
|
10
|
303 |
freeSpace
|
|
304 |
"return the number of bytes in the free lists.
|
|
305 |
(which is included in oldSpaceUsed)"
|
|
306 |
|
|
307 |
%{ /* NOCONTEXT */
|
|
308 |
RETURN ( _MKSMALLINT(__freeSpace()) );
|
|
309 |
%}
|
|
310 |
"ObjectMemory freeSpace"
|
|
311 |
!
|
|
312 |
|
1
|
313 |
bytesUsed
|
|
314 |
"return the number of bytes allocated for objects -
|
|
315 |
this number is not exact, since some objects may be dead"
|
|
316 |
|
|
317 |
%{ /* NOCONTEXT */
|
10
|
318 |
RETURN ( _MKSMALLINT(__oldSpaceUsed() + __newSpaceUsed() - __freeSpace()) );
|
1
|
319 |
%}
|
|
320 |
"ObjectMemory bytesUsed"
|
|
321 |
!
|
|
322 |
|
2
|
323 |
oldSpaceAllocatedSinceLastGC
|
|
324 |
"return the number of bytes allocated for old objects since the
|
|
325 |
last garbage collect occured"
|
|
326 |
|
|
327 |
%{ /* NOCONTEXT */
|
|
328 |
RETURN ( _MKSMALLINT(__oldSpaceAllocatedSinceLastGC()) );
|
|
329 |
%}
|
|
330 |
"ObjectMemory oldSpaceAllocatedSinceLastGC"
|
|
331 |
!
|
|
332 |
|
|
333 |
incrementalGCLimit
|
|
334 |
"return the limit for incremental GC activation"
|
|
335 |
|
|
336 |
^ IncrementalGCLimit
|
|
337 |
|
|
338 |
"ObjectMemory incrementalGCLimit"
|
|
339 |
!
|
|
340 |
|
1
|
341 |
numberOfObjects
|
|
342 |
"return the number of objects in the system"
|
|
343 |
|
|
344 |
|tally|
|
|
345 |
|
|
346 |
tally := 0.
|
|
347 |
self allObjectsDo:[:obj | tally := tally + 1].
|
|
348 |
^ tally
|
|
349 |
|
|
350 |
"ObjectMemory numberOfObjects"
|
|
351 |
!
|
|
352 |
|
|
353 |
printReferences:anObject
|
|
354 |
"debugging: print referents to anObject"
|
|
355 |
|
|
356 |
%{
|
|
357 |
_printRefChain(__context, anObject);
|
|
358 |
%}
|
|
359 |
!
|
|
360 |
|
|
361 |
whoReferences:anObject
|
|
362 |
"return a collection of objects referencing the argument, anObject"
|
|
363 |
|
|
364 |
|aCollection|
|
|
365 |
|
|
366 |
aCollection := IdentitySet new.
|
|
367 |
self allObjectsDo:[:o |
|
|
368 |
(o references:anObject) ifTrue:[
|
|
369 |
aCollection add:o
|
|
370 |
]
|
|
371 |
].
|
|
372 |
(aCollection size == 0) ifTrue:[
|
|
373 |
"actually this cannot happen - there is always one"
|
|
374 |
^ nil
|
|
375 |
].
|
|
376 |
^ aCollection
|
|
377 |
! !
|
|
378 |
|
|
379 |
!ObjectMemory class methodsFor:'garbage collector control'!
|
|
380 |
|
|
381 |
garbageCollect
|
|
382 |
"search for and free garbage in the oldSpace
|
|
383 |
(newSpace is cleaned automatically)
|
|
384 |
- can take a long time if paging is involved
|
|
385 |
- when no paging is involved, its faster than I thought :-)"
|
|
386 |
%{
|
|
387 |
__garbageCollect(__context);
|
|
388 |
%}
|
|
389 |
|
|
390 |
"ObjectMemory garbageCollect"
|
|
391 |
!
|
|
392 |
|
|
393 |
scavenge
|
|
394 |
"for debugging only - collect newspace stuff"
|
|
395 |
%{
|
|
396 |
nonTenuringScavenge(__context);
|
|
397 |
%}
|
|
398 |
|
|
399 |
"ObjectMemory scavenge"
|
|
400 |
!
|
|
401 |
|
|
402 |
tenure
|
2
|
403 |
"force all new stuff into old-space"
|
1
|
404 |
%{
|
|
405 |
tenure(__context);
|
|
406 |
%}
|
|
407 |
|
|
408 |
"ObjectMemory tenure"
|
|
409 |
!
|
|
410 |
|
|
411 |
markAndSweep
|
|
412 |
"mark/sweep garbage collector"
|
|
413 |
|
|
414 |
%{
|
|
415 |
markAndSweep(__context);
|
|
416 |
%}
|
|
417 |
|
|
418 |
"ObjectMemory markAndSweep"
|
|
419 |
!
|
|
420 |
|
|
421 |
gcStep
|
|
422 |
"one incremental garbage collect step"
|
|
423 |
%{
|
|
424 |
incrGCstep(__context);
|
|
425 |
%}
|
|
426 |
!
|
|
427 |
|
2
|
428 |
incrementalGCLimit:aNumber
|
|
429 |
"set the limit for incremental GC activation"
|
|
430 |
|
|
431 |
IncrementalGCLimit := aNumber
|
|
432 |
|
|
433 |
"ObjectMemory incrementalGCLimit:100000"
|
|
434 |
!
|
|
435 |
|
|
436 |
turnGarbageCollectorOff
|
|
437 |
"turn off garbage collector by forcing new objects to be
|
|
438 |
allocated in oldSpace (instead of newSpace)
|
1
|
439 |
this method is somewhat dangerous: if collector is turned off,
|
|
440 |
and too many objects are created, the system may run into trouble.
|
|
441 |
Use this only for measurement purposes or when realtime behavior
|
2
|
442 |
is required for a limited time period. No warranty"
|
1
|
443 |
%{
|
|
444 |
allocForceSpace(0);
|
|
445 |
%}
|
|
446 |
!
|
|
447 |
|
2
|
448 |
turnGarbageCollectorOn
|
|
449 |
"turn garbage collector on again"
|
1
|
450 |
|
|
451 |
%{
|
|
452 |
allocForceSpace(1);
|
|
453 |
%}
|
|
454 |
! !
|
|
455 |
|
|
456 |
!ObjectMemory class methodsFor:'system management'!
|
|
457 |
|
|
458 |
loadClassBinary:aClassName
|
|
459 |
"find the object file for aClassName and -if found - load it;
|
|
460 |
this one loads precompiled object files"
|
|
461 |
|
|
462 |
|fName newClass upd|
|
|
463 |
|
|
464 |
fName := self fileNameForClass:aClassName.
|
|
465 |
fName notNil ifTrue:[
|
|
466 |
upd := Class updateChanges:false.
|
|
467 |
[
|
|
468 |
self loadBinary:(fName , '.o')
|
|
469 |
] valueNowOrOnUnwindDo:[
|
|
470 |
Class updateChanges:upd
|
|
471 |
].
|
|
472 |
newClass := self at:(aClassName asSymbol).
|
|
473 |
(newClass notNil and:[newClass implements:#initialize]) ifTrue:[
|
|
474 |
newClass initialize
|
|
475 |
]
|
|
476 |
]
|
|
477 |
!
|
|
478 |
|
|
479 |
snapShot
|
|
480 |
"create a snapshot"
|
|
481 |
|
|
482 |
ImageName isNil ifTrue:[
|
|
483 |
ImageName := 'st.img'
|
|
484 |
].
|
|
485 |
self snapShotOn:ImageName
|
|
486 |
|
|
487 |
"ObjectMemory snapShot"
|
|
488 |
!
|
|
489 |
|
|
490 |
snapShotOn:aFileName
|
|
491 |
"create a snapshot in the given file"
|
|
492 |
|
|
493 |
"give others a chance to fix things"
|
|
494 |
self changed:#save.
|
|
495 |
%{
|
|
496 |
OBJ __snapShotOn();
|
|
497 |
|
|
498 |
if (_isString(aFileName)) {
|
|
499 |
RETURN ( __snapShotOn(__context, _stringVal(aFileName)) );
|
|
500 |
}
|
|
501 |
%}
|
|
502 |
.
|
|
503 |
^ self primitiveFailed
|
|
504 |
|
|
505 |
"ObjectMemory snapShotOn:'myimage.img'"
|
|
506 |
!
|
|
507 |
|
|
508 |
applicationImageOn:aFileName for:startupClass selector:startupSelector
|
|
509 |
"create a snapshot which will come up without any views
|
|
510 |
but starts up an application by sending startupClass the startupSelector"
|
|
511 |
|
2
|
512 |
|viewsKnown savedIdleBlocks savedTimeoutBlocks savedTranscript
|
|
513 |
savedRoot|
|
1
|
514 |
|
|
515 |
viewsKnown := Display knownViews.
|
|
516 |
savedIdleBlocks := Display idleBlocks.
|
|
517 |
savedTimeoutBlocks := Display timeOutBlocks.
|
|
518 |
savedTranscript := Transcript.
|
2
|
519 |
savedRoot := RootView.
|
1
|
520 |
|
10
|
521 |
"a kludge: save image with modified knownViews, no idle- and timeoutblocks
|
|
522 |
and also Transcript set to StdErr ..."
|
1
|
523 |
|
|
524 |
Display knownViews:nil.
|
|
525 |
Display idleBlocks:nil.
|
|
526 |
Display timeOutBlocks:nil.
|
2
|
527 |
RootView := nil.
|
|
528 |
|
1
|
529 |
Transcript := Stderr.
|
10
|
530 |
Smalltalk startupClass:startupClass selector:startupSelector arguments:nil.
|
1
|
531 |
self snapShotOn:aFileName.
|
10
|
532 |
Smalltalk startupClass:nil selector:nil arguments:nil.
|
1
|
533 |
|
2
|
534 |
RootView := savedRoot.
|
1
|
535 |
Transcript := savedTranscript.
|
|
536 |
Display knownViews:viewsKnown.
|
|
537 |
Display idleBlocks:savedIdleBlocks.
|
|
538 |
Display timeOutBlocks:savedTimeoutBlocks
|
|
539 |
|
|
540 |
"ObjectMemory applicationImageOn:'draw.img' for:DrawTool selector:#start"
|
|
541 |
"ObjectMemory applicationImageOn:'pm.img' for:PMSimulator selector:#start"
|
|
542 |
!
|
|
543 |
|
|
544 |
minimumApplicationImageOn:aFileName for:startupClass selector:startupSelector
|
|
545 |
"create a snapshot which will come up without any views
|
|
546 |
but starts up an application by sending startupClass the startupSelector.
|
|
547 |
All unneeded info is stripped from the saved image."
|
|
548 |
|
|
549 |
"create a temporary image, for continuation"
|
|
550 |
self snapShotOn:'temp.img'.
|
|
551 |
|
|
552 |
Display knownViews do:[:aView |
|
|
553 |
aView notNil ifTrue:[
|
|
554 |
aView superView isNil ifTrue:[
|
|
555 |
aView destroy
|
|
556 |
]
|
|
557 |
]
|
|
558 |
].
|
|
559 |
|
|
560 |
self stripImage.
|
|
561 |
|
|
562 |
self applicationImageOn:aFileName for:startupClass selector:startupSelector.
|
|
563 |
|
|
564 |
"continue in old image"
|
|
565 |
|
|
566 |
OperatingSystem exec:(Arguments at:1)
|
|
567 |
withArguments:#('smalltalk' '-i' 'temp.img') , (Arguments copyFrom:2)
|
|
568 |
|
|
569 |
"ObjectMemory minimumApplicationImageOn:'clock1.img' for:Clock selector:#start"
|
|
570 |
"ObjectMemory applicationImageOn:'clock2.img' for:Clock selector:#start"
|
|
571 |
!
|
|
572 |
|
|
573 |
stripImage
|
|
574 |
"remove all unneeded stuff from the image - much more is possible here"
|
|
575 |
|
2
|
576 |
"remove all class comments & source"
|
1
|
577 |
|
2
|
578 |
Smalltalk allBehaviorsDo:[:aClass |
|
1
|
579 |
aClass setComment:nil.
|
|
580 |
aClass methodDictionary do:[:aMethod |
|
|
581 |
aMethod source:''.
|
|
582 |
aMethod category:#none
|
|
583 |
]
|
|
584 |
].
|
|
585 |
self garbageCollect
|
|
586 |
! !
|