Autoload.st
branchjv
changeset 17732 a1892eeca6c0
parent 17711 39faaaf888b4
child 17734 406b1590afe8
--- a/Autoload.st	Fri Aug 28 12:38:51 2009 +0100
+++ b/Autoload.st	Sat Oct 24 16:48:19 2009 +0100
@@ -9,6 +9,8 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
+'From Smalltalk/X, Version:5.4.6 on 14-10-2009 at 10:26:50'                     !
+
 "{ Package: 'stx:libbasic' }"
 
 nil subclass:#Autoload
@@ -86,27 +88,32 @@
 !Autoload class methodsFor:'initialization'!
 
 initialize
-    "initialize the failure-signal"
+    "initialize either the Autoload class
+     or load a autoloaded class and initialize it."
 
+    self ~~ Autoload ifTrue:[
+        "subclass: catch initialize - load the class and resend #initialize to the real one"
+        ^ self doesNotUnderstand:(Message selector:#initialize)
+    ].
+
+    "initialize myself"
     AutoloadFailedSignal isNil ifTrue:[
         LazyLoading := false.
 
-        AutoloadFailedSignal := Error newSignalMayProceed:true.
-        AutoloadFailedSignal nameClass:self message:#autoloadFailedSignal.
-        AutoloadFailedSignal notifierString:'autoload failed'.
+        AutoloadFailedSignal := ProceedableError newSignal
+                                    nameClass:self message:#autoloadFailedSignal;
+                                    notifierString:'autoload failed'.
 
         self class changeClassTo:AutoloadMetaclass.
-        self setSuperclass:nil.
         ObjectMemory flushCaches.
     ].
     LoadedClasses isNil ifTrue:[
         LoadedClasses := IdentitySet new.
+    ].
+    InProgressClasses isNil ifTrue:[
         InProgressClasses := IdentitySet new.
     ].
 
-    self ~~ Autoload ifTrue:[
-        ^ self doesNotUnderstand:(Message selector:#initialize)
-    ].
 
     "Modified: / 20.5.1997 / 19:06:25 / cg"
     "Modified: / 3.8.1999 / 14:23:30 / stefan"
@@ -282,6 +289,11 @@
     |myName myNameSpace newClass project prevMode packageID
      packageDefinitionClass|
 
+    self == Autoload ifTrue:[
+        "already loaded"
+        ^ self.
+    ].
+
     myName := self name asSymbol.
     myNameSpace := self nameSpace.
 
@@ -376,7 +388,7 @@
                             "/ this will vanish as soon as source-directory
                             "/ is always guaranteed to contain an stx-subtree
                             ((packageID startsWith:'stx/') 
-                            or:[packageID startsWith:'stx:']) ifTrue:[
+                             or:[packageID startsWith:'stx:']) ifTrue:[
                                 Smalltalk 
                                     fileInClass:myName
                                     package:(packageID copyFrom:5)
@@ -559,6 +571,8 @@
 !
 
 inspectorExtraAttributes
+    "extra (pseudo instvar) entries to be shown in an inspector."
+
     ^ #()
 !
 
@@ -634,185 +648,10 @@
     "Modified: 26.5.1997 / 14:59:58 / cg"
 !
 
-subclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool category:cat
-    "create a new class as a subclass of an existing class (the receiver).
-     The subclass will have indexed variables if the receiving-class has."
-
-    ^ self loadAndResendMessage
-!
-
-subclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool category:cat classInstanceVariableNames:classInstanceVariableNames
-    "create a new class as a subclass of an existing class (the receiver).
-     The subclass will have indexed variables if the receiving-class has."
-
-    ^ self loadAndResendMessage
-!
-
-subclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool category:cat inEnvironment:aNameSpace
-    "create a new class as a subclass of an existing class (the receiver).
-     The subclass will have indexed variables if the receiving-class has."
-
-    ^ self loadAndResendMessage
-!
-
-subclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool privateIn:aClass 
-    "create a new class as a subclass of an existing class (the receiver).
-     The subclass will have indexed variables if the receiving-class has."
-
-    ^ self loadAndResendMessage
-!
-
 value
     "catch value - load the class and resend #value to the real one"
 
     ^ self doesNotUnderstand:(Message selector:#value)
-!
-
-variableByteSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool category:cat
-    "create a new class as a subclass of an existing class (the receiver) 
-     in which the subclass has indexable byte-sized nonpointer variables"
-
-    ^ self loadAndResendMessage
-!
-
-variableByteSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool privateIn:aClass 
-    "create a new class as a subclass of an existing class (the receiver) 
-     in which the subclass has indexable byte-sized nonpointer variables"
-
-    ^ self loadAndResendMessage
-!
-
-variableDoubleSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool category:cat
-    "create a new class as a subclass of an existing class (the receiver) 
-     in which the subclass has indexable double-sized nonpointer variables"
-
-    ^ self loadAndResendMessage
-!
-
-variableDoubleSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool privateIn:aClass 
-    "create a new class as a subclass of an existing class (the receiver) 
-     in which the subclass has indexable double-sized nonpointer variables"
-
-    ^ self loadAndResendMessage
-!
-
-variableFloatSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool category:cat
-    "create a new class as a subclass of an existing class (the receiver) 
-     in which the subclass has indexable float-sized nonpointer variables"
-
-    ^ self loadAndResendMessage
-!
-
-variableFloatSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool privateIn:aClass 
-    "create a new class as a subclass of an existing class (the receiver) 
-     in which the subclass has indexable float-sized nonpointer variables"
-
-    ^ self loadAndResendMessage
-!
-
-variableLongLongSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool category:cat
-    "create a new class as a subclass of an existing class (the receiver) 
-     in which the subclass has indexable unsigned long-long-sized nonpointer variables"
-
-    ^ self loadAndResendMessage
-!
-
-variableLongLongSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool privateIn:aClass 
-    "create a new class as a subclass of an existing class (the receiver) 
-     in which the subclass has indexable longlong-sized nonpointer variables"
-
-    ^ self loadAndResendMessage
-!
-
-variableLongSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool category:cat
-    "create a new class as a subclass of an existing class (the receiver) 
-     in which the subclass has indexable long-sized nonpointer variables"
-
-    ^ self loadAndResendMessage
-!
-
-variableLongSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool privateIn:aClass 
-    "create a new class as a subclass of an existing class (the receiver) 
-     in which the subclass has indexable long-sized nonpointer variables"
-
-    ^ self loadAndResendMessage
-!
-
-variableSignedLongLongSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool category:cat
-    "create a new class as a subclass of an existing class (the receiver) 
-     in which the subclass has indexable signed long-long-sized nonpointer variables"
-
-    ^ self loadAndResendMessage
-!
-
-variableSignedLongLongSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool privateIn:aClass 
-    "create a new class as a subclass of an existing class (the receiver) 
-     in which the subclass has indexable signed longlong-sized nonpointer variables"
-
-    ^ self loadAndResendMessage
-!
-
-variableSignedLongSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool category:cat
-    "create a new class as a subclass of an existing class (the receiver) 
-     in which the subclass has indexable signed long-sized nonpointer variables"
-
-    ^ self loadAndResendMessage
-!
-
-variableSignedLongSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool privateIn:aClass 
-    "create a new class as a subclass of an existing class (the receiver) 
-     in which the subclass has indexable signed long-sized nonpointer variables"
-
-    ^ self loadAndResendMessage
-!
-
-variableSignedWordSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool category:cat
-    "create a new class as a subclass of an existing class (the receiver) 
-     in which the subclass has indexable word-sized signed nonpointer variables"
-
-    ^ self loadAndResendMessage
-!
-
-variableSignedWordSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool privateIn:aClass 
-    "create a new class as a subclass of an existing class (the receiver) 
-     in which the subclass has indexable word-sized signed nonpointer variables"
-
-    ^ self loadAndResendMessage
-!
-
-variableSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool category:cat
-    "create a new class as a subclass of an existing class (the receiver) 
-     in which the subclass has indexable pointer variables"
-
-    ^ self loadAndResendMessage
-!
-
-variableSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool category:cat classInstanceVariableNames:classInstanceVariableNames
-    "create a new class as a subclass of an existing class (the receiver) 
-     in which the subclass has indexable pointer variables"
-
-    ^ self loadAndResendMessage
-!
-
-variableSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool privateIn:aClass 
-    "create a new class as a subclass of an existing class (the receiver) 
-     in which the subclass has indexable pointer variables"
-
-    ^ self loadAndResendMessage
-!
-
-variableWordSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool category:cat
-    "create a new class as a subclass of an existing class (the receiver) 
-     in which the subclass has indexable word-sized nonpointer variables"
-
-    ^ self loadAndResendMessage
-!
-
-variableWordSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool privateIn:aClass 
-    "create a new class as a subclass of an existing class (the receiver) 
-     in which the subclass has indexable word-sized nonpointer variables"
-
-    ^ self loadAndResendMessage
 ! !
 
 !Autoload class methodsFor:'private'!
@@ -829,7 +668,7 @@
 
     "take care: subclassing Autoload must still be possible"
     (self == Autoload) ifTrue:[
-        ^ self perform:sel inClass:Autoload class superclass withArguments:args
+        ^ self perform:sel inClass:self class superclass withArguments:args
     ].
 
     newClass := self autoload.
@@ -924,7 +763,12 @@
 !Autoload class methodsFor:'documentation'!
 
 version
-    ^ '$Id: Autoload.st 10447 2009-06-14 13:09:55Z vranyj1 $'
+    ^ '$Id: Autoload.st 10473 2009-10-24 15:48:19Z vranyj1 $'
+!
+
+version_CVS
+    ^ '§Header: /cvs/stx/stx/libbasic/Autoload.st,v 1.155 2009/10/14 10:50:02 stefan Exp §'
 ! !
 
 Autoload initialize!
+