96 |
109 |
97 |newClass| |
110 |newClass| |
98 |
111 |
99 newClass := super new. |
112 newClass := super new. |
100 newClass setComment:(self comment) |
113 newClass setComment:(self comment) |
101 category:(self category). |
114 category:(self category). |
102 ^ newClass |
115 ^ newClass |
103 ! ! |
116 ! ! |
104 |
117 |
105 !Class methodsFor:'subclass creation'! |
118 !Class methodsFor:'subclass creation'! |
106 |
119 |
107 subclass:t instanceVariableNames:f classVariableNames:d poolDictionaries:s category:cat |
120 subclass:t instanceVariableNames:f classVariableNames:d poolDictionaries:s category:cat |
108 "create a new class as a subclass of an existing class (the receiver). |
121 "create a new class as a subclass of an existing class (the receiver). |
109 The subclass will have indexed variables if the receiving-class has." |
122 The subclass will have indexed variables if the receiving-class has." |
110 |
123 |
111 self isVariable ifFalse:[ |
124 self isVariable ifFalse:[ |
112 ^ self class |
125 ^ self class |
113 name:t |
126 name:t |
114 inEnvironment:Smalltalk |
127 inEnvironment:Smalltalk |
115 subclassOf:self |
128 subclassOf:self |
116 instanceVariableNames:f |
129 instanceVariableNames:f |
117 variable:false |
130 variable:false |
118 words:true |
131 words:true |
119 pointers:true |
132 pointers:true |
120 classVariableNames:d |
133 classVariableNames:d |
121 poolDictionaries:s |
134 poolDictionaries:s |
122 category:cat |
135 category:cat |
123 comment:nil |
136 comment:nil |
124 changed:false |
137 changed:false |
125 ]. |
138 ]. |
126 self isBytes ifTrue:[ |
139 self isBytes ifTrue:[ |
127 ^ self |
140 ^ self |
128 variableByteSubclass:t |
141 variableByteSubclass:t |
129 instanceVariableNames:f |
142 instanceVariableNames:f |
130 classVariableNames:d |
143 classVariableNames:d |
131 poolDictionaries:s |
144 poolDictionaries:s |
132 category:cat |
145 category:cat |
133 ]. |
146 ]. |
134 self isLongs ifTrue:[ |
147 self isLongs ifTrue:[ |
135 ^ self |
148 ^ self |
136 variableLongSubclass:t |
149 variableLongSubclass:t |
137 instanceVariableNames:f |
150 instanceVariableNames:f |
138 classVariableNames:d |
151 classVariableNames:d |
139 poolDictionaries:s |
152 poolDictionaries:s |
140 category:cat |
153 category:cat |
141 ]. |
154 ]. |
142 self isFloats ifTrue:[ |
155 self isFloats ifTrue:[ |
143 ^ self |
156 ^ self |
144 variableFloatSubclass:t |
157 variableFloatSubclass:t |
145 instanceVariableNames:f |
158 instanceVariableNames:f |
146 classVariableNames:d |
159 classVariableNames:d |
147 poolDictionaries:s |
160 poolDictionaries:s |
148 category:cat |
161 category:cat |
149 ]. |
162 ]. |
150 self isDoubles ifTrue:[ |
163 self isDoubles ifTrue:[ |
151 ^ self |
164 ^ self |
152 variableDoubleSubclass:t |
165 variableDoubleSubclass:t |
153 instanceVariableNames:f |
166 instanceVariableNames:f |
154 classVariableNames:d |
167 classVariableNames:d |
155 poolDictionaries:s |
168 poolDictionaries:s |
156 category:cat |
169 category:cat |
157 ]. |
170 ]. |
158 self isWords ifTrue:[ |
171 self isWords ifTrue:[ |
159 ^ self |
172 ^ self |
160 variableWordSubclass:t |
173 variableWordSubclass:t |
161 instanceVariableNames:f |
174 instanceVariableNames:f |
162 classVariableNames:d |
175 classVariableNames:d |
163 poolDictionaries:s |
176 poolDictionaries:s |
164 category:cat |
177 category:cat |
165 ]. |
178 ]. |
166 ^ self |
179 ^ self |
167 variableSubclass:t |
180 variableSubclass:t |
168 instanceVariableNames:f |
181 instanceVariableNames:f |
169 classVariableNames:d |
182 classVariableNames:d |
170 poolDictionaries:s |
183 poolDictionaries:s |
171 category:cat |
184 category:cat |
172 ! |
185 ! |
173 |
186 |
174 variableSubclass:t instanceVariableNames:f classVariableNames:d poolDictionaries:s category:cat |
187 variableSubclass:t instanceVariableNames:f classVariableNames:d poolDictionaries:s category:cat |
175 "create a new class as a subclass of an existing class (the receiver) |
188 "create a new class as a subclass of an existing class (the receiver) |
176 in which the subclass has indexable pointer variables" |
189 in which the subclass has indexable pointer variables" |
177 |
190 |
178 self isVariable ifTrue:[ |
191 self isVariable ifTrue:[ |
179 self isPointers ifFalse:[ |
192 self isPointers ifFalse:[ |
180 ^ self error: |
193 ^ self error: |
181 'cannot make a variable pointer subclass of a variable non-pointer class' |
194 'cannot make a variable pointer subclass of a variable non-pointer class' |
182 ] |
195 ] |
183 ]. |
196 ]. |
184 |
197 |
185 ^ self class |
198 ^ self class |
186 name:t |
199 name:t |
187 inEnvironment:Smalltalk |
200 inEnvironment:Smalltalk |
188 subclassOf:self |
201 subclassOf:self |
189 instanceVariableNames:f |
202 instanceVariableNames:f |
190 variable:true |
203 variable:true |
191 words:false |
204 words:false |
192 pointers:true |
205 pointers:true |
193 classVariableNames:d |
206 classVariableNames:d |
194 poolDictionaries:s |
207 poolDictionaries:s |
195 category:cat |
208 category:cat |
196 comment:nil |
209 comment:nil |
197 changed:false |
210 changed:false |
198 ! |
211 ! |
199 |
212 |
200 variableByteSubclass:t instanceVariableNames:f classVariableNames:d poolDictionaries:s category:cat |
213 variableByteSubclass:t instanceVariableNames:f classVariableNames:d poolDictionaries:s category:cat |
201 "create a new class as a subclass of an existing class (the receiver) |
214 "create a new class as a subclass of an existing class (the receiver) |
202 in which the subclass has indexable byte-sized nonpointer variables" |
215 in which the subclass has indexable byte-sized nonpointer variables" |
203 |
216 |
204 self isVariable ifTrue:[ |
217 self isVariable ifTrue:[ |
205 self isBytes ifFalse:[ |
218 self isBytes ifFalse:[ |
206 ^ self error: |
219 ^ self error: |
207 'cannot make a variable byte subclass of a variable non-byte class' |
220 'cannot make a variable byte subclass of a variable non-byte class' |
208 ]. |
221 ]. |
209 ]. |
222 ]. |
210 |
223 |
211 ^ self class |
224 ^ self class |
212 name:t |
225 name:t |
213 inEnvironment:Smalltalk |
226 inEnvironment:Smalltalk |
214 subclassOf:self |
227 subclassOf:self |
215 instanceVariableNames:f |
228 instanceVariableNames:f |
216 variable:true |
229 variable:true |
217 words:false |
230 words:false |
218 pointers:false |
231 pointers:false |
219 classVariableNames:d |
232 classVariableNames:d |
220 poolDictionaries:s |
233 poolDictionaries:s |
221 category:cat |
234 category:cat |
222 comment:nil |
235 comment:nil |
223 changed:false |
236 changed:false |
224 ! |
237 ! |
225 |
238 |
226 variableWordSubclass:t instanceVariableNames:f classVariableNames:d poolDictionaries:s category:cat |
239 variableWordSubclass:t instanceVariableNames:f classVariableNames:d poolDictionaries:s category:cat |
227 "create a new class as a subclass of an existing class (the receiver) |
240 "create a new class as a subclass of an existing class (the receiver) |
228 in which the subclass has indexable word-sized nonpointer variables" |
241 in which the subclass has indexable word-sized nonpointer variables" |
229 |
242 |
230 self isVariable ifTrue:[ |
243 self isVariable ifTrue:[ |
231 self isWords ifFalse:[ |
244 self isWords ifFalse:[ |
232 ^ self error: |
245 ^ self error: |
233 'cannot make a variable word subclass of a variable non-word class' |
246 'cannot make a variable word subclass of a variable non-word class' |
234 ]. |
247 ]. |
235 ]. |
248 ]. |
236 |
249 |
237 ^ self class |
250 ^ self class |
238 name:t |
251 name:t |
239 inEnvironment:Smalltalk |
252 inEnvironment:Smalltalk |
240 subclassOf:self |
253 subclassOf:self |
241 instanceVariableNames:f |
254 instanceVariableNames:f |
242 variable:true |
255 variable:true |
243 words:true |
256 words:true |
244 pointers:false |
257 pointers:false |
245 classVariableNames:d |
258 classVariableNames:d |
246 poolDictionaries:s |
259 poolDictionaries:s |
247 category:cat |
260 category:cat |
248 comment:nil |
261 comment:nil |
249 changed:false |
262 changed:false |
250 ! |
263 ! |
251 |
264 |
252 variableLongSubclass:t instanceVariableNames:f classVariableNames:d poolDictionaries:s category:cat |
265 variableLongSubclass:t instanceVariableNames:f classVariableNames:d poolDictionaries:s category:cat |
253 "create a new class as a subclass of an existing class (the receiver) |
266 "create a new class as a subclass of an existing class (the receiver) |
254 in which the subclass has indexable long-sized nonpointer variables" |
267 in which the subclass has indexable long-sized nonpointer variables" |
255 |
268 |
256 self isVariable ifTrue:[ |
269 self isVariable ifTrue:[ |
257 self isLongs ifFalse:[ |
270 self isLongs ifFalse:[ |
258 ^ self error: |
271 ^ self error: |
259 'cannot make a variable long subclass of a variable non-long class' |
272 'cannot make a variable long subclass of a variable non-long class' |
260 ]. |
273 ]. |
261 ]. |
274 ]. |
262 |
275 |
263 ^ self class |
276 ^ self class |
264 name:t |
277 name:t |
265 inEnvironment:Smalltalk |
278 inEnvironment:Smalltalk |
266 subclassOf:self |
279 subclassOf:self |
267 instanceVariableNames:f |
280 instanceVariableNames:f |
268 variable:#long |
281 variable:#long |
269 words:false |
282 words:false |
270 pointers:false |
283 pointers:false |
271 classVariableNames:d |
284 classVariableNames:d |
272 poolDictionaries:s |
285 poolDictionaries:s |
273 category:cat |
286 category:cat |
274 comment:nil |
287 comment:nil |
275 changed:false |
288 changed:false |
276 ! |
289 ! |
277 |
290 |
278 variableFloatSubclass:t instanceVariableNames:f classVariableNames:d poolDictionaries:s category:cat |
291 variableFloatSubclass:t instanceVariableNames:f classVariableNames:d poolDictionaries:s category:cat |
279 |
292 |
280 "create a new class as a subclass of an existing class (the receiver) |
293 "create a new class as a subclass of an existing class (the receiver) |
281 in which the subclass has indexable float-sized nonpointer variables" |
294 in which the subclass has indexable float-sized nonpointer variables" |
282 |
295 |
283 self isVariable ifTrue:[ |
296 self isVariable ifTrue:[ |
284 self isFloats ifFalse:[ |
297 self isFloats ifFalse:[ |
285 ^ self error: |
298 ^ self error: |
286 'cannot make a variable float subclass of a variable non-float class' |
299 'cannot make a variable float subclass of a variable non-float class' |
287 ]. |
300 ]. |
288 ]. |
301 ]. |
289 |
302 |
290 ^ self class |
303 ^ self class |
291 name:t |
304 name:t |
292 inEnvironment:Smalltalk |
305 inEnvironment:Smalltalk |
293 subclassOf:self |
306 subclassOf:self |
294 instanceVariableNames:f |
307 instanceVariableNames:f |
295 variable:#float |
308 variable:#float |
296 words:false |
309 words:false |
297 pointers:false |
310 pointers:false |
298 classVariableNames:d |
311 classVariableNames:d |
299 poolDictionaries:s |
312 poolDictionaries:s |
300 category:cat |
313 category:cat |
301 comment:nil |
314 comment:nil |
302 changed:false |
315 changed:false |
303 ! |
316 ! |
304 |
317 |
305 variableDoubleSubclass:t instanceVariableNames:f classVariableNames:d poolDictionaries:s category:cat |
318 variableDoubleSubclass:t instanceVariableNames:f classVariableNames:d poolDictionaries:s category:cat |
306 |
319 |
307 "create a new class as a subclass of an existing class (the receiver) |
320 "create a new class as a subclass of an existing class (the receiver) |
308 in which the subclass has indexable double-sized nonpointer variables" |
321 in which the subclass has indexable double-sized nonpointer variables" |
309 |
322 |
310 self isVariable ifTrue:[ |
323 self isVariable ifTrue:[ |
311 self isDoubles ifFalse:[ |
324 self isDoubles ifFalse:[ |
312 ^ self error: |
325 ^ self error: |
313 'cannot make a variable double subclass of a variable non-double class' |
326 'cannot make a variable double subclass of a variable non-double class' |
314 ]. |
327 ]. |
315 ]. |
328 ]. |
316 |
329 |
317 ^ self class |
330 ^ self class |
318 name:t |
331 name:t |
319 inEnvironment:Smalltalk |
332 inEnvironment:Smalltalk |
320 subclassOf:self |
333 subclassOf:self |
321 instanceVariableNames:f |
334 instanceVariableNames:f |
322 variable:#double |
335 variable:#double |
323 words:false |
336 words:false |
324 pointers:false |
337 pointers:false |
325 classVariableNames:d |
338 classVariableNames:d |
326 poolDictionaries:s |
339 poolDictionaries:s |
327 category:cat |
340 category:cat |
328 comment:nil |
341 comment:nil |
329 changed:false |
342 changed:false |
330 ! ! |
343 ! ! |
331 |
344 |
332 !Class methodsFor:'ST/V subclass creation'! |
345 !Class methodsFor:'ST/V subclass creation'! |
333 |
346 |
334 subclass:t instanceVariableNames:f classVariableNames:d poolDictionaries:s |
347 subclass:t instanceVariableNames:f classVariableNames:d poolDictionaries:s |
335 "this method allows fileIn of ST/V classes |
348 "this method allows fileIn of ST/V classes |
336 (which seem to have no category)" |
349 (which seem to have no category)" |
337 |
350 |
338 ^ self subclass:t |
351 ^ self subclass:t |
339 instanceVariableNames:f |
352 instanceVariableNames:f |
340 classVariableNames:d |
353 classVariableNames:d |
341 poolDictionaries:s |
354 poolDictionaries:s |
342 category:'ST/V classes' |
355 category:'ST/V classes' |
343 ! |
356 ! |
344 |
357 |
345 variableByteSubclass:t classVariableNames:d poolDictionaries:s |
358 variableByteSubclass:t classVariableNames:d poolDictionaries:s |
346 "this method allows fileIn of ST/V variable byte classes |
359 "this method allows fileIn of ST/V variable byte classes |
347 (which seem to have no category and no instvars)" |
360 (which seem to have no category and no instvars)" |
348 |
361 |
349 ^ self variableByteSubclass:t |
362 ^ self variableByteSubclass:t |
350 instanceVariableNames:'' |
363 instanceVariableNames:'' |
351 classVariableNames:d |
364 classVariableNames:d |
352 poolDictionaries:s |
365 poolDictionaries:s |
353 category:'ST/V classes' |
366 category:'ST/V classes' |
354 ! |
367 ! |
355 |
368 |
356 variableSubclass:t instanceVariableNames:f classVariableNames:d poolDictionaries:s |
369 variableSubclass:t instanceVariableNames:f classVariableNames:d poolDictionaries:s |
357 "this method allows fileIn of ST/V variable pointer classes |
370 "this method allows fileIn of ST/V variable pointer classes |
358 (which seem to have no category)" |
371 (which seem to have no category)" |
359 |
372 |
360 ^ self variableSubclass:t |
373 ^ self variableSubclass:t |
361 instanceVariableNames:f |
374 instanceVariableNames:f |
362 classVariableNames:d |
375 classVariableNames:d |
363 poolDictionaries:s |
376 poolDictionaries:s |
364 category:'ST/V classes' |
377 category:'ST/V classes' |
365 ! ! |
378 ! ! |
366 |
379 |
367 !Class methodsFor:'accessing'! |
380 !Class methodsFor:'accessing'! |
368 |
381 |
369 classVariableString |
382 classVariableString |
371 Only names of class variables defined in this class are in the |
384 Only names of class variables defined in this class are in the |
372 returned string." |
385 returned string." |
373 |
386 |
374 classvars isNil ifTrue:[^ '']. |
387 classvars isNil ifTrue:[^ '']. |
375 ^ classvars |
388 ^ classvars |
|
389 |
|
390 " |
|
391 Object classVariableString |
|
392 Float classVariableString |
|
393 " |
376 ! |
394 ! |
377 |
395 |
378 classVarNames |
396 classVarNames |
379 "return a collection of the class variable name-strings. |
397 "return a collection of the class variable name-strings. |
380 Only names of class variables defined in this class are included |
398 Only names of class variables defined in this class are included |
381 in the returned collection - use allClassVarNames, to get all known names." |
399 in the returned collection - use allClassVarNames, to get all known names." |
382 |
400 |
383 classvars isNil ifTrue:[ |
401 classvars isNil ifTrue:[ |
384 ^ OrderedCollection new |
402 ^ OrderedCollection new |
385 ]. |
403 ]. |
386 ^ classvars asCollectionOfWords |
404 ^ classvars asCollectionOfWords |
387 |
405 |
388 "Object classVarNames" |
406 " |
389 "Float classVarNames" |
407 Object classVarNames |
|
408 Float classVarNames |
|
409 " |
|
410 ! |
|
411 |
|
412 classVarAt:aSymbol |
|
413 "return the value of a class variable. |
|
414 Currently, this returns nil if there is no such classvar - |
|
415 this may change." |
|
416 |
|
417 " |
|
418 this hides the (current) implementation of classVariables |
|
419 from the outside world. Currently, classvars are stored in |
|
420 the Smalltalk dictionary with a funny name, since there are |
|
421 no classPools yet. |
|
422 " |
|
423 ^ Smalltalk at:(self name , ':' , aSymbol) asSymbol |
|
424 ! |
|
425 |
|
426 classVarAt:aSymbol put:something |
|
427 "store something in a classvariable. |
|
428 Currently this creates a global with a funny name if no such |
|
429 classVar exists - this may change." |
|
430 |
|
431 " |
|
432 this hides the (current) implementation of classVariables |
|
433 from the outside world. Currently, classvars are stored in |
|
434 the Smalltalk dictionary with a funny name, since there are |
|
435 no classPools yet. |
|
436 " |
|
437 Smalltalk at:(self name , ':' , aSymbol) asSymbol put:something. |
390 ! |
438 ! |
391 |
439 |
392 allClassVarNames |
440 allClassVarNames |
393 "return a collection of all the class variable name-strings |
441 "return a collection of all the class variable name-strings |
394 this includes all superclass-class variables" |
442 this includes all superclass-class variables" |
395 |
443 |
396 ^ self addAllClassVarNamesTo:(OrderedCollection new) |
444 ^ self addAllClassVarNamesTo:(OrderedCollection new) |
397 |
445 |
398 "Float allClassVarNames" |
446 " |
|
447 Float allClassVarNames |
|
448 " |
399 ! |
449 ! |
400 |
450 |
401 comment |
451 comment |
402 "return the comment (aString) of the class" |
452 "return the comment (aString) of the class" |
403 |
453 |
404 ^ comment |
454 ^ comment |
405 ! |
455 |
|
456 " |
|
457 Object comment |
|
458 " |
|
459 ! |
406 |
460 |
407 setComment:aString |
461 setComment:aString |
408 "set the comment of the class to be the argument, aString; |
462 "set the comment of the class to be the argument, aString; |
409 do NOT create a change record" |
463 do NOT create a change record" |
410 |
464 |
411 comment := aString |
465 comment := aString |
412 ! |
466 ! |
413 |
467 |
414 comment:aString |
468 comment:aString |
415 "set the comment of the class to be the argument, aString; |
469 "set the comment of the class to be the argument, aString; |
416 create a change record" |
470 create a change record and notify dependents." |
|
471 |
|
472 |oldComment| |
417 |
473 |
418 comment ~= aString ifTrue:[ |
474 comment ~= aString ifTrue:[ |
419 comment := aString. |
475 oldComment := comment. |
420 self addChangeRecordForClassComment:self |
476 comment := aString. |
|
477 self changed:#comment with:oldComment. |
|
478 self addChangeRecordForClassComment:self. |
421 ] |
479 ] |
422 ! |
480 ! |
423 |
481 |
424 classFileName |
482 classFileName |
425 "return the name of the file from which the class was compiled" |
483 "return the name of the file from which the class was compiled. |
|
484 This is currently NOT used." |
426 |
485 |
427 ^ classFileName |
486 ^ classFileName |
428 ! |
487 ! |
429 |
488 |
430 definition |
489 definition |
453 comment := com. |
514 comment := com. |
454 category := categoryStringOrSymbol asSymbol |
515 category := categoryStringOrSymbol asSymbol |
455 ! |
516 ! |
456 |
517 |
457 setClassVariableString:aString |
518 setClassVariableString:aString |
458 "set the classes classvarnames string. This is a dangerous |
519 "set the classes classvarnames string. |
459 (low level) operation, since the classvariables are not really |
520 This is a dangerous (low level) operation, since the |
460 created." |
521 classvariables are not really created or updated. Also, |
|
522 NO change record is written." |
461 |
523 |
462 classvars := aString |
524 classvars := aString |
463 ! |
525 ! |
464 |
526 |
465 classVariableString:aString |
527 classVariableString:aString |
466 "set the classes classvarnames string; |
528 "set the classes classvarnames string; |
467 initialize new class variables with nil, |
529 Initialize new class variables with nil, clear and remove old ones. |
468 clear and remove old ones. No change record is written." |
530 No change record is written and no classes are recompiled." |
469 |
531 |
470 |prevVarNames varNames| |
532 |prevVarNames varNames| |
471 |
533 |
472 "ignore for metaclasses except the one" |
534 "ignore for metaclasses except the one" |
473 (self isMeta) ifTrue:[ |
535 (self isMeta) ifTrue:[ |
474 (self == Metaclass) ifFalse:[ |
536 (self == Metaclass) ifFalse:[ |
475 ^ self |
537 ^ self |
476 ] |
538 ] |
477 ]. |
539 ]. |
478 (classvars = aString) ifFalse:[ |
540 (classvars = aString) ifFalse:[ |
479 prevVarNames := self classVarNames. |
541 prevVarNames := self classVarNames. |
480 classvars := aString. |
542 classvars := aString. |
481 varNames := self classVarNames. |
543 varNames := self classVarNames. |
482 |
544 |
483 "new ones get initialized to nil; |
545 "new ones get initialized to nil; |
484 - old ones are nilled and removed from Smalltalk" |
546 - old ones are nilled and removed from Smalltalk" |
485 |
547 |
486 varNames do:[:aName | |
548 varNames do:[:aName | |
487 (prevVarNames includes:aName) ifFalse:[ |
549 (prevVarNames includes:aName) ifFalse:[ |
488 "a new one" |
550 "a new one" |
489 Smalltalk at:(self name , ':' , aName) asSymbol put:nil. |
551 self classVarAt:aName put:nil. |
490 ] ifTrue:[ |
552 ] ifTrue:[ |
491 prevVarNames remove:aName |
553 prevVarNames remove:aName |
492 ] |
554 ] |
493 ]. |
555 ]. |
494 "left overs are gone" |
556 "left overs are gone" |
495 prevVarNames do:[:aName | |
557 prevVarNames do:[:aName | |
496 Smalltalk at:(self name , ':' , aName) asSymbol put:nil. |
558 self classVarAt:aName put:nil. |
497 Smalltalk removeKey:(self name , ':' , aName) asSymbol |
559 Smalltalk removeKey:(self name , ':' , aName) asSymbol. |
498 ]. |
560 ]. |
499 Smalltalk changed |
561 Smalltalk changed |
500 ] |
562 ] |
501 ! |
563 ! |
502 |
564 |
503 addClassVarName:aString |
565 addClassVarName:aString |
504 "add a class variable if not already there" |
566 "add a class variable if not already there and initialize it with nil. |
|
567 Also write a change record and notify dependents. |
|
568 BUG: Currently, no recompilation is done - this will change." |
505 |
569 |
506 (self classVarNames includes:aString) ifFalse:[ |
570 (self classVarNames includes:aString) ifFalse:[ |
507 self classVariableString:(self classVariableString , ' ' , aString) |
571 self classVariableString:(self classVariableString , ' ' , aString). |
|
572 self addChangeRecordForClass:self. |
|
573 self changed:#definition. |
|
574 ] |
|
575 ! |
|
576 |
|
577 removeClassVarName:aString |
|
578 "remove a class variable if not already there. |
|
579 Also write a change record and notify dependents. |
|
580 BUG: Currently, no recompilation is done - this will change." |
|
581 |
|
582 |names newNames| |
|
583 |
|
584 names := self classVarNames. |
|
585 (names includes:aString) ifTrue:[ |
|
586 newNames := ''. |
|
587 names do:[:nm | nm ~= aString ifTrue:[newNames := newNames , nm , ' ']]. |
|
588 self classVariableString:newNames withoutSpaces. |
|
589 self addChangeRecordForClass:self. |
|
590 self changed:#definition. |
508 ] |
591 ] |
509 ! |
592 ! |
510 |
593 |
511 renameCategory:oldCategory to:newCategory |
594 renameCategory:oldCategory to:newCategory |
512 "change methods categories" |
595 "rename a category (changes category of those methods). |
|
596 Append a change record and notifies dependents." |
513 |
597 |
514 |any| |
598 |any| |
515 |
599 |
516 any := false. |
600 any := false. |
517 methodArray do:[:aMethod | |
601 methodArray do:[:aMethod | |
518 aMethod category = oldCategory ifTrue:[ |
602 aMethod category = oldCategory ifTrue:[ |
519 aMethod category:newCategory. |
603 aMethod category:newCategory. |
520 any := true. |
604 any := true. |
521 ] |
605 ] |
522 ]. |
606 ]. |
523 any ifTrue:[ |
607 any ifTrue:[ |
524 self addChangeRecordForRenameCategory:oldCategory to:newCategory |
608 self addChangeRecordForRenameCategory:oldCategory to:newCategory. |
|
609 self changed:#methodCategory. |
525 ] |
610 ] |
526 ! ! |
611 ! ! |
527 |
612 |
528 !Class methodsFor:'adding/removing'! |
613 !Class methodsFor:'adding/removing'! |
529 |
614 |
530 addSelector:newSelector withMethod:newMethod |
615 addSelector:newSelector withMethod:newMethod |
531 "add the method given by 2nd argument under the selector given by |
616 "add the method given by 2nd argument under the selector given by |
532 1st argument to the methodDictionary. |
617 1st argument to the methodDictionary. |
533 Append a change record to the changes file." |
618 Append a change record to the changes file and tell dependents." |
534 |
619 |
535 (super addSelector:newSelector withMethod:newMethod) ifTrue:[ |
620 (super addSelector:newSelector withMethod:newMethod) ifTrue:[ |
536 self addChangeRecordForMethod:newMethod |
621 self addChangeRecordForMethod:newMethod |
537 ] |
622 ] |
538 ! |
623 ! |
539 |
624 |
540 removeSelector:aSelector |
625 removeSelector:aSelector |
541 "remove the selector, aSelector and its associated method |
626 "remove the selector, aSelector and its associated method |
542 from the methodDictionary. |
627 from the methodDictionary. |
543 Append a change record to the changes file." |
628 Append a change record to the changes file and tell dependents." |
544 |
629 |
545 (super removeSelector:aSelector) ifTrue:[ |
630 (super removeSelector:aSelector) ifTrue:[ |
546 self addChangeRecordForRemoveSelector:aSelector |
631 self addChangeRecordForRemoveSelector:aSelector. |
|
632 self changed:#methodDictionary with:aSelector. |
547 ] |
633 ] |
548 ! ! |
634 ! ! |
549 |
635 |
550 !Class methodsFor:'changes management'! |
636 !Class methodsFor:'changes management'! |
551 |
637 |
602 |
688 |
603 |aStream| |
689 |aStream| |
604 |
690 |
605 aStream := self changesStream. |
691 aStream := self changesStream. |
606 aStream notNil ifTrue:[ |
692 aStream notNil ifTrue:[ |
607 self fileOutMethod:aMethod on:aStream. |
693 self fileOutMethod:aMethod on:aStream. |
608 aStream cr. |
694 aStream cr. |
609 aStream close. |
695 aStream close. |
610 |
696 |
611 "this test allows a smalltalk without Projects/ChangeSets" |
697 "this test allows a smalltalk without Projects/ChangeSets" |
612 Project notNil ifTrue:[ |
698 Project notNil ifTrue:[ |
613 Project addMethodChange:aMethod in:self |
699 Project addMethodChange:aMethod in:self |
614 ] |
700 ] |
615 ] |
701 ] |
616 ! |
702 ! |
617 |
703 |
618 addChangeRecordForRemoveSelector:aSelector |
704 addChangeRecordForRemoveSelector:aSelector |
619 "add a method-remove-record to the changes file" |
705 "add a method-remove-record to the changes file" |
620 |
706 |
621 |aStream| |
707 |aStream| |
622 |
708 |
623 aStream := self changesStream. |
709 aStream := self changesStream. |
624 aStream notNil ifTrue:[ |
710 aStream notNil ifTrue:[ |
625 self printClassNameOn:aStream. |
711 self printClassNameOn:aStream. |
626 aStream nextPutAll:(' removeSelector:#' , aSelector). |
712 aStream nextPutAll:(' removeSelector:#' , aSelector). |
627 aStream nextPut:(aStream class chunkSeparator). |
713 aStream nextPut:(aStream class chunkSeparator). |
628 aStream cr. |
714 aStream cr. |
629 aStream close |
715 aStream close |
630 ] |
716 ] |
631 ! |
717 ! |
632 |
718 |
633 addChangeRecordForClass:aClass |
719 addChangeRecordForClass:aClass |
634 "add a class-definition-record to the changes file" |
720 "add a class-definition-record to the changes file" |
635 |
721 |
636 |aStream| |
722 |aStream| |
637 |
723 |
638 aStream := self changesStream. |
724 aStream := self changesStream. |
639 aStream notNil ifTrue:[ |
725 aStream notNil ifTrue:[ |
640 aClass fileOutDefinitionOn:aStream. |
726 aClass fileOutDefinitionOn:aStream. |
641 aStream nextPut:(aStream class chunkSeparator). |
727 aStream nextPut:(aStream class chunkSeparator). |
642 aStream cr. |
728 aStream cr. |
643 aStream close |
729 aStream close |
644 ] |
730 ] |
645 ! |
731 ! |
646 |
732 |
647 addChangeRecordForClassInstvars:aClass |
733 addChangeRecordForClassInstvars:aClass |
648 "add a class-instvars-record to the changes file" |
734 "add a class-instvars-record to the changes file" |
649 |
735 |
650 |aStream| |
736 |aStream| |
651 |
737 |
652 aStream := self changesStream. |
738 aStream := self changesStream. |
653 aStream notNil ifTrue:[ |
739 aStream notNil ifTrue:[ |
654 aClass fileOutClassInstVarDefinitionOn:aStream. |
740 aClass fileOutClassInstVarDefinitionOn:aStream. |
655 aStream nextPut:(aStream class chunkSeparator). |
741 aStream nextPut:(aStream class chunkSeparator). |
656 aStream cr. |
742 aStream cr. |
657 aStream close |
743 aStream close |
658 ] |
744 ] |
659 ! |
745 ! |
660 |
746 |
661 addChangeRecordForClassComment:aClass |
747 addChangeRecordForClassComment:aClass |
662 "add a class-comment-record to the changes file" |
748 "add a class-comment-record to the changes file" |
663 |
749 |
664 |aStream| |
750 |aStream| |
665 |
751 |
666 aStream := self changesStream. |
752 aStream := self changesStream. |
667 aStream notNil ifTrue:[ |
753 aStream notNil ifTrue:[ |
668 aClass fileOutCommentOn:aStream. |
754 aClass fileOutCommentOn:aStream. |
669 aStream nextPut:(aStream class chunkSeparator). |
755 aStream nextPut:(aStream class chunkSeparator). |
670 aStream cr. |
756 aStream cr. |
671 aStream close |
757 aStream close |
672 ] |
758 ] |
673 ! |
759 ! |
674 |
760 |
675 addChangeRecordForClassRename:oldName to:newName |
761 addChangeRecordForClassRename:oldName to:newName |
676 "add a class-rename-record to the changes file" |
762 "add a class-rename-record to the changes file" |
677 |
763 |
678 |aStream| |
764 |aStream| |
679 |
765 |
680 aStream := self changesStream. |
766 aStream := self changesStream. |
681 aStream notNil ifTrue:[ |
767 aStream notNil ifTrue:[ |
682 aStream nextPutAll:('Smalltalk renameClass:' , oldName , ' to:''' , newName , ''''). |
768 aStream nextPutAll:('Smalltalk renameClass:' , oldName , ' to:''' , newName , ''''). |
683 aStream nextPut:(aStream class chunkSeparator). |
769 aStream nextPut:(aStream class chunkSeparator). |
684 aStream cr. |
770 aStream cr. |
685 aStream close |
771 aStream close |
686 ] |
772 ] |
687 ! |
773 ! |
688 |
774 |
689 addChangeRecordForClassRemove:oldName |
775 addChangeRecordForClassRemove:oldName |
690 "add a class-remove-record to the changes file" |
776 "add a class-remove-record to the changes file" |
691 |
777 |
692 |aStream| |
778 |aStream| |
693 |
779 |
694 aStream := self changesStream. |
780 aStream := self changesStream. |
695 aStream notNil ifTrue:[ |
781 aStream notNil ifTrue:[ |
696 aStream nextPutAll:('Smalltalk removeClass:' , oldName). |
782 aStream nextPutAll:('Smalltalk removeClass:' , oldName). |
697 aStream nextPut:(aStream class chunkSeparator). |
783 aStream nextPut:(aStream class chunkSeparator). |
698 aStream cr. |
784 aStream cr. |
699 aStream close |
785 aStream close |
700 ] |
786 ] |
701 ! |
787 ! |
702 |
788 |
703 addChangeRecordForRenameCategory:oldCategory to:newCategory |
789 addChangeRecordForRenameCategory:oldCategory to:newCategory |
704 "add a category-rename record to the changes file" |
790 "add a category-rename record to the changes file" |
705 |
791 |
706 |aStream| |
792 |aStream| |
707 |
793 |
708 aStream := self changesStream. |
794 aStream := self changesStream. |
709 aStream notNil ifTrue:[ |
795 aStream notNil ifTrue:[ |
710 self printClassNameOn:aStream. |
796 self printClassNameOn:aStream. |
711 aStream nextPutAll:(' renameCategory:' , oldCategory storeString). |
797 aStream nextPutAll:(' renameCategory:' , oldCategory storeString). |
712 aStream nextPutAll:(' to:' , newCategory storeString). |
798 aStream nextPutAll:(' to:' , newCategory storeString). |
713 aStream nextPut:(aStream class chunkSeparator). |
799 aStream nextPut:(aStream class chunkSeparator). |
714 aStream cr. |
800 aStream cr. |
715 aStream close |
801 aStream close |
716 ] |
802 ] |
717 ! |
803 ! |
718 |
804 |
719 addChangeRecordForChangeCategory |
805 addChangeRecordForChangeCategory |
720 "add a category change record to the changes file" |
806 "add a category change record to the changes file" |
721 |
807 |
722 |aStream| |
808 |aStream| |
723 |
809 |
724 aStream := self changesStream. |
810 aStream := self changesStream. |
725 aStream notNil ifTrue:[ |
811 aStream notNil ifTrue:[ |
726 self printClassNameOn:aStream. |
812 self printClassNameOn:aStream. |
727 aStream nextPutAll:(' category:' , category storeString). |
813 aStream nextPutAll:(' category:' , category storeString). |
728 aStream nextPut:(aStream class chunkSeparator). |
814 aStream nextPut:(aStream class chunkSeparator). |
729 aStream cr. |
815 aStream cr. |
730 aStream close |
816 aStream close |
731 ] |
817 ] |
732 ! |
818 ! |
733 |
819 |
734 addChangeRecordForSnapshot:aFileName |
820 addChangeRecordForSnapshot:aFileName |
735 "add a snapshot-record to the changes file" |
821 "add a snapshot-record to the changes file" |
736 |
822 |
737 |aStream| |
823 |aStream| |
738 |
824 |
739 aStream := self changesStream. |
825 aStream := self changesStream. |
740 aStream notNil ifTrue:[ |
826 aStream notNil ifTrue:[ |
741 aStream nextPutAll:('''---- snapshot ' , aFileName , ' ', |
827 aStream nextPutAll:('''---- snapshot ' , aFileName , ' ', |
742 Date today printString , ' ' , |
828 Date today printString , ' ' , |
743 Time now printString , |
829 Time now printString , |
744 ' ----''!!'). |
830 ' ----''!!'). |
745 aStream cr. |
831 aStream cr. |
746 aStream close |
832 aStream close |
747 ] |
833 ] |
748 ! ! |
834 ! ! |
749 |
835 |
750 !Class methodsFor:'compiling'! |
836 !Class methodsFor:'compiling'! |
751 |
837 |
871 addAllClassVarNamesTo:aCollection |
966 addAllClassVarNamesTo:aCollection |
872 "helper - add the name-strings of the class variables and of the class-vars |
967 "helper - add the name-strings of the class variables and of the class-vars |
873 of all superclasses to the argument, aCollection. Return aCollection" |
968 of all superclasses to the argument, aCollection. Return aCollection" |
874 |
969 |
875 (superclass notNil) ifTrue:[ |
970 (superclass notNil) ifTrue:[ |
876 superclass addAllClassVarNamesTo:aCollection |
971 superclass addAllClassVarNamesTo:aCollection |
877 ]. |
972 ]. |
878 classvars notNil ifTrue:[ |
973 classvars notNil ifTrue:[ |
879 aCollection addAll:(classvars asCollectionOfWords). |
974 aCollection addAll:(classvars asCollectionOfWords). |
880 ]. |
975 ]. |
881 ^ aCollection |
976 ^ aCollection |
882 ! |
977 ! |
883 |
978 |
884 addCategoriesTo:aCollection |
979 addCategoriesTo:aCollection |
885 "helper - add categories to the argument, aCollection" |
980 "helper - add categories to the argument, aCollection" |
886 |
981 |
887 |cat| |
982 |cat| |
888 |
983 |
889 methodArray do:[:aMethod | |
984 methodArray do:[:aMethod | |
890 cat := aMethod category. |
985 cat := aMethod category. |
891 (aCollection detect:[:element | cat = element] |
986 (aCollection detect:[:element | cat = element] |
892 ifNone:[nil]) |
987 ifNone:[nil]) |
893 isNil ifTrue:[ |
988 isNil ifTrue:[ |
894 aCollection add:cat |
989 aCollection add:cat |
895 ] |
990 ] |
896 ]. |
991 ]. |
897 ^ aCollection |
992 ^ aCollection |
898 ! |
993 ! |
899 |
994 |
900 addAllCategoriesTo:aCollection |
995 addAllCategoriesTo:aCollection |
901 "helper - add categories and all superclasses categories |
996 "helper - add categories and all superclasses categories |
902 to the argument, aCollection" |
997 to the argument, aCollection" |
903 |
998 |
904 (superclass notNil) ifTrue:[ |
999 (superclass notNil) ifTrue:[ |
905 superclass addAllCategoriesTo:aCollection |
1000 superclass addAllCategoriesTo:aCollection |
906 ]. |
1001 ]. |
907 ^ self addCategoriesTo:aCollection |
1002 ^ self addCategoriesTo:aCollection |
908 ! ! |
1003 ! ! |
909 |
1004 |
910 !Class methodsFor:'fileIn interface'! |
1005 !Class methodsFor:'fileIn interface'! |
999 "take care of nil-superclass" |
1094 "take care of nil-superclass" |
1000 superclass isNil ifTrue:[ |
1095 superclass isNil ifTrue:[ |
1001 "/ previous versions of stc were not able to compile nil-subclasses; |
1096 "/ previous versions of stc were not able to compile nil-subclasses; |
1002 "/ after 2.10, it can ... |
1097 "/ after 2.10, it can ... |
1003 "/ line := 'Object "nil"'. |
1098 "/ line := 'Object "nil"'. |
1004 line := 'nil' |
1099 line := 'nil' |
1005 ] ifFalse:[ |
1100 ] ifFalse:[ |
1006 line := (superclass name) |
1101 line := (superclass name) |
1007 ]. |
1102 ]. |
1008 superclass isNil ifTrue:[ |
1103 superclass isNil ifTrue:[ |
1009 isVar := self isVariable |
1104 isVar := self isVariable |
1010 ] ifFalse:[ |
1105 ] ifFalse:[ |
1011 "I cant remember what this is for ?" |
1106 "I cant remember what this is for ?" |
1012 isVar := (self isVariable and:[superclass isVariable not]) |
1107 isVar := (self isVariable and:[superclass isVariable not]) |
1013 ]. |
1108 ]. |
1014 isVar ifTrue:[ |
1109 isVar ifTrue:[ |
1015 self isBytes ifTrue:[ |
1110 self isBytes ifTrue:[ |
1016 line := line , ' variableByteSubclass:#' |
1111 line := line , ' variableByteSubclass:#' |
1017 ] ifFalse:[ |
1112 ] ifFalse:[ |
1018 self isWords ifTrue:[ |
1113 self isWords ifTrue:[ |
1019 line := line , ' variableWordSubclass:#' |
1114 line := line , ' variableWordSubclass:#' |
1020 ] ifFalse:[ |
1115 ] ifFalse:[ |
1021 self isLongs ifTrue:[ |
1116 self isLongs ifTrue:[ |
1022 line := line , ' variableLongSubclass:#' |
1117 line := line , ' variableLongSubclass:#' |
1023 ] ifFalse:[ |
1118 ] ifFalse:[ |
1024 self isFloats ifTrue:[ |
1119 self isFloats ifTrue:[ |
1025 line := line , ' variableFloatSubclass:#' |
1120 line := line , ' variableFloatSubclass:#' |
1026 ] ifFalse:[ |
1121 ] ifFalse:[ |
1027 self isDoubles ifTrue:[ |
1122 self isDoubles ifTrue:[ |
1028 line := line , ' variableDoubleSubclass:#' |
1123 line := line , ' variableDoubleSubclass:#' |
1029 ] ifFalse:[ |
1124 ] ifFalse:[ |
1030 line := line , ' variableSubclass:#' |
1125 line := line , ' variableSubclass:#' |
1031 ] |
1126 ] |
1032 ] |
1127 ] |
1033 ] |
1128 ] |
1034 ] |
1129 ] |
1035 ] |
1130 ] |
1036 ] ifFalse:[ |
1131 ] ifFalse:[ |
1037 line := line , ' subclass:#' |
1132 line := line , ' subclass:#' |
1038 ]. |
1133 ]. |
1039 line := line , name. |
1134 line := line , name. |
1040 aStream nextPutAll:line. |
1135 aStream nextPutAll:line. |
1041 |
1136 |
1042 aStream crTab. |
1137 aStream crTab. |
1071 ! |
1166 ! |
1072 |
1167 |
1073 fileOutCategory:aCategory on:aStream |
1168 fileOutCategory:aCategory on:aStream |
1074 "file out all methods belonging to aCategory, aString onto aStream" |
1169 "file out all methods belonging to aCategory, aString onto aStream" |
1075 |
1170 |
1076 |nMethods count sep| |
1171 |nMethods count sep source| |
1077 |
1172 |
1078 methodArray notNil ifTrue:[ |
1173 methodArray notNil ifTrue:[ |
1079 nMethods := 0. |
1174 nMethods := 0. |
1080 methodArray do:[:aMethod | |
1175 methodArray do:[:aMethod | |
1081 (aCategory = aMethod category) ifTrue:[ |
1176 (aCategory = aMethod category) ifTrue:[ |
1082 nMethods := nMethods + 1 |
1177 nMethods := nMethods + 1 |
1083 ] |
1178 ] |
1084 ]. |
1179 ]. |
1085 sep := aStream class chunkSeparator. |
1180 sep := aStream class chunkSeparator. |
1086 (nMethods ~~ 0) ifTrue:[ |
1181 (nMethods ~~ 0) ifTrue:[ |
1087 aStream nextPut:sep. |
1182 aStream nextPut:sep. |
1088 self printClassNameOn:aStream. |
1183 self printClassNameOn:aStream. |
1089 aStream nextPutAll:' methodsFor:'''. |
1184 aStream nextPutAll:' methodsFor:'''. |
1090 aCategory notNil ifTrue:[ |
1185 aCategory notNil ifTrue:[ |
1091 aStream nextPutAll:aCategory |
1186 aStream nextPutAll:aCategory |
1092 ]. |
1187 ]. |
1093 aStream nextPut:$'. aStream nextPut:sep. aStream cr. |
1188 aStream nextPut:$'. aStream nextPut:sep. aStream cr. |
1094 aStream cr. |
1189 aStream cr. |
1095 count := 1. |
1190 count := 1. |
1096 methodArray do:[:aMethod | |
1191 methodArray do:[:aMethod | |
1097 (aCategory = aMethod category) ifTrue:[ |
1192 (aCategory = aMethod category) ifTrue:[ |
1098 aStream nextChunkPut:(aMethod source). |
1193 source := aMethod source. |
1099 (count ~~ nMethods) ifTrue:[ |
1194 source isNil ifTrue:[ |
1100 aStream cr. |
1195 FileOutErrorSignal raiseRequestWith:'no source for method' |
1101 aStream cr |
1196 ] ifFalse:[ |
1102 ]. |
1197 aStream nextChunkPut:(aMethod source). |
1103 count := count + 1 |
1198 ]. |
1104 ] |
1199 (count ~~ nMethods) ifTrue:[ |
1105 ]. |
1200 aStream cr. |
1106 aStream space. |
1201 aStream cr |
1107 aStream nextPut:sep. |
1202 ]. |
1108 aStream cr |
1203 count := count + 1 |
1109 ] |
1204 ] |
|
1205 ]. |
|
1206 aStream space. |
|
1207 aStream nextPut:sep. |
|
1208 aStream cr |
|
1209 ] |
1110 ] |
1210 ] |
1111 ! |
1211 ! |
1112 |
1212 |
1113 fileOutMethod:aMethod on:aStream |
1213 fileOutMethod:aMethod on:aStream |
1114 "file out the method, aMethod onto aStream" |
1214 "file out the method, aMethod onto aStream" |
1115 |
1215 |
1116 |cat sep| |
1216 |cat sep source| |
1117 |
1217 |
1118 methodArray notNil ifTrue:[ |
1218 methodArray notNil ifTrue:[ |
1119 sep := aStream class chunkSeparator. |
1219 sep := aStream class chunkSeparator. |
1120 aStream nextPut:sep. |
1220 aStream nextPut:sep. |
1121 self printClassNameOn:aStream. |
1221 self printClassNameOn:aStream. |
1122 aStream nextPutAll:' methodsFor:'''. |
1222 aStream nextPutAll:' methodsFor:'''. |
1123 cat := aMethod category. |
1223 cat := aMethod category. |
1124 cat notNil ifTrue:[ |
1224 cat notNil ifTrue:[ |
1125 aStream nextPutAll:cat |
1225 aStream nextPutAll:cat |
1126 ]. |
1226 ]. |
1127 aStream nextPut:$'. |
1227 aStream nextPut:$'. |
1128 aStream nextPut:sep. |
1228 aStream nextPut:sep. |
1129 aStream cr. |
1229 aStream cr. |
1130 aStream cr. |
1230 aStream cr. |
1131 aStream nextChunkPut:(aMethod source). |
1231 source := aMethod source. |
1132 aStream space. |
1232 source isNil ifTrue:[ |
1133 aStream nextPut:sep. |
1233 FileOutErrorSignal |
1134 aStream cr |
1234 raiseRequestWith:self |
|
1235 errorString:('no source for method: ' , |
|
1236 self name , '>>' , |
|
1237 (self selectorForMethod:aMethod)) |
|
1238 ] ifFalse:[ |
|
1239 aStream nextChunkPut:(aMethod source). |
|
1240 ]. |
|
1241 aStream space. |
|
1242 aStream nextPut:sep. |
|
1243 aStream cr |
1135 ] |
1244 ] |
1136 ! |
1245 ! |
1137 |
1246 |
1138 fileOutOn:aStream |
1247 fileOutOn:aStream |
1139 "file out my definition and all methods onto aStream" |
1248 "file out my definition and all methods onto aStream" |
1180 aStream cr. |
1289 aStream cr. |
1181 " |
1290 " |
1182 optional classInstanceVariables |
1291 optional classInstanceVariables |
1183 " |
1292 " |
1184 self class instanceVariableString isBlank ifFalse:[ |
1293 self class instanceVariableString isBlank ifFalse:[ |
1185 self fileOutClassInstVarDefinitionOn:aStream. |
1294 self fileOutClassInstVarDefinitionOn:aStream. |
1186 aStream nextPut:sep. |
1295 aStream nextPut:sep. |
1187 aStream cr. |
1296 aStream cr. |
1188 aStream cr |
1297 aStream cr |
1189 ]. |
1298 ]. |
1190 |
1299 |
1191 " |
1300 " |
1192 a comment - if any |
1301 a comment - if any |
1193 " |
1302 " |
1194 comment notNil ifTrue:[ |
1303 comment notNil ifTrue:[ |
1195 aStream nextPutAll:name. |
1304 aStream nextPutAll:name. |
1196 aStream nextPutAll:' comment:'. |
1305 aStream nextPutAll:' comment:'. |
1197 aStream nextPutAll:(comment storeString). |
1306 aStream nextPutAll:(comment storeString). |
1198 aStream nextPut:sep. |
1307 aStream nextPut:sep. |
1199 aStream cr. |
1308 aStream cr. |
1200 aStream cr |
1309 aStream cr |
1201 ]. |
1310 ]. |
1202 |
1311 |
1203 " |
1312 " |
1204 methods from all categories in metaclass |
1313 methods from all categories in metaclass |
1205 " |
1314 " |
1206 collectionOfCategories := self class categories. |
1315 collectionOfCategories := self class categories. |
1207 collectionOfCategories notNil ifTrue:[ |
1316 collectionOfCategories notNil ifTrue:[ |
1208 collectionOfCategories do:[:aCategory | |
1317 collectionOfCategories do:[:aCategory | |
1209 self class fileOutCategory:aCategory on:aStream. |
1318 self class fileOutCategory:aCategory on:aStream. |
1210 aStream cr |
1319 aStream cr |
1211 ] |
1320 ] |
1212 ]. |
1321 ]. |
1213 " |
1322 " |
1214 methods from all categories in myself |
1323 methods from all categories in myself |
1215 " |
1324 " |
1216 collectionOfCategories := self categories. |
1325 collectionOfCategories := self categories. |
1217 collectionOfCategories notNil ifTrue:[ |
1326 collectionOfCategories notNil ifTrue:[ |
1218 collectionOfCategories do:[:aCategory | |
1327 collectionOfCategories do:[:aCategory | |
1219 self fileOutCategory:aCategory on:aStream. |
1328 self fileOutCategory:aCategory on:aStream. |
1220 aStream cr |
1329 aStream cr |
1221 ] |
1330 ] |
1222 ]. |
1331 ]. |
1223 " |
1332 " |
1224 optionally an initialize message |
1333 optionally an initialize message |
1225 " |
1334 " |
1226 (self class implements:#initialize) ifTrue:[ |
1335 (self class implements:#initialize) ifTrue:[ |
1227 aStream nextPutAll:(name , ' initialize'). |
1336 aStream nextPutAll:(name , ' initialize'). |
1228 aStream nextPut:sep. |
1337 aStream nextPut:sep. |
1229 aStream cr |
1338 aStream cr |
1230 ] |
1339 ] |
1231 ! |
1340 ! |
1232 |
1341 |
1233 fileOutCategory:aCategory |
1342 fileOutCategory:aCategory |
1234 "create a file 'class-category.st' consisting of all methods in aCategory. |
1343 "create a file 'class-category.st' consisting of all methods in aCategory. |
1258 |
1378 |
1259 |aStream fileName selector| |
1379 |aStream fileName selector| |
1260 |
1380 |
1261 selector := self selectorForMethod:aMethod. |
1381 selector := self selectorForMethod:aMethod. |
1262 selector notNil ifTrue:[ |
1382 selector notNil ifTrue:[ |
1263 fileName := name , '-' , selector, '.st'. |
1383 fileName := name , '-' , selector, '.st'. |
1264 fileName replaceAll:$: by:$_. |
1384 fileName replaceAll:$: by:$_. |
1265 " |
1385 " |
1266 this test allows a smalltalk to be built without Projects/ChangeSets |
1386 this test allows a smalltalk to be built without Projects/ChangeSets |
1267 " |
1387 " |
1268 Project notNil ifTrue:[ |
1388 Project notNil ifTrue:[ |
1269 fileName := Project currentProjectDirectory , fileName. |
1389 fileName := Project currentProjectDirectory , fileName. |
1270 ]. |
1390 ]. |
1271 aStream := FileStream newFileNamed:fileName. |
1391 |
1272 self fileOutMethod:aMethod on:aStream. |
1392 " |
1273 aStream close |
1393 if file exists, save original in a .sav file |
|
1394 " |
|
1395 fileName asFilename exists ifTrue:[ |
|
1396 fileName asFilename copyTo:(fileName , '.sav') |
|
1397 ]. |
|
1398 aStream := FileStream newFileNamed:fileName. |
|
1399 aStream isNil ifTrue:[ |
|
1400 ^ FileOutErrorSignal raiseRequestWith:fileName |
|
1401 errorString:('cannot create file:', fileName) |
|
1402 ]. |
|
1403 self fileOutMethod:aMethod on:aStream. |
|
1404 aStream close |
1274 ] |
1405 ] |
1275 ! |
1406 ! |
1276 |
1407 |
1277 fileOut |
1408 fileOut |
1278 "create a file 'class.st' consisting of all methods in myself. |
1409 "create a file 'class.st' consisting of all methods in myself. |
1279 If the current project is not nil, create the file in the projects |
1410 If the current project is not nil, create the file in the projects |
1280 directory." |
1411 directory. Care is taken, to not clobber any existing file in |
1281 |
1412 case of errors (for example: disk full). Also, since the classes |
1282 |aStream fileName| |
1413 methods need a valid sourcefile, the current sourceFile cannot be rewritten, |
1283 |
1414 but must be kept around until the fileOut is finished." |
1284 fileName := (Smalltalk fileNameForClass:self name) , '.st'. |
1415 |
|
1416 |aStream baseName dirName fileName newFileName needRename| |
|
1417 |
|
1418 baseName := (Smalltalk fileNameForClass:self name). |
|
1419 fileName := baseName , '.st'. |
1285 " |
1420 " |
1286 this test allows a smalltalk to be built without Projects/ChangeSets |
1421 this test allows a smalltalk to be built without Projects/ChangeSets |
1287 " |
1422 " |
1288 Project notNil ifTrue:[ |
1423 Project notNil ifTrue:[ |
1289 fileName := Project currentProjectDirectory , fileName. |
1424 dirName := Project currentProjectDirectory |
1290 ]. |
1425 ] ifFalse:[ |
1291 aStream := FileStream newFileNamed:fileName. |
1426 dirName := '' |
|
1427 ]. |
|
1428 fileName := dirName , fileName. |
|
1429 " |
|
1430 if file exists, copy the existing to a .sav-file, |
|
1431 create new file in a .new-file, |
|
1432 and, if that worked rename afterwards ... |
|
1433 " |
|
1434 fileName asFilename exists ifTrue:[ |
|
1435 fileName asFilename copyTo:('/tmp/' , baseName , '.sav'). |
|
1436 newFileName := dirName , baseName , '.new'. |
|
1437 needRename := true |
|
1438 ] ifFalse:[ |
|
1439 newFileName := fileName. |
|
1440 needRename := false |
|
1441 ]. |
|
1442 |
|
1443 aStream := FileStream newFileNamed:newFileName. |
1292 aStream isNil ifTrue:[ |
1444 aStream isNil ifTrue:[ |
1293 ^ self error:('cannot create source file:', fileName) |
1445 ^ FileOutErrorSignal raiseRequestWith:newFileName |
|
1446 errorString:('cannot create file:', newFileName) |
1294 ]. |
1447 ]. |
1295 self fileOutOn:aStream. |
1448 self fileOutOn:aStream. |
1296 aStream close |
1449 aStream close. |
|
1450 |
|
1451 " |
|
1452 finally, replace the old-file |
|
1453 be careful, if the old one is a symbolic link; in this case, |
|
1454 we have to do a copy ... |
|
1455 " |
|
1456 needRename ifTrue:[ |
|
1457 newFileName asFilename copyTo:fileName. |
|
1458 newFileName asFilename delete |
|
1459 ]. |
1297 ! |
1460 ! |
1298 |
1461 |
1299 fileOutIn:aFileDirectory |
1462 fileOutIn:aFileDirectory |
1300 "create a file 'class.st' consisting of all methods in self in |
1463 "create a file 'class.st' consisting of all methods in self in |
1301 directory aFileDirectory (ignoring any directory setting in |
1464 directory aFileDirectory (ignoring any directory setting in |
1304 |aStream fileName| |
1467 |aStream fileName| |
1305 |
1468 |
1306 fileName := (Smalltalk fileNameForClass:self name) , '.st'. |
1469 fileName := (Smalltalk fileNameForClass:self name) , '.st'. |
1307 aStream := FileStream newFileNamed:fileName in:aFileDirectory. |
1470 aStream := FileStream newFileNamed:fileName in:aFileDirectory. |
1308 aStream isNil ifTrue:[ |
1471 aStream isNil ifTrue:[ |
1309 ^ self error:('cannot create source file:', fileName) |
1472 ^ self error:('cannot create source file:', fileName) |
1310 ]. |
1473 ]. |
1311 self fileOutOn:aStream. |
1474 self fileOutOn:aStream. |
1312 aStream close |
1475 aStream close |
1313 ! ! |
1476 ! ! |
1314 |
1477 |
1315 !Class methodsFor:'obsolete binary fileOut'! |
|
1316 |
|
1317 XXbinaryFileOutMethodsOn:aStream |
|
1318 "binary file out all methods onto aStream" |
|
1319 |
|
1320 |temporaryMethod index| |
|
1321 |
|
1322 methodArray notNil ifTrue:[ |
|
1323 aStream nextPut:$!!. |
|
1324 self printClassNameOn:aStream. |
|
1325 aStream nextPutAll:' binaryMethods'. |
|
1326 aStream nextPut:$!!. |
|
1327 aStream cr. |
|
1328 index := 1. |
|
1329 methodArray do:[:aMethod | |
|
1330 (selectorArray at:index) storeOn:aStream. |
|
1331 aStream nextPut:$!!. |
|
1332 |
|
1333 aMethod byteCode isNil ifTrue:[ |
|
1334 temporaryMethod := self compiler compile:(aMethod source) |
|
1335 forClass:self |
|
1336 inCategory:(aMethod category) |
|
1337 notifying:nil |
|
1338 install:false. |
|
1339 temporaryMethod binaryFileOutOn:aStream |
|
1340 ] ifFalse:[ |
|
1341 aMethod binaryFileOutOn:aStream |
|
1342 ]. |
|
1343 aStream cr. |
|
1344 index := index + 1 |
|
1345 ]. |
|
1346 aStream nextPut:$!!. |
|
1347 aStream cr |
|
1348 ] |
|
1349 ! |
|
1350 |
|
1351 XXbinaryFileOutOn:aStream |
|
1352 "file out all methods onto aStream" |
|
1353 |
|
1354 aStream nextPut:$'. |
|
1355 aStream nextPutAll:('From Smalltalk/X, Version:' |
|
1356 , (Smalltalk versionString) |
|
1357 , ' on '). |
|
1358 aStream nextPutAll:(Date today printString , ' at ' , Time now printString). |
|
1359 aStream nextPut:$'. |
|
1360 aStream nextPut:$!!. |
|
1361 aStream cr. |
|
1362 self fileOutDefinitionOn:aStream. |
|
1363 aStream nextPut:$!!. |
|
1364 aStream cr. |
|
1365 comment notNil ifTrue:[ |
|
1366 aStream nextPutAll:name. |
|
1367 aStream nextPutAll:' comment:'. |
|
1368 aStream nextPutAll:(comment storeString). |
|
1369 aStream nextPut:$!!. |
|
1370 aStream cr |
|
1371 ]. |
|
1372 self class binaryFileOutMethodsOn:aStream. |
|
1373 self binaryFileOutMethodsOn:aStream. |
|
1374 (self class implements:#initialize) ifTrue:[ |
|
1375 aStream nextPutAll:(name , ' initialize'). |
|
1376 aStream nextPut:$!!. |
|
1377 aStream cr |
|
1378 ] |
|
1379 ! |
|
1380 |
|
1381 XXbinaryFileOut |
|
1382 "create a file 'class.sb' consisting of all methods in myself. |
|
1383 If the current project is not nil, create the file in the projects |
|
1384 directory." |
|
1385 |
|
1386 |aStream fileName| |
|
1387 |
|
1388 fileName := (Smalltalk fileNameForClass:self name) , '.sb'. |
|
1389 Project notNil ifTrue:[ |
|
1390 fileName := Project currentProjectDirectory , fileName. |
|
1391 ]. |
|
1392 aStream := FileStream newFileNamed:fileName. |
|
1393 aStream isNil ifTrue:[ |
|
1394 ^ self error:('cannot create class file:', fileName) |
|
1395 ]. |
|
1396 self binaryFileOutOn:aStream. |
|
1397 aStream close |
|
1398 ! ! |
|
1399 |
|
1400 !Class methodsFor:'printOut'! |
1478 !Class methodsFor:'printOut'! |
1401 |
1479 |
1402 printClassNameOn:aStream |
1480 printClassNameOn:aStream |
1403 "helper for fileOut - print my name if I am not a Metaclass; |
1481 "helper for fileOut - print my name if I am not a Metaclass; |
1404 otherwise my name without -class followed by space-class" |
1482 otherwise my name without -class followed by space-class" |
1405 |
1483 |
1406 self isMeta ifTrue:[ |
1484 self isMeta ifTrue:[ |
1407 aStream nextPutAll:(name copyTo:(name size - 5)). |
1485 aStream nextPutAll:(name copyTo:(name size - 5)). |
1408 aStream nextPutAll:' class' |
1486 aStream nextPutAll:' class' |
1409 ] ifFalse:[ |
1487 ] ifFalse:[ |
1410 name printOn:aStream |
1488 name printOn:aStream |
1411 ] |
1489 ] |
1412 ! |
1490 ! |
1413 |
1491 |
1414 printNameArray:anArray on:aStream indent:indent |
1492 printNameArray:anArray on:aStream indent:indent |
1415 "print an array of strings separated by spaces; when the stream |
1493 "print an array of strings separated by spaces; when the stream |
1611 aPrintStream cr. |
1689 aPrintStream cr. |
1612 inComment := false. |
1690 inComment := false. |
1613 textSize := text size. |
1691 textSize := text size. |
1614 textIndex := 2. |
1692 textIndex := 2. |
1615 [textIndex <= textSize] whileTrue:[ |
1693 [textIndex <= textSize] whileTrue:[ |
1616 line := text at:textIndex. |
1694 line := text at:textIndex. |
1617 ((line occurrencesOf:Character doubleQuote) == 0) ifTrue:[ |
1695 ((line occurrencesOf:Character doubleQuote) == 0) ifTrue:[ |
1618 aPrintStream nextPutAll:line |
1696 aPrintStream nextPutAll:line |
1619 ] ifFalse:[ |
1697 ] ifFalse:[ |
1620 lineSize := line size. |
1698 lineSize := line size. |
1621 lineIndex := 1. |
1699 lineIndex := 1. |
1622 [lineIndex <= lineSize] whileTrue:[ |
1700 [lineIndex <= lineSize] whileTrue:[ |
1623 aCharacter := line at:lineIndex. |
1701 aCharacter := line at:lineIndex. |
1624 (aCharacter == Character doubleQuote) ifTrue:[ |
1702 (aCharacter == Character doubleQuote) ifTrue:[ |
1625 inComment ifTrue:[ |
1703 inComment ifTrue:[ |
1626 aPrintStream normal. |
1704 aPrintStream normal. |
1627 aPrintStream nextPut:aCharacter. |
1705 aPrintStream nextPut:aCharacter. |
1628 inComment := false |
1706 inComment := false |
1629 ] ifFalse:[ |
1707 ] ifFalse:[ |
1630 aPrintStream nextPut:aCharacter. |
1708 aPrintStream nextPut:aCharacter. |
1631 aPrintStream italic. |
1709 aPrintStream italic. |
1632 inComment := true |
1710 inComment := true |
1633 ] |
1711 ] |
1634 ] ifFalse:[ |
1712 ] ifFalse:[ |
1635 aPrintStream nextPut:aCharacter |
1713 aPrintStream nextPut:aCharacter |
1636 ]. |
1714 ]. |
1637 lineIndex := lineIndex + 1 |
1715 lineIndex := lineIndex + 1 |
1638 ] |
1716 ] |
1639 ]. |
1717 ]. |
1640 aPrintStream cr. |
1718 aPrintStream cr. |
1641 textIndex := textIndex + 1 |
1719 textIndex := textIndex + 1 |
1642 ] |
1720 ] |
1643 ! |
1721 ! |
1644 |
1722 |
1645 printOutCategory:aCategory on:aPrintStream |
1723 printOutCategory:aCategory on:aPrintStream |
1646 "print out all methods in aCategory on aPrintStream should be a PrintStream" |
1724 "print out all methods in aCategory on aPrintStream should be a PrintStream" |
1647 |
1725 |
1648 |any| |
1726 |any| |
1649 methodArray notNil ifTrue:[ |
1727 methodArray notNil ifTrue:[ |
1650 any := false. |
1728 any := false. |
1651 methodArray do:[:aMethod | |
1729 methodArray do:[:aMethod | |
1652 (aCategory = aMethod category) ifTrue:[ |
1730 (aCategory = aMethod category) ifTrue:[ |
1653 any := true |
1731 any := true |
1654 ] |
1732 ] |
1655 ]. |
1733 ]. |
1656 any ifTrue:[ |
1734 any ifTrue:[ |
1657 aPrintStream italic. |
1735 aPrintStream italic. |
1658 aPrintStream nextPutAll:aCategory. |
1736 aPrintStream nextPutAll:aCategory. |
1659 aPrintStream normal. |
1737 aPrintStream normal. |
1660 aPrintStream cr. |
1738 aPrintStream cr. |
1661 aPrintStream cr. |
1739 aPrintStream cr. |
1662 methodArray do:[:aMethod | |
1740 methodArray do:[:aMethod | |
1663 (aCategory = aMethod category) ifTrue:[ |
1741 (aCategory = aMethod category) ifTrue:[ |
1664 self printOutSource:(aMethod source) on:aPrintStream. |
1742 self printOutSource:(aMethod source) on:aPrintStream. |
1665 aPrintStream cr. |
1743 aPrintStream cr. |
1666 aPrintStream cr |
1744 aPrintStream cr |
1667 ] |
1745 ] |
1668 ]. |
1746 ]. |
1669 aPrintStream cr |
1747 aPrintStream cr |
1670 ] |
1748 ] |
1671 ] |
1749 ] |
1672 ! |
1750 ! |
1673 |
1751 |
1674 printOutOn:aPrintStream |
1752 printOutOn:aPrintStream |
1675 "print out all methods on aPrintStream which should be a printStream" |
1753 "print out all methods on aPrintStream which should be a printStream" |
1677 |collectionOfCategories| |
1755 |collectionOfCategories| |
1678 self printOutDefinitionOn:aPrintStream. |
1756 self printOutDefinitionOn:aPrintStream. |
1679 aPrintStream cr. |
1757 aPrintStream cr. |
1680 collectionOfCategories := self class categories. |
1758 collectionOfCategories := self class categories. |
1681 collectionOfCategories notNil ifTrue:[ |
1759 collectionOfCategories notNil ifTrue:[ |
1682 aPrintStream nextPutAll:'class protocol'. |
1760 aPrintStream nextPutAll:'class protocol'. |
1683 aPrintStream cr. aPrintStream cr. |
1761 aPrintStream cr. aPrintStream cr. |
1684 collectionOfCategories do:[:aCategory | |
1762 collectionOfCategories do:[:aCategory | |
1685 self class printOutCategory:aCategory on:aPrintStream |
1763 self class printOutCategory:aCategory on:aPrintStream |
1686 ] |
1764 ] |
1687 ]. |
1765 ]. |
1688 collectionOfCategories := self categories. |
1766 collectionOfCategories := self categories. |
1689 collectionOfCategories notNil ifTrue:[ |
1767 collectionOfCategories notNil ifTrue:[ |
1690 aPrintStream nextPutAll:'instance protocol'. |
1768 aPrintStream nextPutAll:'instance protocol'. |
1691 aPrintStream cr. aPrintStream cr. |
1769 aPrintStream cr. aPrintStream cr. |
1692 collectionOfCategories do:[:aCategory | |
1770 collectionOfCategories do:[:aCategory | |
1693 self printOutCategory:aCategory on:aPrintStream |
1771 self printOutCategory:aCategory on:aPrintStream |
1694 ] |
1772 ] |
1695 ] |
1773 ] |
1696 ! |
1774 ! |
1697 |
1775 |
1698 printOutCategoryProtocol:aCategory on:aPrintStream |
1776 printOutCategoryProtocol:aCategory on:aPrintStream |
1699 |any| |
1777 |any| |
1700 |
1778 |
1701 methodArray notNil ifTrue:[ |
1779 methodArray notNil ifTrue:[ |
1702 any := false. |
1780 any := false. |
1703 methodArray do:[:aMethod | |
1781 methodArray do:[:aMethod | |
1704 (aCategory = aMethod category) ifTrue:[ |
1782 (aCategory = aMethod category) ifTrue:[ |
1705 any := true |
1783 any := true |
1706 ] |
1784 ] |
1707 ]. |
1785 ]. |
1708 any ifTrue:[ |
1786 any ifTrue:[ |
1709 aPrintStream italic. |
1787 aPrintStream italic. |
1710 aPrintStream nextPutAll:aCategory. |
1788 aPrintStream nextPutAll:aCategory. |
1711 aPrintStream normal. |
1789 aPrintStream normal. |
1712 aPrintStream cr. |
1790 aPrintStream cr. |
1713 aPrintStream cr. |
1791 aPrintStream cr. |
1714 methodArray do:[:aMethod | |
1792 methodArray do:[:aMethod | |
1715 (aCategory = aMethod category) ifTrue:[ |
1793 (aCategory = aMethod category) ifTrue:[ |
1716 self printOutSourceProtocol:(aMethod source) |
1794 self printOutSourceProtocol:(aMethod source) |
1717 on:aPrintStream. |
1795 on:aPrintStream. |
1718 aPrintStream cr. |
1796 aPrintStream cr. |
1719 aPrintStream cr |
1797 aPrintStream cr |
1720 ] |
1798 ] |
1721 ]. |
1799 ]. |
1722 aPrintStream cr |
1800 aPrintStream cr |
1723 ] |
1801 ] |
1724 ] |
1802 ] |
1725 ! |
1803 ! |
1726 |
1804 |
1727 printOutProtocolOn:aPrintStream |
1805 printOutProtocolOn:aPrintStream |
1728 |collectionOfCategories| |
1806 |collectionOfCategories| |
1729 self printOutDefinitionOn:aPrintStream. |
1807 self printOutDefinitionOn:aPrintStream. |
1730 aPrintStream cr. |
1808 aPrintStream cr. |
1731 collectionOfCategories := self class categories. |
1809 collectionOfCategories := self class categories. |
1732 collectionOfCategories notNil ifTrue:[ |
1810 collectionOfCategories notNil ifTrue:[ |
1733 aPrintStream nextPutAll:'class protocol'. |
1811 aPrintStream nextPutAll:'class protocol'. |
1734 aPrintStream cr. aPrintStream cr. |
1812 aPrintStream cr. aPrintStream cr. |
1735 collectionOfCategories do:[:aCategory | |
1813 collectionOfCategories do:[:aCategory | |
1736 self class printOutCategoryProtocol:aCategory on:aPrintStream |
1814 self class printOutCategoryProtocol:aCategory on:aPrintStream |
1737 ] |
1815 ] |
1738 ]. |
1816 ]. |
1739 collectionOfCategories := self categories. |
1817 collectionOfCategories := self categories. |
1740 collectionOfCategories notNil ifTrue:[ |
1818 collectionOfCategories notNil ifTrue:[ |
1741 aPrintStream nextPutAll:'instance protocol'. |
1819 aPrintStream nextPutAll:'instance protocol'. |
1742 aPrintStream cr. aPrintStream cr. |
1820 aPrintStream cr. aPrintStream cr. |
1743 collectionOfCategories do:[:aCategory | |
1821 collectionOfCategories do:[:aCategory | |
1744 self printOutCategoryProtocol:aCategory on:aPrintStream |
1822 self printOutCategoryProtocol:aCategory on:aPrintStream |
1745 ] |
1823 ] |
1746 ] |
1824 ] |
1747 ! ! |
1825 ! ! |
1748 |
1826 |
1749 !Class methodsFor: 'binary storage'! |
1827 !Class methodsFor: 'binary storage'! |
1750 |
1828 |
1751 addGlobalsTo: globalDictionary manager: manager |
1829 addGlobalsTo: globalDictionary manager: manager |
1752 " |
1830 " |
1753 classPool == nil ifFalse: [ |
1831 classPool == nil ifFalse: [ |
1754 classPool associationsDo: [:assoc| |
1832 classPool associationsDo: [:assoc| |
1755 globalDictionary at: assoc put: self |
1833 globalDictionary at: assoc put: self |
1756 ] |
1834 ] |
1757 ] |
1835 ] |
1758 " |
1836 " |
1759 ! |
1837 ! |
1760 |
1838 |
1761 storeBinaryDefinitionOf: anAssociation on: stream manager: manager |
1839 storeBinaryDefinitionOf: anAssociation on: stream manager: manager |