Smalltalk.st
changeset 17582 4d4475b60428
parent 17576 2d611305d7e6
child 17588 05b944f08b13
--- a/Smalltalk.st	Tue Mar 03 11:46:39 2015 +0100
+++ b/Smalltalk.st	Tue Mar 03 11:48:10 2015 +0100
@@ -5830,314 +5830,320 @@
     |classFileName alternativeClassFileName libName newClass ok wasLazy wasSilent sharedLibExtension inStream mgr
      filenameToSet packageDir packageFile bos|
 
-    wasLazy := Compiler compileLazy:loadLazy.
-    beSilent notNil ifTrue:[
-	wasSilent := self silentLoading:beSilent.
-    ].
-
-    classFileName := Smalltalk fileNameForClass:aClassName.
-    (classFileName = aClassName) ifTrue:[
-	"/ no abbrev.stc translation for className
-	(aClassName includes:$:) ifTrue:[
-	    "/ a nameSpace name
-	    alternativeClassFileName := classFileName copyFrom:(classFileName lastIndexOf:$:)+1
-	].
-    ].
-
-    classFileName asFilename isAbsolute ifTrue:[
-	classFileName asFilename suffix notEmptyOrNil ifTrue:[
-	    ok := self fileIn:classFileName lazy:loadLazy silent:beSilent.
-	] ifFalse:[
-	    ok := self fileInSourceFile:classFileName lazy:loadLazy silent:beSilent.
-	]
-    ] ifFalse:[
-	classFileName := classFileName copyReplaceAll:$: with:$_ ifNone:classFileName.
-	[
-	    Class withoutUpdatingChangesDo:[
-		|zarFn zar entry|
-
-		ok := false.
-
-		package notNil ifTrue:[
-		    packageDir := package asPackageId projectDirectory.
-		    "/ packageDir := package asString.
-		    "/ packageDir := packageDir copyReplaceAll:$: with:$/.
-		    packageDir isNil ifTrue:[
-			packageDir := self packageDirectoryForPackageId:package
-		    ].
-		    packageDir notNil ifTrue:[
-			packageDir := packageDir asFilename.
-		    ].
-		].
-
-		Class packageQuerySignal answer:package do:[
-		    "
-		     then, if dynamic linking is available,
-		    "
-		    (LoadBinaries and:[ObjectFileLoader notNil]) ifTrue:[
-			sharedLibExtension := ObjectFileLoader sharedLibraryExtension.
-			"
-			 first look for a class packages shared binary in binary/xxx.o
-			"
-			libName := self libraryFileNameOfClass:aClassName.
-			libName notNil ifTrue:[
-			    (ok := self fileInClass:aClassName fromObject:(libName, sharedLibExtension))
-			    ifFalse:[
-				sharedLibExtension ~= '.o' ifTrue:[
-				    ok := self fileInClass:aClassName fromObject:(libName, '.o')
-				]
-			    ].
-			].
-			"
-			 then, look for a shared binary in binary/xxx.o
-			"
-			ok ifFalse:[
-			    (ok := self fileInClass:aClassName fromObject:(classFileName, sharedLibExtension))
-			    ifFalse:[
-				sharedLibExtension ~= '.o' ifTrue:[
-				    ok := self fileInClass:aClassName fromObject:(classFileName, '.o')
-				].
-				ok ifFalse:[
-				    alternativeClassFileName notNil ifTrue:[
-					(ok := self fileInClass:aClassName fromObject:(alternativeClassFileName, sharedLibExtension))
-					ifFalse:[
-					    sharedLibExtension ~= '.o' ifTrue:[
-						ok := self fileInClass:aClassName fromObject:(alternativeClassFileName, '.o')
-					    ]
-					]
-				    ].
-				].
-			    ].
-			].
-		    ].
-
-		    "
-		     if that did not work, look for a compiled-bytecode file ...
-		    "
-		    ok ifFalse:[
-			(ok := self fileIn:(classFileName , '.cls') lazy:loadLazy silent:beSilent)
-			ifFalse:[
-			    alternativeClassFileName notNil ifTrue:[
-				ok := self fileIn:(alternativeClassFileName , '.cls') lazy:loadLazy silent:beSilent
-			    ]
-			]
-		    ].
-		    "
-		     if that did not work, and the classes package is known,
-		     look for an st-cls file
-		     in a package subdir of the source-directory ...
-		    "
-		    ok ifFalse:[
-			(packageDir notNil and:[BinaryObjectStorage notNil]) ifTrue:[
-			    packageFile := self getPackageFileName:((packageDir / 'classes' / classFileName) addSuffix:'cls').
-			    packageFile isNil ifTrue:[
-				packageFile := (packageDir / 'classes' / classFileName) addSuffix:'cls'.
-			    ].
-			    (ok := self fileIn:packageFile lazy:loadLazy silent:beSilent)
-			    ifFalse:[
-				alternativeClassFileName notNil ifTrue:[
-				    packageFile := self getPackageFileName:((packageDir / 'classes' / alternativeClassFileName) addSuffix:'cls').
-				    packageFile isNil ifTrue:[
-					packageFile := ((packageDir / 'classes' / alternativeClassFileName) addSuffix:'cls').
-				    ].
-				    ok := self fileIn:packageFile lazy:loadLazy silent:beSilent
-				]
-			    ].
-
-			    zarFn := self getPackageFileName:(packageDir / 'classes.zip').
-			    zarFn notNil ifTrue:[
-				zar := ZipArchive oldFileNamed:zarFn.
-				zar notNil ifTrue:[
-				    entry := zar extract:(classFileName , '.cls').
-				    (entry isNil and:[alternativeClassFileName notNil]) ifTrue:[
-					entry := zar extract:(alternativeClassFileName , '.cls').
-				    ].
-				    entry notNil ifTrue:[
-					bos := BinaryObjectStorage onOld:(entry asByteArray readStream).
-					bos next.
-					bos close.
-					ok := true
-				    ].
-				]
-			    ]
-			]
-		    ].
-
-		    "
-		     if that did not work, look for an st-source file ...
-		    "
-		    ok ifFalse:[
-			filenameToSet := classFileName.
-			(ok := self fileInSourceFile:filenameToSet lazy:loadLazy silent:beSilent)
-			ifFalse:[
-			    alternativeClassFileName notNil ifTrue:[
-				filenameToSet := alternativeClassFileName.
-				ok := self fileInSourceFile:filenameToSet lazy:loadLazy silent:beSilent
-			    ].
-			    ok ifFalse:[
-				"
-				 ... and in the standard source-directory
-				"
-				filenameToSet := 'source' asFilename / classFileName.
-				(ok := self fileInSourceFile:filenameToSet lazy:loadLazy silent:beSilent)
-				ifFalse:[
-				    alternativeClassFileName notNil ifTrue:[
-					filenameToSet := 'source' asFilename / alternativeClassFileName.
-					ok := self fileInSourceFile:filenameToSet lazy:loadLazy silent:beSilent
-				    ]
-				]
-			    ]
-			].
-			"
-			 if that did not work, and the classes package is known,
-			 look for an st-source file
-			 in a package subdir of the source-directory ...
-			"
-			ok ifFalse:[
-			    packageDir notNil ifTrue:[
-				packageFile := self getPackageSourceFileName:(packageDir / 'source' / classFileName).
-				packageFile isNil ifTrue:[
-				    packageFile := (packageDir / 'source' / classFileName).
-				].
-				filenameToSet := packageFile.
-				(ok := self fileInSourceFile:packageFile lazy:loadLazy silent:beSilent)
-				ifFalse:[
-				    alternativeClassFileName notNil ifTrue:[
-					packageFile := self getPackageSourceFileName:(packageDir / 'source' / alternativeClassFileName).
-					packageFile isNil ifTrue:[
-					    packageFile := (packageDir / 'source' / alternativeClassFileName).
-					].
-					filenameToSet := packageFile.
-					ok := self fileInSourceFile:packageFile lazy:loadLazy silent:beSilent
-				    ].
-				    ok ifFalse:[
-					packageFile := self getPackageSourceFileName:(packageDir / classFileName).
-					packageFile isNil ifTrue:[
-					    packageFile := (packageDir / classFileName).
-					].
-					filenameToSet := packageFile.
-					(ok := self fileInSourceFile:packageFile lazy:loadLazy silent:beSilent)
-					ifFalse:[
-					    alternativeClassFileName notNil ifTrue:[
-						packageFile := self getPackageFileName:(packageDir / alternativeClassFileName).
-						packageFile isNil ifTrue:[
-						    packageFile := packageDir / alternativeClassFileName.
-						].
-						filenameToSet := packageFile.
-						ok := self fileInSourceFile:packageFile lazy:loadLazy silent:beSilent
-					    ].
-					    ok ifFalse:[
-						"
-						 ... and in the standard source-directory
-						"
-						filenameToSet := 'source' asFilename / packageDir / classFileName.
-						(ok := self fileInSourceFile:filenameToSet lazy:loadLazy silent:beSilent)
-						ifFalse:[
-						    alternativeClassFileName notNil ifTrue:[
-							filenameToSet := 'source' asFilename / packageDir / alternativeClassFileName.
-							ok := self fileInSourceFile:filenameToSet lazy:loadLazy silent:beSilent
-						    ]
-						]
-					    ]
-					].
-				    ].
-				].
-			    ]
-			].
-			"
-			 if that did not work, and the classes package is known,
-			 look for a zipArchive containing a class entry.
-			"
-			ok ifFalse:[
-			    packageDir notNil ifTrue:[
-				zarFn := self getPackageFileName:(packageDir / 'source.zip').
-				zarFn isNil ifTrue:[
-				    zarFn := packageDir withSuffix:'zip'.
-				    zarFn := self getSourceFileName:zarFn.
-				].
-				(zarFn notNil and:[zarFn asFilename exists]) ifTrue:[
-				    zar := ZipArchive oldFileNamed:zarFn.
-				    zar notNil ifTrue:[
-					entry := zar extract:(classFileName , '.st').
-					(entry isNil and:[alternativeClassFileName notNil]) ifTrue:[
-					    entry := zar extract:(alternativeClassFileName , '.st').
-					].
-					entry notNil ifTrue:[
-					    filenameToSet := zarFn.
-					    ok := self
-						    fileInStream:(entry asString readStream)
-						    lazy:loadLazy
-						    silent:beSilent
-						    logged:false
-						    addPath:nil
-					].
-				    ]
-				]
-			    ]
-			].
-
-			"
-			 if that did not work,
-			 look for a zipArchive containing a class entry.
-			"
-			ok ifFalse:[
-			    zarFn := self getSourceFileName:'source.zip'.
-			    zarFn notNil ifTrue:[
-				zar := ZipArchive oldFileNamed:zarFn.
-				zar notNil ifTrue:[
-				    entry := zar extract:(zarFn := classFileName , '.st').
-				    (entry isNil and:[alternativeClassFileName notNil]) ifTrue:[
-					entry := zar extract:(zarFn := alternativeClassFileName , '.st').
-				    ].
-				    entry notNil ifTrue:[
-					filenameToSet := zarFn.
-					ok := self
-						fileInStream:(entry asString readStream)
-						lazy:loadLazy
-						silent:beSilent
-						logged:false
-						addPath:nil
-				    ].
-				]
-			    ]
-			].
-			ok ifFalse:[
-			    "
-			     if there is a sourceCodeManager, ask it for the classes sourceCode
-			    "
-			    (mgr := Smalltalk at:#SourceCodeManager) notNil ifTrue:[
-				inStream := mgr getMostRecentSourceStreamForClassNamed:aClassName inPackage:package.
-				inStream notNil ifTrue:[
-				    filenameToSet := nil.
-				    ok := self fileInStream:inStream lazy:loadLazy silent:beSilent logged:false addPath:nil.
-				]
-			    ].
-			].
-		    ].
-		]
-	    ].
-	] ensure:[
-	    Compiler compileLazy:wasLazy.
-	    wasSilent notNil ifTrue:[
-		self silentLoading:wasSilent
-	    ]
-	].
-    ].
-
-    ok ifTrue:[
-	newClass := self at:(aClassName asSymbol).
-	newClass notNil ifTrue:[
-	    "set the classes name - but do not change if already set"
-	    filenameToSet notNil ifTrue:[
-		newClass getClassFilename isNil ifTrue:[
-		    newClass setClassFilename:(filenameToSet asFilename baseName)
-		].
-	    ].
-
-	    doInit ifTrue:[
-		newClass initialize
-	    ]
-	]
+    [
+        Smalltalk changed:#preLoad.
+
+        wasLazy := Compiler compileLazy:loadLazy.
+        beSilent notNil ifTrue:[
+            wasSilent := self silentLoading:beSilent.
+        ].
+
+        classFileName := Smalltalk fileNameForClass:aClassName.
+        (classFileName = aClassName) ifTrue:[
+            "/ no abbrev.stc translation for className
+            (aClassName includes:$:) ifTrue:[
+                "/ a nameSpace name
+                alternativeClassFileName := classFileName copyFrom:(classFileName lastIndexOf:$:)+1
+            ].
+        ].
+
+        classFileName asFilename isAbsolute ifTrue:[
+            classFileName asFilename suffix notEmptyOrNil ifTrue:[
+                ok := self fileIn:classFileName lazy:loadLazy silent:beSilent.
+            ] ifFalse:[
+                ok := self fileInSourceFile:classFileName lazy:loadLazy silent:beSilent.
+            ]
+        ] ifFalse:[
+            classFileName := classFileName copyReplaceAll:$: with:$_ ifNone:classFileName.
+            [
+                Class withoutUpdatingChangesDo:[
+                    |zarFn zar entry|
+
+                    ok := false.
+
+                    package notNil ifTrue:[
+                        packageDir := package asPackageId projectDirectory.
+                        "/ packageDir := package asString.
+                        "/ packageDir := packageDir copyReplaceAll:$: with:$/.
+                        packageDir isNil ifTrue:[
+                            packageDir := self packageDirectoryForPackageId:package
+                        ].
+                        packageDir notNil ifTrue:[
+                            packageDir := packageDir asFilename.
+                        ].
+                    ].
+
+                    Class packageQuerySignal answer:package do:[
+                        "
+                         then, if dynamic linking is available,
+                        "
+                        (LoadBinaries and:[ObjectFileLoader notNil]) ifTrue:[
+                            sharedLibExtension := ObjectFileLoader sharedLibraryExtension.
+                            "
+                             first look for a class packages shared binary in binary/xxx.o
+                            "
+                            libName := self libraryFileNameOfClass:aClassName.
+                            libName notNil ifTrue:[
+                                (ok := self fileInClass:aClassName fromObject:(libName, sharedLibExtension))
+                                ifFalse:[
+                                    sharedLibExtension ~= '.o' ifTrue:[
+                                        ok := self fileInClass:aClassName fromObject:(libName, '.o')
+                                    ]
+                                ].
+                            ].
+                            "
+                             then, look for a shared binary in binary/xxx.o
+                            "
+                            ok ifFalse:[
+                                (ok := self fileInClass:aClassName fromObject:(classFileName, sharedLibExtension))
+                                ifFalse:[
+                                    sharedLibExtension ~= '.o' ifTrue:[
+                                        ok := self fileInClass:aClassName fromObject:(classFileName, '.o')
+                                    ].
+                                    ok ifFalse:[
+                                        alternativeClassFileName notNil ifTrue:[
+                                            (ok := self fileInClass:aClassName fromObject:(alternativeClassFileName, sharedLibExtension))
+                                            ifFalse:[
+                                                sharedLibExtension ~= '.o' ifTrue:[
+                                                    ok := self fileInClass:aClassName fromObject:(alternativeClassFileName, '.o')
+                                                ]
+                                            ]
+                                        ].
+                                    ].
+                                ].
+                            ].
+                        ].
+
+                        "
+                         if that did not work, look for a compiled-bytecode file ...
+                        "
+                        ok ifFalse:[
+                            (ok := self fileIn:(classFileName , '.cls') lazy:loadLazy silent:beSilent)
+                            ifFalse:[
+                                alternativeClassFileName notNil ifTrue:[
+                                    ok := self fileIn:(alternativeClassFileName , '.cls') lazy:loadLazy silent:beSilent
+                                ]
+                            ]
+                        ].
+                        "
+                         if that did not work, and the classes package is known,
+                         look for an st-cls file
+                         in a package subdir of the source-directory ...
+                        "
+                        ok ifFalse:[
+                            (packageDir notNil and:[BinaryObjectStorage notNil]) ifTrue:[
+                                packageFile := self getPackageFileName:((packageDir / 'classes' / classFileName) addSuffix:'cls').
+                                packageFile isNil ifTrue:[
+                                    packageFile := (packageDir / 'classes' / classFileName) addSuffix:'cls'.
+                                ].
+                                (ok := self fileIn:packageFile lazy:loadLazy silent:beSilent)
+                                ifFalse:[
+                                    alternativeClassFileName notNil ifTrue:[
+                                        packageFile := self getPackageFileName:((packageDir / 'classes' / alternativeClassFileName) addSuffix:'cls').
+                                        packageFile isNil ifTrue:[
+                                            packageFile := ((packageDir / 'classes' / alternativeClassFileName) addSuffix:'cls').
+                                        ].
+                                        ok := self fileIn:packageFile lazy:loadLazy silent:beSilent
+                                    ]
+                                ].
+
+                                zarFn := self getPackageFileName:(packageDir / 'classes.zip').
+                                zarFn notNil ifTrue:[
+                                    zar := ZipArchive oldFileNamed:zarFn.
+                                    zar notNil ifTrue:[
+                                        entry := zar extract:(classFileName , '.cls').
+                                        (entry isNil and:[alternativeClassFileName notNil]) ifTrue:[
+                                            entry := zar extract:(alternativeClassFileName , '.cls').
+                                        ].
+                                        entry notNil ifTrue:[
+                                            bos := BinaryObjectStorage onOld:(entry asByteArray readStream).
+                                            bos next.
+                                            bos close.
+                                            ok := true
+                                        ].
+                                    ]
+                                ]
+                            ]
+                        ].
+
+                        "
+                         if that did not work, look for an st-source file ...
+                        "
+                        ok ifFalse:[
+                            filenameToSet := classFileName.
+                            (ok := self fileInSourceFile:filenameToSet lazy:loadLazy silent:beSilent)
+                            ifFalse:[
+                                alternativeClassFileName notNil ifTrue:[
+                                    filenameToSet := alternativeClassFileName.
+                                    ok := self fileInSourceFile:filenameToSet lazy:loadLazy silent:beSilent
+                                ].
+                                ok ifFalse:[
+                                    "
+                                     ... and in the standard source-directory
+                                    "
+                                    filenameToSet := 'source' asFilename / classFileName.
+                                    (ok := self fileInSourceFile:filenameToSet lazy:loadLazy silent:beSilent)
+                                    ifFalse:[
+                                        alternativeClassFileName notNil ifTrue:[
+                                            filenameToSet := 'source' asFilename / alternativeClassFileName.
+                                            ok := self fileInSourceFile:filenameToSet lazy:loadLazy silent:beSilent
+                                        ]
+                                    ]
+                                ]
+                            ].
+                            "
+                             if that did not work, and the classes package is known,
+                             look for an st-source file
+                             in a package subdir of the source-directory ...
+                            "
+                            ok ifFalse:[
+                                packageDir notNil ifTrue:[
+                                    packageFile := self getPackageSourceFileName:(packageDir / 'source' / classFileName).
+                                    packageFile isNil ifTrue:[
+                                        packageFile := (packageDir / 'source' / classFileName).
+                                    ].
+                                    filenameToSet := packageFile.
+                                    (ok := self fileInSourceFile:packageFile lazy:loadLazy silent:beSilent)
+                                    ifFalse:[
+                                        alternativeClassFileName notNil ifTrue:[
+                                            packageFile := self getPackageSourceFileName:(packageDir / 'source' / alternativeClassFileName).
+                                            packageFile isNil ifTrue:[
+                                                packageFile := (packageDir / 'source' / alternativeClassFileName).
+                                            ].
+                                            filenameToSet := packageFile.
+                                            ok := self fileInSourceFile:packageFile lazy:loadLazy silent:beSilent
+                                        ].
+                                        ok ifFalse:[
+                                            packageFile := self getPackageSourceFileName:(packageDir / classFileName).
+                                            packageFile isNil ifTrue:[
+                                                packageFile := (packageDir / classFileName).
+                                            ].
+                                            filenameToSet := packageFile.
+                                            (ok := self fileInSourceFile:packageFile lazy:loadLazy silent:beSilent)
+                                            ifFalse:[
+                                                alternativeClassFileName notNil ifTrue:[
+                                                    packageFile := self getPackageFileName:(packageDir / alternativeClassFileName).
+                                                    packageFile isNil ifTrue:[
+                                                        packageFile := packageDir / alternativeClassFileName.
+                                                    ].
+                                                    filenameToSet := packageFile.
+                                                    ok := self fileInSourceFile:packageFile lazy:loadLazy silent:beSilent
+                                                ].
+                                                ok ifFalse:[
+                                                    "
+                                                     ... and in the standard source-directory
+                                                    "
+                                                    filenameToSet := 'source' asFilename / packageDir / classFileName.
+                                                    (ok := self fileInSourceFile:filenameToSet lazy:loadLazy silent:beSilent)
+                                                    ifFalse:[
+                                                        alternativeClassFileName notNil ifTrue:[
+                                                            filenameToSet := 'source' asFilename / packageDir / alternativeClassFileName.
+                                                            ok := self fileInSourceFile:filenameToSet lazy:loadLazy silent:beSilent
+                                                        ]
+                                                    ]
+                                                ]
+                                            ].
+                                        ].
+                                    ].
+                                ]
+                            ].
+                            "
+                             if that did not work, and the classes package is known,
+                             look for a zipArchive containing a class entry.
+                            "
+                            ok ifFalse:[
+                                packageDir notNil ifTrue:[
+                                    zarFn := self getPackageFileName:(packageDir / 'source.zip').
+                                    zarFn isNil ifTrue:[
+                                        zarFn := packageDir withSuffix:'zip'.
+                                        zarFn := self getSourceFileName:zarFn.
+                                    ].
+                                    (zarFn notNil and:[zarFn asFilename exists]) ifTrue:[
+                                        zar := ZipArchive oldFileNamed:zarFn.
+                                        zar notNil ifTrue:[
+                                            entry := zar extract:(classFileName , '.st').
+                                            (entry isNil and:[alternativeClassFileName notNil]) ifTrue:[
+                                                entry := zar extract:(alternativeClassFileName , '.st').
+                                            ].
+                                            entry notNil ifTrue:[
+                                                filenameToSet := zarFn.
+                                                ok := self
+                                                        fileInStream:(entry asString readStream)
+                                                        lazy:loadLazy
+                                                        silent:beSilent
+                                                        logged:false
+                                                        addPath:nil
+                                            ].
+                                        ]
+                                    ]
+                                ]
+                            ].
+
+                            "
+                             if that did not work,
+                             look for a zipArchive containing a class entry.
+                            "
+                            ok ifFalse:[
+                                zarFn := self getSourceFileName:'source.zip'.
+                                zarFn notNil ifTrue:[
+                                    zar := ZipArchive oldFileNamed:zarFn.
+                                    zar notNil ifTrue:[
+                                        entry := zar extract:(zarFn := classFileName , '.st').
+                                        (entry isNil and:[alternativeClassFileName notNil]) ifTrue:[
+                                            entry := zar extract:(zarFn := alternativeClassFileName , '.st').
+                                        ].
+                                        entry notNil ifTrue:[
+                                            filenameToSet := zarFn.
+                                            ok := self
+                                                    fileInStream:(entry asString readStream)
+                                                    lazy:loadLazy
+                                                    silent:beSilent
+                                                    logged:false
+                                                    addPath:nil
+                                        ].
+                                    ]
+                                ]
+                            ].
+                            ok ifFalse:[
+                                "
+                                 if there is a sourceCodeManager, ask it for the classes sourceCode
+                                "
+                                (mgr := Smalltalk at:#SourceCodeManager) notNil ifTrue:[
+                                    inStream := mgr getMostRecentSourceStreamForClassNamed:aClassName inPackage:package.
+                                    inStream notNil ifTrue:[
+                                        filenameToSet := nil.
+                                        ok := self fileInStream:inStream lazy:loadLazy silent:beSilent logged:false addPath:nil.
+                                    ]
+                                ].
+                            ].
+                        ].
+                    ]
+                ].
+            ] ensure:[
+                Compiler compileLazy:wasLazy.
+                wasSilent notNil ifTrue:[
+                    self silentLoading:wasSilent
+                ]
+            ].
+        ].
+
+        ok ifTrue:[
+            newClass := self at:(aClassName asSymbol).
+            newClass notNil ifTrue:[
+                "set the classes name - but do not change if already set"
+                filenameToSet notNil ifTrue:[
+                    newClass getClassFilename isNil ifTrue:[
+                        newClass setClassFilename:(filenameToSet asFilename baseName)
+                    ].
+                ].
+
+                doInit ifTrue:[
+                    newClass initialize
+                ]
+            ]
+        ].
+    ] ensure:[
+        Smalltalk changed:#postLoad
     ].
 
     ^ newClass
@@ -8199,11 +8205,11 @@
 !Smalltalk class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.1116 2015-03-02 16:06:25 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.1117 2015-03-03 10:48:10 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.1116 2015-03-02 16:06:25 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.1117 2015-03-03 10:48:10 cg Exp $'
 !
 
 version_SVN