--- a/ObjectFileLoader.st Tue Jul 17 09:12:47 2012 +0200
+++ b/ObjectFileLoader.st Tue Jul 17 11:34:23 2012 +0200
@@ -2211,7 +2211,7 @@
"/ and re-change method categories
"/
savedOldClasses do:[:oldClass |
- |newClass oldMethods newMethodDict oldMthd newMthd
+ |newClass oldMethods newMethodDict newMthd
oldCat oldClassVarString oldClassCategory|
newClass := Smalltalk classNamed:(oldClass name).
@@ -2231,23 +2231,22 @@
].
oldMethods := saveOldMethodsPerClass at:oldClass.
newMethodDict := newClass methodDictionary.
- newMethodDict keys copy do:[:newSelector |
- (oldMethods includesKey:newSelector) ifFalse:[
-"/ ('ObjectFileLoader [info]: remove method #' , newSelector , ' from reloaded ' , oldClass name , '.') infoPrintCR.
- newMethodDict removeKey:newSelector
- ] ifTrue:[
- oldMthd := oldMethods at:newSelector.
- oldMthd byteCode isNil ifTrue:[
- "a compiled method, load the new code (address may have been changed)"
- newMthd := newMethodDict at:newSelector.
- oldMthd code:newMthd code.
+ oldMethods keysAndValuesDo:[:selector :oldMethod|
+ oldMethod
+ code:nil;
+ mclass:self.
+ oldMethod byteCode isNil ifTrue:[
+ "a compiled method, load the new code (addresses may have been changed)"
+ newMthd := newMethodDict at:selector ifAbsent:nil.
+ newMthd notNil ifTrue:[
+ oldMethod code:newMthd code.
] ifFalse:[
- oldMthd code:nil.
+ ('ObjectFileLoader [warning]: ' , oldClass name , ' missing method: ', selector, '.') errorPrintCR.
].
- newClass primAddSelector:newSelector withMethod:oldMthd.
].
- ]
- ]
+ ].
+ newClass setMethodDictionary:oldMethods.
+ ].
].
"/
@@ -2364,9 +2363,6 @@
"/ send #reinitializeAfterLoad to each of them
anyModulesToInitialize ifTrue:[
AbortOperationRequest catch:[
-"/ self moduleInit:0 forceOld:true interruptable:true.
-"/ self moduleInit:1 forceOld:true interruptable:true.
-"/ self moduleInit:2 forceOld:true interruptable:true.
self moduleInit:4 forceOld:false interruptable:true.
]
]
@@ -4315,11 +4311,11 @@
!ObjectFileLoader class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libcomp/ObjectFileLoader.st,v 1.312 2012-07-17 07:12:47 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libcomp/ObjectFileLoader.st,v 1.313 2012-07-17 09:34:23 stefan Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libcomp/ObjectFileLoader.st,v 1.312 2012-07-17 07:12:47 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libcomp/ObjectFileLoader.st,v 1.313 2012-07-17 09:34:23 stefan Exp $'
! !
ObjectFileLoader initialize!