Merged with /trunk jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Sun, 21 Mar 2010 19:37:43 +0000
branchjv
changeset 17756 f4d72b8d0d89
parent 17755 072bb43d2582
child 17757 73caeb68bf1f
Merged with /trunk
Autoload.st
Behavior.st
Context.st
ExternalBytes.st
Integer.st
NoHandlerError.st
ObjectMemory.st
PCFilename.st
PeekableStream.st
SmallInteger.st
Smalltalk.st
UserPreferences.st
resources/de.rs
stx_libbasic.st
--- a/Autoload.st	Sun Mar 21 17:58:43 2010 +0000
+++ b/Autoload.st	Sun Mar 21 19:37:43 2010 +0000
@@ -443,7 +443,9 @@
         " 
         AutoloadFailedSignal
             raiseRequestWith:self
-            errorString:('autoload of ' , myName , ' failed').
+            errorString:('autoload of %1 failed (%2)' 
+                            bindWith:myName 
+                            with:(newClass isNil ifTrue:['nil result'] ifFalse:['still unloaded'])).
         ^ nil
     ].
 
@@ -761,11 +763,11 @@
 !Autoload class methodsFor:'documentation'!
 
 version
-    ^ '$Id: Autoload.st 10501 2010-02-13 23:34:44Z vranyj1 $'
+    ^ '$Id: Autoload.st 10508 2010-03-21 19:37:43Z vranyj1 $'
 !
 
 version_CVS
-    ^ '§Header: /cvs/stx/stx/libbasic/Autoload.st,v 1.156 2010/02/05 13:00:22 cg Exp §'
+    ^ '§Header: /cvs/stx/stx/libbasic/Autoload.st,v 1.157 2010/03/13 11:36:57 cg Exp §'
 ! !
 
 Autoload initialize!
@@ -773,3 +775,4 @@
 
 
 
+
--- a/Behavior.st	Sun Mar 21 17:58:43 2010 +0000
+++ b/Behavior.st	Sun Mar 21 19:37:43 2010 +0000
@@ -985,7 +985,6 @@
     "Modified: 23.4.1996 / 15:55:52 / cg"
 ! !
 
-
 !Behavior methodsFor:'Compatibility-Dolphin'!
 
 allSubinstances
@@ -1132,6 +1131,7 @@
 ! !
 
 
+
 !Behavior methodsFor:'accessing'!
 
 addSelector:newSelector withMethod:newMethod
@@ -4428,6 +4428,10 @@
     "alias for instVarNames."
 
     ^ self instVarNames
+
+    "
+     Point instanceVariableNames
+    "
 !
 
 instanceVariableString
@@ -4592,13 +4596,14 @@
 !Behavior class methodsFor:'documentation'!
 
 version
-    ^ '$Id: Behavior.st 10506 2010-03-21 17:58:43Z vranyj1 $'
+    ^ '$Id: Behavior.st 10508 2010-03-21 19:37:43Z vranyj1 $'
 !
 
 version_CVS
-    ^ '§Header: /cvs/stx/stx/libbasic/Behavior.st,v 1.298 2009/10/26 16:24:22 cg Exp §'
+    ^ 'Header: /cvs/stx/stx/libbasic/Behavior.st,v 1.299 2010/03/15 20:38:23 cg Exp §'
 !
 
 version_SVN
-    ^ '$Id: Behavior.st 10506 2010-03-21 17:58:43Z vranyj1 $'
+    ^ '$Id: Behavior.st 10508 2010-03-21 19:37:43Z vranyj1 $'
 ! !
+
--- a/Context.st	Sun Mar 21 17:58:43 2010 +0000
+++ b/Context.st	Sun Mar 21 19:37:43 2010 +0000
@@ -1512,7 +1512,7 @@
 !
 
 fullPrintAllOn:aStream
-    "print a full walkback starting at the receiver"
+    "print a full walkback (incl arguments) starting at the receiver"
 
     |context|
 
@@ -1531,7 +1531,7 @@
 !
 
 fullPrintOn:aStream
-    "print the receiver, selector and args of the context"
+    "append a verbose description (incl. arguments) of the receiver onto aStream"
 
     self receiverPrintString printOn:aStream. 
     aStream nextPutAll:' >> '. 
@@ -1595,8 +1595,27 @@
     "Modified: 1.11.1996 / 16:21:49 / cg"
 !
 
+printAllOn:aStream
+    "print a brief walkback (excl. arguments) starting at the receiver"
+
+    |context|
+
+    context := self.
+    [context notNil] whileTrue: [
+        context printOn:aStream.
+        aStream cr.
+        context := context sender
+    ]
+
+    "
+     thisContext printAllOn:Transcript
+    "
+
+    "Created: 15.1.1997 / 18:09:05 / cg"
+!
+
 printOn:aStream
-    "append a printed description of the receiver onto aStream"
+    "append a brief description (excl. arguments) of the receiver onto aStream"
 
     aStream nextPutAll:(self receiverPrintString).
     "/ aStream nextPutAll:' '.
@@ -2356,15 +2375,16 @@
 !Context class methodsFor:'documentation'!
 
 version
-    ^ '$Id: Context.st 10487 2009-12-27 19:02:18Z vranyj1 $'
+    ^ '$Id: Context.st 10508 2010-03-21 19:37:43Z vranyj1 $'
 !
 
 version_CVS
-    ^ '§Header: /cvs/stx/stx/libbasic/Context.st,v 1.153 2009/12/01 20:04:26 cg Exp §'
+    ^ 'Header: /cvs/stx/stx/libbasic/Context.st,v 1.154 2010/03/13 10:22:39 cg Exp §'
 !
 
 version_SVN
-    ^ '$Id: Context.st 10487 2009-12-27 19:02:18Z vranyj1 $'
+    ^ '$Id: Context.st 10508 2010-03-21 19:37:43Z vranyj1 $'
 ! !
 
 Context initialize!
+
--- a/ExternalBytes.st	Sun Mar 21 17:58:43 2010 +0000
+++ b/ExternalBytes.st	Sun Mar 21 19:37:43 2010 +0000
@@ -56,11 +56,7 @@
 	    }
 	}
 	if (! found) {
-#ifdef __NEED_L_MODIFIER_IN_PRINTF__
-	    printf("EXTBYTES [warning]: **** free: alien %lx (allocated somewhere else ?))\n", ptr);
-#else
-	    printf("EXTBYTES [warning]: **** free: alien %x (allocated somewhere else ?))\n", ptr);
-#endif
+	    printf("EXTBYTES [warning]: **** free: alien %lx (allocated somewhere else ?))\n", (long)ptr);
 	}
     }
 }
@@ -79,11 +75,7 @@
 	found = 0;
 	for (this=mallocList; this; this=this->next) {
 	    if (this->chunk == ptr) {
-#ifdef __NEED_L_MODIFIER_IN_PRINTF__
-		printf("EXTBYTES [warning]: **** %016lx already allocated (freed somewhere else ?)\n", ptr);
-#else
-		printf("EXTBYTES [warning]: **** %08x already allocated (freed somewhere else ?)\n", ptr);
-#endif
+		printf("EXTBYTES [warning]: **** %016lx already allocated (freed somewhere else ?)\n", (long)ptr);
 		found++;
 	    }
 	}
@@ -106,11 +98,7 @@
 	ptr = malloc(nBytes);
 
 	if (@global(TraceMalloc) == true) {
-#ifdef __NEED_L_MODIFIER_IN_PRINTF__
-	    printf("EXTBYTES [info]: allocated %d bytes at: %016lx\n", nBytes, ptr);
-#else
-	    printf("EXTBYTES [info]: allocated %d bytes at: %08x\n", nBytes, ptr);
-#endif
+	    printf("EXTBYTES [info]: allocated %d bytes at: %016lx\n", nBytes, (long)ptr);
 	}
 
 	addToMallocList(ptr, nBytes);
@@ -141,11 +129,7 @@
 	addToMallocList(newPtr, nBytes);
 
 	if (@global(TraceMalloc) == true) {
-#ifdef __NEED_L_MODIFIER_IN_PRINTF__
-	    printf("EXTBYTES [info]: realloc %d bytes for %016lx at: %016lx\n", nBytes, ptr, newPtr);
-#else
-	    printf("EXTBYTES [info]: realloc %d bytes for %08x at: %08x\n", nBytes, ptr, newPtr);
-#endif
+	    printf("EXTBYTES [info]: realloc %d bytes for %016lx at: %016lx\n", nBytes, (long)ptr, (long)newPtr);
 	}
 	return newPtr;
 }
@@ -499,11 +483,7 @@
     struct mallocList *entry;
 
     for (entry = mallocList; entry; entry=entry->next) {
-#ifdef __NEED_L_MODIFIER_IN_PRINTF__
-	printf("  %016lx (%d)\n", entry->chunk, entry->size);
-#else
-	printf("  %08x (%d)\n", entry->chunk, entry->size);
-#endif
+        printf("  %lx (%d)\n", (long)entry->chunk, entry->size);
     }
 %}
     "
@@ -528,14 +508,10 @@
     struct mallocList *entry;
 
     while ((entry = mallocList) != (struct mallocList *)0) {
-	if (@global(TraceMalloc) == true ) {
-#ifdef __NEED_L_MODIFIER_IN_PRINTF__
-	    printf("EXTBYTES [info]: **** forced free of %016lx (%d)\n", entry->chunk, entry->size);
-#else
-	    printf("EXTBYTES [info]: **** forced free of %08x (%d)\n", entry->chunk, entry->size);
-#endif
-	}
-	__stx_free(entry->chunk);
+        if (@global(TraceMalloc) == true ) {
+            printf("EXTBYTES [info]: **** forced free of %lx (%d)\n", (long)entry->chunk, entry->size);
+        }
+        __stx_free(entry->chunk);
     }
 %}
 !
@@ -1305,12 +1281,13 @@
 !ExternalBytes class methodsFor:'documentation'!
 
 version
-    ^ '$Id: ExternalBytes.st 10489 2009-12-27 20:16:54Z vranyj1 $'
+    ^ '$Id: ExternalBytes.st 10508 2010-03-21 19:37:43Z vranyj1 $'
 !
 
 version_CVS
-    ^ '§Header: /cvs/stx/stx/libbasic/ExternalBytes.st,v 1.75 2009/12/07 15:57:59 cg Exp §'
+    ^ '§Header: /cvs/stx/stx/libbasic/ExternalBytes.st,v 1.77 2010/03/12 14:35:17 stefan Exp §'
 ! !
 
 ExternalBytes initialize!
 
+
--- a/Integer.st	Sun Mar 21 17:58:43 2010 +0000
+++ b/Integer.st	Sun Mar 21 19:37:43 2010 +0000
@@ -1139,7 +1139,6 @@
     ^ self == Integer
 ! !
 
-
 !Integer methodsFor:'Compatibility-Dolphin'!
 
 & aNumber
@@ -2208,6 +2207,20 @@
 
 !Integer methodsFor:'byte access'!
 
+byteAt:anIndex
+    "compatibility with ByteArrays etc."
+
+    ^ self digitAt:anIndex
+
+    "
+        12345678 byteAt:2
+        12345678 digitBytes at:2
+
+        -12345678 byteAt:2
+        -12345678 digitBytes at:2
+    "
+!
+
 digitByteLength
     "return the number bytes required for a 2's complement
      binary representation of this Integer.
@@ -3920,7 +3933,6 @@
     "Modified: 15.10.1997 / 18:43:49 / cg"
 ! !
 
-
 !Integer methodsFor:'special access'!
 
 exponent
@@ -4699,11 +4711,11 @@
 !Integer class methodsFor:'documentation'!
 
 version
-    ^ '$Id: Integer.st 10496 2010-02-01 10:03:06Z vranyj1 $'
+    ^ '$Id: Integer.st 10508 2010-03-21 19:37:43Z vranyj1 $'
 !
 
 version_CVS
-    ^ '§Header: /cvs/stx/stx/libbasic/Integer.st,v 1.244 2010/01/30 11:39:43 cg Exp §'
+    ^ '§Header: /cvs/stx/stx/libbasic/Integer.st,v 1.245 2010/03/12 11:33:00 stefan Exp §'
 ! !
 
 Integer initialize!
@@ -4712,3 +4724,4 @@
 
 
 
+
--- a/NoHandlerError.st	Sun Mar 21 17:58:43 2010 +0000
+++ b/NoHandlerError.st	Sun Mar 21 19:37:43 2010 +0000
@@ -152,21 +152,27 @@
      set it up, when called the first time
     "
     EmergencyHandler isNil ifTrue:[
-        EmergencyHandler := [:ex |
-            "
-             sending it to the signal allows per-signal specific
-             debuggers to be implemented in the future
-             (for example, segv in primitive code could show things 
-              on the C-level ..)
-            "
-            ex signal openDebuggerOnException:ex.
+        EmergencyHandler := 
+            [:ex |
+                "
+                 sending it to the signal allows per-signal specific
+                 debuggers to be implemented in the future
+                 (for example, segv in primitive code could show things 
+                  on the C-level ..)
+                "
+                ex signal openDebuggerOnException:ex.
 
-            "if we arrive here, the debugger did proceed.
-             the value returned by #openDebuggerOnException: is the exceptions value ..."
-        ]
+                "if we arrive here, the debugger did proceed.
+                 the value returned by #openDebuggerOnException: is the exceptions value ..."
+            ]
     ].
 
     ^ EmergencyHandler
+
+    "
+     NoHandlerError emergencyHandler:[:ex | Transcript showCR:ex description.
+                                            ex signal openDebuggerOnException:ex].
+    "
 !
 
 emergencyHandler:aOneArgBlock
@@ -554,7 +560,12 @@
 !NoHandlerError class methodsFor:'documentation'!
 
 version
-    ^ '$Id: NoHandlerError.st 10447 2009-06-14 13:09:55Z vranyj1 $'
+    ^ '$Id: NoHandlerError.st 10508 2010-03-21 19:37:43Z vranyj1 $'
+!
+
+version_CVS
+    ^ '§Header: /cvs/stx/stx/libbasic/NoHandlerError.st,v 1.19 2010/03/13 10:31:25 cg Exp §'
 ! !
 
 NoHandlerError initialize!
+
--- a/ObjectMemory.st	Sun Mar 21 17:58:43 2010 +0000
+++ b/ObjectMemory.st	Sun Mar 21 19:37:43 2010 +0000
@@ -28,7 +28,7 @@
 		InterruptLatencyGoal VMSelectors DynamicCodeGCTrigger
 		DynamicCodeLimit JustInTimeCompilationEnabled
 		JavaJustInTimeCompilationEnabled JavaNativeCodeOptimization
-		BackgroundCollectMaximumInterval'
+		BackgroundCollectMaximumInterval SavedGarbageCollectorSettings'
 	poolDictionaries:''
 	category:'System-Support'
 !
@@ -2628,7 +2628,9 @@
 
 %{  /* NOCONTEXT */
     __avoidTenure(flag == true ? 1 : 0);
-%}
+%}.
+
+    self saveGarbageCollectorSetting:#avoidTenure: value:flag.
 !
 
 checkForFastNew:amount
@@ -2745,22 +2747,27 @@
      This method returns the previous value of the flag; typically this return
      value should be used to switch back."
 
-%{   /* NOCONTEXT */
+    |result|
+
+%{  
      extern int __fastMoreOldSpaceAllocation();
 
-     RETURN (__fastMoreOldSpaceAllocation(aBoolean == true ? 1 : 0) ? true : false);
+     result = __fastMoreOldSpaceAllocation(aBoolean == true ? 1 : 0) ? true : false;
 %}.
-     ^ false
+    self saveGarbageCollectorSetting:#fastMoreOldSpaceAllocation: value:aBoolean.
+
+     ^ result
+
     "
      |previousSetting|
 
      previousSetting := ObjectMemory fastMoreOldSpaceAllocation:true.
      [
-	...
-	allocate your huge data
-	...
+        ...
+        allocate your huge data
+        ...
      ] ensure:[
-	ObjectMemory fastMoreOldSpaceAllocation:previousSetting
+        ObjectMemory fastMoreOldSpaceAllocation:previousSetting
      ]
     "
 
@@ -2784,14 +2791,20 @@
      increase the oldSpace forwever - actually, until the OS refuses to give us
      more memory). The returned value is the previous setting of the limit."
 
-%{   /* NOCONTEXT */
+    |result|
+
+%{  
      extern unsigned int __fastMoreOldSpaceLimit();
 
      if (__isInteger(aNumber)) {
-	 RETURN ( __MKUINT( __fastMoreOldSpaceLimit(__unsignedLongIntVal(aNumber))));
+         result = __MKUINT( __fastMoreOldSpaceLimit(__unsignedLongIntVal(aNumber)));
      }
 %}.
-     ^ 0
+    result isNil ifTrue:[
+        ^ 0.
+    ].
+    self saveGarbageCollectorSetting:#fastMoreOldSpaceLimit: value:aNumber.
+    ^ result.
 
     "
      |prev this|
@@ -2911,12 +2924,15 @@
      This entry is provided as a test interface and should not be
      used by applications - it may vanish without notice"
 
+    |result|
+
 %{
-     int rslt;
-
-     rslt = __incrementalSweep((aBoolean == true) ? 1 : 0);
-     RETURN (rslt ? true : false);
-%}
+     result = __incrementalSweep((aBoolean == true) ? 1 : 0) ? true : false;
+%}.
+    self saveGarbageCollectorSetting:#incrementalSweep: value:aBoolean.
+
+    ^ result.
+
     "
      ObjectMemory incrementalSweep:false.
      ObjectMemory incrementalSweep:true
@@ -2946,10 +2962,12 @@
 
 %{
     if (flag == true) {
-	__tenure(__context);
+        __tenure(__context);
     }
     __lockTenure(flag == true ? 1 : 0);
-%}
+%}.
+
+    self saveGarbageCollectorSetting:#lockTenure: value:flag.
 !
 
 makeOld:anObject
@@ -2987,24 +3005,29 @@
      If zero, it will allocate forever (until the OS wont hand out more).
      The default is zero.
      WARNING:
-	an oldSpace limit may lead to trashing due to exorbitant GC activity;
-	its usually better to let it allocate more and page in/page out.
-	Usually, the background GC will catch up sooner or later and reclaim
-	the memory without blocking the system"
-
-%{  /* NOCONTEXT */
+        an oldSpace limit may lead to trashing due to exorbitant GC activity;
+        its usually better to let it allocate more and page in/page out.
+        Usually, the background GC will catch up sooner or later and reclaim
+        the memory without blocking the system"
+        
+    |result|
+%{  
     extern unsigned __maxOldSpace();
 
     if (__isInteger(amount)) {
-	RETURN (__MKUINT( __maxOldSpace(__unsignedLongIntVal(amount)) ));
+        result = __MKUINT( __maxOldSpace(__unsignedLongIntVal(amount)));
     }
 %}.
+    result notNil ifTrue:[
+        self saveGarbageCollectorSetting:#maxOldSpace: value:amount.
+        ^ result.
+    ].
     ^ 0
 
     "
      to change maximum to 1GByte:
 
-	ObjectMemory maxOldSpace:1024*1024*1024
+        ObjectMemory maxOldSpace:1024*1024*1024
     "
 !
 
@@ -3068,18 +3091,26 @@
      Experimental: this interface may valish without notice.
 
      DANGER ALERT:
-	be careful too big of a size may lead to longer scavenge pauses.
-	Too small of a newSpace may lead to more CPU overhead, due to
-	excessive scavenges. You have been warned."
+        be careful too big of a size may lead to longer scavenge pauses.
+        Too small of a newSpace may lead to more CPU overhead, due to
+        excessive scavenges. You have been warned."
+
+   |result|
 
 %{
     extern int __setNewSpaceSize();
 
     if (__isSmallInteger(newSize)) {
-	RETURN (__setNewSpaceSize(__intVal(newSize)) ? true : false);
+        result = __setNewSpaceSize(__intVal(newSize)) ? true : false;
     }
 %}.
-    self primitiveFailed
+    result isNil ifTrue:[
+        self primitiveFailed.
+    ].
+    result ifTrue:[
+        self saveGarbageCollectorSetting:#newSpaceSize: value:newSize.
+    ].
+    ^ result.
 
     " less absolute CPU overhead (but longer pauses):
 
@@ -3125,14 +3156,21 @@
      you may want to increase this limit.
      This method returns the previous increment value."
 
-%{  /* NOCONTEXT */
+    |result|
+
+%{  
     extern unsigned __compressingGCLimit();
 
     if (__isInteger(amount)) {
-	RETURN (__MKUINT( __compressingGCLimit(__unsignedLongIntVal(amount)) ));
+        result = __MKUINT( __compressingGCLimit(__unsignedLongIntVal(amount)) );
     }
 %}.
-    ^ 0
+    result isNil ifTrue:[
+        ^ 0.
+    ].
+    self saveGarbageCollectorSetting:#oldSpaceCompressLimit: value:amount.
+    ^ result.
+
     "to change the limit to 12Mb:"
     "
      ObjectMemory oldSpaceCompressLimit:12*1024*1024
@@ -3162,15 +3200,22 @@
      In normal situations, the default value used in the VM is fine
      and there is no need to change it. This method returns the
      previous increment value."
-
-%{  /* NOCONTEXT */
+        
+    |result|
+
+%{  
     extern unsigned __oldSpaceIncrement();
 
     if (__isInteger(amount)) {
-	RETURN (__MKUINT( __oldSpaceIncrement(__unsignedLongIntVal(amount)) ));
+        result = __MKUINT( __oldSpaceIncrement(__unsignedLongIntVal(amount)) );
     }
 %}.
-    ^ 0
+    result isNil ifTrue:[
+        ^ 0.
+    ].
+    self saveGarbageCollectorSetting:#oldSpaceIncrement: value:amount.
+    ^ result.
+
     "to change increment to 1Meg:"
     "
      ObjectMemory oldSpaceIncrement:1024*1024
@@ -3187,6 +3232,7 @@
 %{  /* NOCONTEXT */
     __tenureParams(magic);
 %}.
+    self saveGarbageCollectorSetting:#tenureParameters: value:magic.
 !
 
 turnGarbageCollectorOff
@@ -3232,6 +3278,33 @@
 %}
 ! !
 
+!ObjectMemory class methodsFor:'garbage collector settings'!
+
+restoreGarbageCollectorSettings
+   "restore the saved garbage collector settings"
+
+   SavedGarbageCollectorSettings isEmptyOrNil ifTrue:[
+        ^ self.
+   ].
+   SavedGarbageCollectorSettings keysAndValuesDo:[:eachKey :eachValue|
+        eachKey numArgs == 1 ifTrue:[
+            self perform:eachKey with:eachValue.
+        ] ifFalse:[
+            self perform:eachKey.
+        ].
+   ].
+!
+
+saveGarbageCollectorSetting:aSymbol value:something
+   "save some garbage collector setting, which is stored only in the VM,
+    to be restored on snapshot return"
+
+   SavedGarbageCollectorSettings isNil ifTrue:[
+        SavedGarbageCollectorSettings := IdentityDictionary new.
+   ].
+   SavedGarbageCollectorSettings at:aSymbol put:something.
+! !
+
 !ObjectMemory class methodsFor:'interrupt handler access'!
 
 childSignalInterruptHandler
@@ -5259,11 +5332,11 @@
 !ObjectMemory class methodsFor:'documentation'!
 
 version
-    ^ '$Id: ObjectMemory.st 10496 2010-02-01 10:03:06Z vranyj1 $'
+    ^ '$Id: ObjectMemory.st 10508 2010-03-21 19:37:43Z vranyj1 $'
 !
 
 version_CVS
-    ^ '§Header: /cvs/stx/stx/libbasic/ObjectMemory.st,v 1.245 2010/01/20 19:44:24 cg Exp §'
+    ^ '§Header: /cvs/stx/stx/libbasic/ObjectMemory.st,v 1.246 2010/03/12 09:08:02 stefan Exp §'
 ! !
 
 ObjectMemory initialize!
@@ -5271,3 +5344,4 @@
 
 
 
+
--- a/PCFilename.st	Sun Mar 21 17:58:43 2010 +0000
+++ b/PCFilename.st	Sun Mar 21 19:37:43 2010 +0000
@@ -484,7 +484,7 @@
     "return true, if is is a drive"
     |pathName|
 
-    self isRootDirectory not ifTrue:[^ false].
+    self isRootDirectory ifFalse:[^ false].
 
     pathName := self asString asLowercase.
 
@@ -507,7 +507,7 @@
     "return true, if is is a drive"
     |pathName|
 
-    self isRootDirectory not ifTrue:[^ false].
+    self isRootDirectory ifFalse:[^ false].
 
     pathName := self asString asLowercase.
 
@@ -879,11 +879,12 @@
 !PCFilename class methodsFor:'documentation'!
 
 version
-    ^ '$Id: PCFilename.st 10480 2009-12-02 21:30:55Z vranyj1 $'
+    ^ '$Id: PCFilename.st 10508 2010-03-21 19:37:43Z vranyj1 $'
 !
 
 version_CVS
-    ^ '§Header: /cvs/stx/stx/libbasic/PCFilename.st,v 1.49 2009/10/28 14:02:04 cg Exp §'
+    ^ '§Header: /cvs/stx/stx/libbasic/PCFilename.st,v 1.50 2010/03/09 12:09:53 cg Exp §'
 ! !
 
 
+
--- a/PeekableStream.st	Sun Mar 21 17:58:43 2010 +0000
+++ b/PeekableStream.st	Sun Mar 21 19:37:43 2010 +0000
@@ -225,13 +225,18 @@
     "file in from the receiver, i.e. read chunks and evaluate them -
      return the value of the last chunk."
 
-    |notifiedLoader|
+    |notifiedLoader lastValue|
 
     SourceFileLoader notNil ifTrue:[
         notifiedLoader := SourceFileLoader on:self.
     ].
 
-    ^ self fileInNotifying:notifiedLoader passChunk:true.
+    Class nameSpaceQuerySignal handle:[:ex |
+        ex proceedWith:Smalltalk
+    ] do:[
+        lastValue := self fileInNotifying:notifiedLoader passChunk:true.
+    ].
+    ^ lastValue.
 !
 
 fileInBinary
@@ -1021,7 +1026,12 @@
 !PeekableStream class methodsFor:'documentation'!
 
 version
-    ^ '$Id: PeekableStream.st 10447 2009-06-14 13:09:55Z vranyj1 $'
+    ^ '$Id: PeekableStream.st 10508 2010-03-21 19:37:43Z vranyj1 $'
+!
+
+version_CVS
+    ^ '§Header: /cvs/stx/stx/libbasic/PeekableStream.st,v 1.39 2010/03/12 12:39:13 cg Exp §'
 ! !
 
 PeekableStream initialize!
+
--- a/SmallInteger.st	Sun Mar 21 17:58:43 2010 +0000
+++ b/SmallInteger.st	Sun Mar 21 19:37:43 2010 +0000
@@ -3408,7 +3408,7 @@
 
     myValue = __intVal(self);
     if (myValue == 0) {
-	RETURN (__MKSTRING_L("0", 1));
+        RETURN (__MKSTRING_L("0", 1));
     }
 #ifdef SLOW_CODE
     /*
@@ -3422,38 +3422,32 @@
      * manually save it here - very stupid ...
      */
     __BEGIN_PROTECT_REGISTERS__
-
-# ifdef __NEED_L_MODIFIER_IN_PRINTF__
-    len = snprintf(buffer, sizeof(buffer), "%ld", myValue);
-# else
-    len = snprintf(buffer, sizeof(buffer), "%d", myValue);
-# endif
-
+    len = snprintf(buffer, sizeof(buffer), "%ld", (long)myValue);
     __END_PROTECT_REGISTERS__
 
     if (len >= 0 && len <= sizeof(buffer)) {
-	newString = __MKSTRING_L(buffer, len);
+        newString = __MKSTRING_L(buffer, len);
     }
 
 #else
     if (myValue < 0) {
-	negative = 1;
-	myValue = -myValue;
+        negative = 1;
+        myValue = -myValue;
     }
     cp = buffer + sizeof(buffer) - 1;
     *cp-- = '\0';
     while (myValue != 0) {
-	*cp = '0' + (myValue % 10);
-	myValue = myValue / 10;
-	cp--;
+        *cp = '0' + (myValue % 10);
+        myValue = myValue / 10;
+        cp--;
     }
     if (negative) {
-	*cp-- = '-';
+        *cp-- = '-';
     }
     newString = __MKSTRING_L(cp+1, (buffer + sizeof(buffer) - 2 - cp));
 #endif
     if (newString != nil) {
-	RETURN (newString);
+        RETURN (newString);
     }
 %}.
     "/ only arrive here,
@@ -3481,84 +3475,72 @@
     INT __base;
 
     if (__isSmallInteger(base)) {
-	myValue = __intVal(self);
-	if (myValue == 0) {
-	    RETURN (__MKSTRING_L("0", 1));
-	}
-	__base = __intVal(base);
+        myValue = __intVal(self);
+        if (myValue == 0) {
+            RETURN (__MKSTRING_L("0", 1));
+        }
+        __base = __intVal(base);
 
 #ifdef SLOW_CODE
-	switch (__base) {
-	    case 10:
-#ifdef __NEED_L_MODIFIER_IN_PRINTF__
-		format = "%ld";
-#else
-		format = "%d";
-#endif
-		break;
-	    case 16:
-#ifdef __NEED_L_MODIFIER_IN_PRINTF__
-		format = "%lx";
-#else
-		format = "%x";
-#endif
-		break;
-	    case 8:
-#ifdef __NEED_L_MODIFIER_IN_PRINTF__
-		format = "%lo";
+        switch (__base) {
+            case 10:
+                format = "%ld";
+                break;
+            case 16:
+                format = "%lx";
+                break;
+            case 8:
+                format = "%lo";
+                break;
+        }
+
+        if (format) {
+            /*
+             * actually only needed on sparc: since thisContext is
+             * in a global register, which gets destroyed by printf,
+             * manually save it here - very stupid ...
+             */
+            __BEGIN_PROTECT_REGISTERS__
+
+            len = snprintf(buffer, sizeof(buffer), format, (long)myValue);
+
+            __END_PROTECT_REGISTERS__
+
+            if (len > 0 && len <= sizeof(buffer)) {
+                newString = __MKSTRING_L(buffer, len);
+                if (newString != nil) {
+                    RETURN (newString);
+                }
+            }
+        }
 #else
-		format = "%o";
-#endif
-		break;
-	}
-
-	if (format) {
-	    /*
-	     * actually only needed on sparc: since thisContext is
-	     * in a global register, which gets destroyed by printf,
-	     * manually save it here - very stupid ...
-	     */
-	    __BEGIN_PROTECT_REGISTERS__
-
-	    len = snprintf(buffer, sizeof(buffer), format, myValue);
-
-	    __END_PROTECT_REGISTERS__
-
-	    if (len > 0 && len <= sizeof(buffer)) {
-		newString = __MKSTRING_L(buffer, len);
-		if (newString != nil) {
-		    RETURN (newString);
-		}
-	    }
-	}
-#else
-	if ((__base <= 36) && (__base > 1)) {
-	    if (myValue < 0) {
-		negative = 1;
-		myValue = -myValue;
-	    }
-	    cp = buffer + sizeof(buffer) - 1;
-	    *cp-- = '\0';
-	    while (myValue != 0) {
-		int digit;
-
-		digit = myValue % __base;
-		if (digit <= 9) {
-		    *cp = '0' + digit;
-		} else {
-		    *cp = 'A' + digit - 10;
-		}
-		myValue = myValue / __base;
-		cp--;
-	    }
-	    if (negative) {
-		*cp-- = '-';
-	    }
-	    newString = __MKSTRING_L(cp+1, (buffer + sizeof(buffer) - 2 - cp));
-	    if (newString != nil) {
-		RETURN (newString);
-	    }
-	}
+        if ((__base <= 36) && (__base > 1)) {
+            if (myValue < 0) {
+                negative = 1;
+                myValue = -myValue;
+            }
+            cp = buffer + sizeof(buffer) - 1;
+            *cp-- = '\0';
+            while (myValue != 0) {
+                int digit;
+
+                digit = myValue % __base;
+                if (digit <= 9) {
+                    *cp = '0' + digit;
+                } else {
+                    *cp = 'A' + digit - 10;
+                }
+                myValue = myValue / __base;
+                cp--;
+            }
+            if (negative) {
+                *cp-- = '-';
+            }
+            newString = __MKSTRING_L(cp+1, (buffer + sizeof(buffer) - 2 - cp));
+            if (newString != nil) {
+                RETURN (newString);
+            }
+        }
 #endif
     }
 %}.
@@ -3790,12 +3772,13 @@
 !SmallInteger class methodsFor:'documentation'!
 
 version
-    ^ '$Id: SmallInteger.st 10505 2010-03-08 21:39:02Z vranyj1 $'
+    ^ '$Id: SmallInteger.st 10508 2010-03-21 19:37:43Z vranyj1 $'
 !
 
 version_CVS
-    ^ '§Header: /cvs/stx/stx/libbasic/SmallInteger.st,v 1.182 2010/03/06 13:45:56 stefan Exp §'
+    ^ '§Header: /cvs/stx/stx/libbasic/SmallInteger.st,v 1.183 2010/03/12 14:12:29 stefan Exp §'
 ! !
 
 
 
+
--- a/Smalltalk.st	Sun Mar 21 17:58:43 2010 +0000
+++ b/Smalltalk.st	Sun Mar 21 19:37:43 2010 +0000
@@ -2237,6 +2237,49 @@
     "Created: / 02-01-2010 / 10:38:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
+loadPackage:aPackageString asAutoloaded:doLoadAsAutoloaded
+    "make certain, that some particular package is loaded into the system.
+     Return true if loaded, false otherwise."
+
+    |packageDir def sourceCodeManager|
+
+    "/ if there is a projectDefinition, let it load itself...
+    def := aPackageString asPackageId projectDefinitionClass.
+    def notNil ifTrue:[
+        ^ def loadAsAutoloaded:doLoadAsAutoloaded.
+    ].
+
+    packageDir := self packageDirectoryForPackageId:aPackageString.
+    packageDir isNil ifTrue:[
+        (aPackageString includes:$:) ifFalse:[
+            "/ assume stx
+            packageDir := self packageDirectoryForPackageId:('stx:',aPackageString).
+        ].
+    ].
+
+    (self
+        loadPackage:aPackageString
+        fromDirectory:packageDir
+        asAutoloaded:doLoadAsAutoloaded) ifTrue: [^ true].
+
+    AbstractSourceCodeManager notNil ifTrue:[
+        sourceCodeManager := AbstractSourceCodeManager sourceCodeManagerForPackage: aPackageString.
+        sourceCodeManager notNil ifTrue:[
+            ^ sourceCodeManager loadPackageWithId: aPackageString fromRepositoryAsAutoloaded: doLoadAsAutoloaded
+        ].   
+    ].
+
+    ^ false
+
+    "
+     Smalltalk loadPackageWithId:'stx:libbasic'
+     Smalltalk loadPackageWithId:'stx:goodies/persistency'
+     Smalltalk loadPackageWithId:'exept:ctypes'
+    "
+
+    "Modified: / 07-12-2006 / 15:04:39 / cg"
+!
+
 loadPackage:packageId fromAllSourceFilesInDirectory:aDirectory
     "load all source files found in aDirectory and treat them like
      a package. Allows for initial import of alien ST-code as a new package.
@@ -2324,7 +2367,198 @@
     ^ true
 !
 
+loadPackage:aPackageString fromDirectory:packageDirOrStringOrNil asAutoloaded:doLoadAsAutoloaded
+    "load a package referenced by aPackageString - a string like 'stx:libbasic'.
+     The package is either located in packageDirOrStringOrNil, or in the current directory"
+
+    |packageDir packageName shLibName 
+     binaryClassLibraryFilename projectDefinitionFilename loadAllFilename
+     projectDefinitionClass projectDefinitionClassName silent somethingHasBeenLoaded
+     loadOK loadErrorOccurred|
+
+    packageDirOrStringOrNil notNil ifTrue:[
+        packageDir := packageDirOrStringOrNil asFilename.
+    ].
+    silent := SilentLoading | StandAlone.
+
+    "For now: have to read the project definition first!!
+     The class library may contain subclasses of classes in prerequisite packages -
+     so the prerequisite packages have to be loaded first"
+
+    "normally there is a project definiton, use that one to pull in the rest"
+
+    "maybe, it is already in the image - autoloaded"
+    projectDefinitionClass := ProjectDefinition definitionClassForPackage:aPackageString.
+
+    "if not, file it in ..."
+    (projectDefinitionClass isNil and:[packageDir notNil]) ifTrue:[
+        projectDefinitionClassName := ProjectDefinition initialClassNameForDefinitionOf:aPackageString.
+        "/ try to load the project definition class
+        projectDefinitionFilename := (packageDir / projectDefinitionClassName) withSuffix:'st'.
+        projectDefinitionFilename exists ifFalse:[
+            projectDefinitionFilename := (packageDir / 'source' / projectDefinitionClassName) withSuffix:'st'.
+        ].
+        projectDefinitionFilename exists ifTrue:[
+            Class withoutUpdatingChangesDo:[
+                Smalltalk silentlyLoadingDo:[
+                    projectDefinitionFilename fileIn.
+                ].
+            ].
+            projectDefinitionClass := ProjectDefinition definitionClassForPackage:aPackageString.
+        ].
+    ].
+
+    projectDefinitionClass notNil ifTrue:[
+        projectDefinitionClass autoload.
+        somethingHasBeenLoaded := projectDefinitionClass loadAsAutoloaded:doLoadAsAutoloaded.
+        (silent not and:[somethingHasBeenLoaded]) ifTrue:[
+            Transcript showCR:('Smalltalk [info]: loaded package: ' , aPackageString , ' from project definition').
+        ].
+        ^ true.
+    ].
+
+    "/ no project-definition class.
+    
+    "Is there a shared library (.dll or .so) ?"
+    shLibName := aPackageString asPackageId libraryName asFilename 
+                        withSuffix:ObjectFileLoader sharedLibraryExtension.
+
+    binaryClassLibraryFilename := Filename currentDirectory / shLibName.
+    binaryClassLibraryFilename exists ifFalse:[
+        packageDir notNil ifTrue:[
+            binaryClassLibraryFilename := packageDir / shLibName.
+            binaryClassLibraryFilename exists ifFalse:[
+                "/ mhmh - is this a good idea ? (temporary kludge)
+                binaryClassLibraryFilename := packageDir / 'objbc' / shLibName.
+                binaryClassLibraryFilename exists ifFalse:[
+                    binaryClassLibraryFilename := packageDir / 'objvc' / shLibName.
+                ]
+            ]
+        ]
+    ].
+    binaryClassLibraryFilename exists ifTrue:[
+        ObjectFileLoader::ObjectFileLoadErrorNotification handle:[:ex |
+            loadErrorOccurred := true.
+            ex proceedWith:true.
+        ] do:[
+            loadOK := self loadPackage:aPackageString fromClassLibrary:binaryClassLibraryFilename.
+        ].
+        loadOK ifTrue:[
+            silent ifFalse:[
+                Transcript showCR:('loaded package: ' , aPackageString , ' from binary classLib file: ' , binaryClassLibraryFilename pathName).
+            ].
+            doLoadAsAutoloaded ifFalse:[
+                "/ force autoloading...
+                Smalltalk allClassesDo:[:eachClass |
+                    eachClass package == aPackageString ifTrue:[eachClass autoload].
+                ].
+            ].
+            ^ true
+        ].
+        loadErrorOccurred ifTrue:[
+self halt.
+            projectDefinitionClass := ProjectDefinition definitionClassForPackage:aPackageString.
+            projectDefinitionClass notNil ifTrue:[
+                "/ load prerequisites...
+                projectDefinitionClass loadPreRequisitesAsAutoloaded:doLoadAsAutoloaded.
+self halt.
+            ].
+        ].
+    ].
+
+    packageDir isNil ifTrue:[
+        ^ false.
+    ].
+
+    "/ loadAll ? - will be soon obsolete
+    loadAllFilename := packageDir / 'loadAll'.
+    loadAllFilename exists ifFalse:[
+        loadAllFilename := packageDir / 'loadall'.
+    ].
+    loadAllFilename exists ifTrue:[
+        (self loadPackage:aPackageString fromLoadAllFile:loadAllFilename) ifTrue:[
+            silent ifFalse:[
+                Transcript showCR:('loaded package: ' , aPackageString , ' from loadAll file: ' , loadAllFilename pathName).
+            ].
+            ^ true
+        ]
+    ].
+
+    packageName := packageDir baseName.
+
+"/ zip-file loading no longer supported
+"/  "/ .zip ?
+"/    f := (packageDir / packageName) withSuffix:'zip'.
+"/    f exists ifTrue:[
+"/        (self loadPackage:aPackageString fromZIPArchive:f asAutoloaded:doLoadAsAutoloaded) ifTrue:[
+"/            silent ifFalse:[
+"/                Transcript showCR:('loaded package: ' , aPackageString , ' from zip file: ' , f pathName).
+"/            ].
+"/            ^ true
+"/        ]
+"/    ].
+
+"/ abbrev-file loading no longer supported
+"/    "/ abbrev.stc ?
+"/    (self loadPackageFromAbbrevFile:aPackageString asAutoloaded:doLoadAsAutoloaded) ifTrue:[
+"/        ^ true
+"/    ].
+
+"/ any .so-file loading no longer supported
+"/    "/ any .so ?  -> load the first one found (maybe not a good idea)
+"/    packageDir directoryContentsAsFilenamesDo:[:aFilename |
+"/        (aFilename hasSuffix:ObjectFileLoader sharedLibrarySuffix) ifTrue:[
+"/            (self loadPackage:aPackageString fromClassLibrary:aFilename) ifTrue:[
+"/                silent ifFalse:[
+"/                    Transcript showCR:('loaded package: ' , aPackageString , ' from binary classLib file: ' , aFilename pathName).
+"/                ].
+"/                doLoadAsAutoloaded ifFalse:[
+"/                    "/ force autoloading...
+"/                    Smalltalk allClassesDo:[:eachClass |
+"/                        eachClass package == aPackageString ifTrue:[ eachClass autoload].
+"/                    ].
+"/                ].
+"/                ^ true
+"/            ]
+"/        ]
+"/    ].
+
+"/    "/ source files-file loading no longer supported
+"/    "/ however, allow for autoload-stub loaded
+"/    doLoadAsAutoloaded ifTrue:[
+"/        self
+"/            recursiveInstallAutoloadedClassesFrom:packageDir
+"/            rememberIn:(Set new)
+"/            maxLevels:2
+"/            noAutoload:false
+"/            packageTop:packageDir
+"/            showSplashInLevels:0.
+"/    ].
+
+"/    doLoadAsAutoloaded ifFalse:[
+"/        "/ source files
+"/        (self loadPackage:aPackageString fromAllSourceFilesInDirectory:packageDir) ifTrue:[
+"/            silent ifFalse:[
+"/                Transcript showCR:('loaded package: ' , aPackageString , ' from source files in:' , packageDir pathName).
+"/            ].
+"/            ^ true
+"/        ].
+"/    ].
+"/    ^ true
+
+    ^ false
+
+    "
+     Smalltalk loadPackageWithId:'stx:libbasic'
+     Smalltalk loadPackageWithId:'stx:goodies/persistency'
+     Smalltalk loadPackageWithId:'exept:ctypes'
+    "
+
+    "Modified: / 07-12-2006 / 15:08:24 / cg"
+!
+
 loadPackage:packageId fromLoadAllFile:aFilename
+    <resource: #obsolete>
     "load a package from a loadAll - loader script.
      Experimental."
 
@@ -2362,6 +2596,7 @@
 !
 
 loadPackageFromAbbrevFile:aPackageId asAutoloaded:doLoadAsAutoloaded
+    <resource: #obsolete>
     |abbrevFile packageDir|
 
     packageDir := self packageDirectoryForPackageId:aPackageId.
@@ -2385,254 +2620,6 @@
     ^ true
 
     "Modified: / 10-08-2006 / 12:17:57 / cg"
-!
-
-loadPackageWithId:aPackageId
-    "make certain, that some particular package is loaded into the system.
-     Experimental."
-
-    ^ self loadPackageWithId:aPackageId asAutoloaded:false
-
-    "
-     Smalltalk loadPackageWithId:'stx:libbasic'
-     Smalltalk loadPackageWithId:'stx:goodies/persistency'
-     Smalltalk loadPackageWithId:'cg:cparser'
-     Smalltalk loadPackageWithId:'cg:rose'
-     Smalltalk loadPackageWithId:'detemobil:smc'
-    "
-!
-
-loadPackageWithId:aPackageId asAutoloaded:doLoadAsAutoloaded
-    "make certain, that some particular package is loaded into the system.
-     Return true if loaded, false otherwise."
-
-    |packageDir def sourceCodeManager|
-
-    "/ if there is a projectDefinition, let it load itself...
-    def := aPackageId asPackageId projectDefinitionClass.
-    def notNil ifTrue:[
-        ^ def loadAsAutoloaded:doLoadAsAutoloaded.
-    ].
-
-    packageDir := self packageDirectoryForPackageId:aPackageId.
-    packageDir isNil ifTrue:[
-        (aPackageId includes:$:) ifFalse:[
-            "/ assume stx
-            packageDir := self packageDirectoryForPackageId:('stx:',aPackageId).
-        ].
-    ].
-
-    (self
-        loadPackageWithId:aPackageId
-        fromDirectory:packageDir
-        asAutoloaded:doLoadAsAutoloaded) ifTrue: [^ true].
-
-    AbstractSourceCodeManager notNil ifTrue:[
-        sourceCodeManager := AbstractSourceCodeManager sourceCodeManagerForPackage: aPackageId.
-        sourceCodeManager notNil ifTrue:[
-            ^ sourceCodeManager loadPackageWithId: aPackageId fromRepositoryAsAutoloaded: doLoadAsAutoloaded
-        ].   
-    ].
-
-    ^ false
-
-    "
-     Smalltalk loadPackageWithId:'stx:libbasic'
-     Smalltalk loadPackageWithId:'stx:goodies/persistency'
-     Smalltalk loadPackageWithId:'exept:ctypes'
-    "
-
-    "Modified: / 07-12-2006 / 15:04:39 / cg"
-!
-
-loadPackageWithId:aPackageId fromDirectory:packageDirOrStringOrNil asAutoloaded:doLoadAsAutoloaded
-    "load a package referenced by aPackageId - a string like 'stx:libbasic'.
-     The package is either located in packageDirOrStringOrNil, or in the current directory"
-
-    |packageDir packageName shLibName 
-     binaryClassLibraryFilename projectDefinitionFilename loadAllFilename
-     projectDefinitionClass projectDefinitionClassName silent somethingHasBeenLoaded
-     loadOK loadErrorOccurred|
-
-    packageDirOrStringOrNil notNil ifTrue:[
-        packageDir := packageDirOrStringOrNil asFilename.
-    ].
-    silent := SilentLoading | StandAlone.
-
-    "For now: have to read the project definition first!!
-     The class library may contain subclasses of classes in prerequisite packages -
-     so the prerequisite packages have to be loaded first"
-
-    "normally there is a project definiton, use that one to pull in the rest"
-
-    "maybe, it is already in the image - autoloaded"
-    projectDefinitionClass := ProjectDefinition definitionClassForPackage:aPackageId.
-
-    "if not, file it in ..."
-    (projectDefinitionClass isNil and:[packageDir notNil]) ifTrue:[
-        projectDefinitionClassName := ProjectDefinition initialClassNameForDefinitionOf:aPackageId.
-        "/ try to load the project definition class
-        projectDefinitionFilename := (packageDir / projectDefinitionClassName) withSuffix:'st'.
-        projectDefinitionFilename exists ifFalse:[
-            projectDefinitionFilename := (packageDir / 'source' / projectDefinitionClassName) withSuffix:'st'.
-        ].
-        projectDefinitionFilename exists ifTrue:[
-            Class withoutUpdatingChangesDo:[
-                Smalltalk silentlyLoadingDo:[
-                    projectDefinitionFilename fileIn.
-                ].
-            ].
-            projectDefinitionClass := ProjectDefinition definitionClassForPackage:aPackageId.
-        ].
-    ].
-
-    projectDefinitionClass notNil ifTrue:[
-        projectDefinitionClass autoload.
-        somethingHasBeenLoaded := projectDefinitionClass loadAsAutoloaded:doLoadAsAutoloaded.
-        (silent not and:[somethingHasBeenLoaded]) ifTrue:[
-            Transcript showCR:('Smalltalk [info]: loaded package: ' , aPackageId , ' from project definition').
-        ].
-        ^ true.
-    ].
-
-    "/ no project-definition class.
-    
-    "Is there a shared library (.dll or .so) ?"
-    shLibName := aPackageId asPackageId libraryName asFilename 
-                        withSuffix:ObjectFileLoader sharedLibraryExtension.
-
-    binaryClassLibraryFilename := Filename currentDirectory / shLibName.
-    binaryClassLibraryFilename exists ifFalse:[
-        packageDir notNil ifTrue:[
-            binaryClassLibraryFilename := packageDir / shLibName.
-            binaryClassLibraryFilename exists ifFalse:[
-                "/ mhmh - is this a good idea ? (temporary kludge)
-                binaryClassLibraryFilename := packageDir / 'objbc' / shLibName.
-                binaryClassLibraryFilename exists ifFalse:[
-                    binaryClassLibraryFilename := packageDir / 'objvc' / shLibName.
-                ]
-            ]
-        ]
-    ].
-    binaryClassLibraryFilename exists ifTrue:[
-        ObjectFileLoader::ObjectFileLoadErrorNotification handle:[:ex |
-            loadErrorOccurred := true.
-            ex proceedWith:true.
-        ] do:[
-            loadOK := self loadPackage:aPackageId fromClassLibrary:binaryClassLibraryFilename.
-        ].
-        loadOK ifTrue:[
-            silent ifFalse:[
-                Transcript showCR:('loaded package: ' , aPackageId , ' from binary classLib file: ' , binaryClassLibraryFilename pathName).
-            ].
-            doLoadAsAutoloaded ifFalse:[
-                "/ force autoloading...
-                Smalltalk allClassesDo:[:eachClass |
-                    eachClass package == aPackageId ifTrue:[eachClass autoload].
-                ].
-            ].
-            ^ true
-        ].
-        loadErrorOccurred ifTrue:[
-self halt.
-            projectDefinitionClass := ProjectDefinition definitionClassForPackage:aPackageId.
-            projectDefinitionClass notNil ifTrue:[
-                "/ load prerequisites...
-                projectDefinitionClass loadPreRequisitesAsAutoloaded:doLoadAsAutoloaded.
-self halt.
-            ].
-        ].
-    ].
-
-    packageDir isNil ifTrue:[
-        ^ false.
-    ].
-
-    "/ loadAll ? - will be soon obsolete
-    loadAllFilename := packageDir / 'loadAll'.
-    loadAllFilename exists ifFalse:[
-        loadAllFilename := packageDir / 'loadall'.
-    ].
-    loadAllFilename exists ifTrue:[
-        (self loadPackage:aPackageId fromLoadAllFile:loadAllFilename) ifTrue:[
-            silent ifFalse:[
-                Transcript showCR:('loaded package: ' , aPackageId , ' from loadAll file: ' , loadAllFilename pathName).
-            ].
-            ^ true
-        ]
-    ].
-
-    packageName := packageDir baseName.
-
-"/ zip-file loading no longer supported
-"/  "/ .zip ?
-"/    f := (packageDir / packageName) withSuffix:'zip'.
-"/    f exists ifTrue:[
-"/        (self loadPackage:aPackageId fromZIPArchive:f asAutoloaded:doLoadAsAutoloaded) ifTrue:[
-"/            silent ifFalse:[
-"/                Transcript showCR:('loaded package: ' , aPackageId , ' from zip file: ' , f pathName).
-"/            ].
-"/            ^ true
-"/        ]
-"/    ].
-
-"/ abbrev-file loading no longer supported
-"/    "/ abbrev.stc ?
-"/    (self loadPackageFromAbbrevFile:aPackageId asAutoloaded:doLoadAsAutoloaded) ifTrue:[
-"/        ^ true
-"/    ].
-
-"/ any .so-file loading no longer supported
-"/    "/ any .so ?  -> load the first one found (maybe not a good idea)
-"/    packageDir directoryContentsAsFilenamesDo:[:aFilename |
-"/        (aFilename hasSuffix:ObjectFileLoader sharedLibrarySuffix) ifTrue:[
-"/            (self loadPackage:aPackageId fromClassLibrary:aFilename) ifTrue:[
-"/                silent ifFalse:[
-"/                    Transcript showCR:('loaded package: ' , aPackageId , ' from binary classLib file: ' , aFilename pathName).
-"/                ].
-"/                doLoadAsAutoloaded ifFalse:[
-"/                    "/ force autoloading...
-"/                    Smalltalk allClassesDo:[:eachClass |
-"/                        eachClass package == aPackageId ifTrue:[ eachClass autoload].
-"/                    ].
-"/                ].
-"/                ^ true
-"/            ]
-"/        ]
-"/    ].
-
-"/    "/ source files-file loading no longer supported
-"/    "/ however, allow for autoload-stub loaded
-"/    doLoadAsAutoloaded ifTrue:[
-"/        self
-"/            recursiveInstallAutoloadedClassesFrom:packageDir
-"/            rememberIn:(Set new)
-"/            maxLevels:2
-"/            noAutoload:false
-"/            packageTop:packageDir
-"/            showSplashInLevels:0.
-"/    ].
-
-"/    doLoadAsAutoloaded ifFalse:[
-"/        "/ source files
-"/        (self loadPackage:aPackageId fromAllSourceFilesInDirectory:packageDir) ifTrue:[
-"/            silent ifFalse:[
-"/                Transcript showCR:('loaded package: ' , aPackageId , ' from source files in:' , packageDir pathName).
-"/            ].
-"/            ^ true
-"/        ].
-"/    ].
-"/    ^ true
-
-    ^ false
-
-    "
-     Smalltalk loadPackageWithId:'stx:libbasic'
-     Smalltalk loadPackageWithId:'stx:goodies/persistency'
-     Smalltalk loadPackageWithId:'exept:ctypes'
-    "
-
-    "Modified: / 07-12-2006 / 15:08:24 / cg"
 ! !
 
 !Smalltalk class methodsFor:'queries'!
@@ -2784,7 +2771,7 @@
     self allClassesDo:[:eachClass |
         |cls pkg|
 
-        (eachClass isRealNameSpace not) ifTrue:[
+        eachClass isRealNameSpace ifFalse:[
             (includeUnloadedClasses or:[eachClass isLoaded]) ifTrue:[
                 cls := eachClass theNonMetaclass.
                 cls isPrivate ifTrue:[
@@ -3764,6 +3751,7 @@
 
     OperatingSystem enableUserInterrupts.
     OperatingSystem enableCrashSignalInterrupts.
+    ObjectMemory restoreGarbageCollectorSettings.
 
     "/ give user a chance to re-customize things in smalltalk_r.rc.
     "/ reading if smalltalk_r.rc may be suppressed by the --faststart argument.
@@ -3932,7 +3920,7 @@
                 ].
             ].
             idx ~~ 0 ifTrue:[
-                arg := CommandLineArguments at:idx + 1.
+                CommandName := arg := CommandLineArguments at:idx + 1.
 
                 CommandLineArguments
                     removeAtIndex:idx+1; removeAtIndex:idx.
@@ -3979,7 +3967,7 @@
                 idx := CommandLineArguments indexOf:'--file'.
             ].
             idx ~~ 0 ifTrue:[
-                commandFile := CommandLineArguments at:idx+1.
+                CommandName := commandFile := CommandLineArguments at:idx+1.
                 CommandLineArguments removeAtIndex:idx+1; removeAtIndex:idx.
             ].
         ].
@@ -4603,7 +4591,8 @@
             s := f readStream.
             self installAutoloadedClassesFromStream:s.
             s close.
-        ] on:FileStream openErrorSignal do:[:ex| "do nothing"].
+        ] on:FileStream openErrorSignal 
+        do:[:ex| "do nothing"].
     ]
 
     "
@@ -7038,23 +7027,6 @@
     "
 !
 
-loadPackage:aPackageIdOrPackageSymbol asAutoloaded:asAutoloaded
-    "make certain, that some particular package is loaded into the system.
-     If asAutoloaded is true, the package is only loaded lazily (but the extensions
-     are loaded immediately). Otherwise, the compiled dll is loaded which contains
-     both classes and extensions.
-     Return true if loaded, false otherwise."
-
-    ^ self loadPackageWithId:(aPackageIdOrPackageSymbol asString) asAutoloaded:asAutoloaded
-
-    "
-     Smalltalk loadPackage:'stx:libbasic'
-     Smalltalk loadPackage:'stx:goodies/persistency'
-     Smalltalk loadPackage:'cg:cparser'
-     Smalltalk loadPackage:'cg:rose'
-    "
-!
-
 packageDirectoryForPackageId:aPackageId
     "used by classes to find the location of their resource- and bitmap directories.
 
@@ -7487,17 +7459,18 @@
 !Smalltalk class methodsFor:'documentation'!
 
 version
-    ^ '$Id: Smalltalk.st 10505 2010-03-08 21:39:02Z vranyj1 $'
+    ^ '$Id: Smalltalk.st 10508 2010-03-21 19:37:43Z vranyj1 $'
 !
 
 version_CVS
-    ^ 'Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.924 2010/02/26 17:19:25 cg Exp §'
+    ^ 'Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.930 2010/03/19 17:44:34 stefan Exp §'
 !
 
 version_SVN
-    ^ '$Id: Smalltalk.st 10505 2010-03-08 21:39:02Z vranyj1 $'
+    ^ '$Id: Smalltalk.st 10508 2010-03-21 19:37:43Z vranyj1 $'
 ! !
 
 
 
 
+
--- a/UserPreferences.st	Sun Mar 21 17:58:43 2010 +0000
+++ b/UserPreferences.st	Sun Mar 21 19:37:43 2010 +0000
@@ -665,6 +665,34 @@
     ^ self at:#javaBridgeRunsInIDE put:aBoolean
 !
 
+logHTTPRequests
+    ^ self at:#logHTTPRequests ifAbsent:false
+!
+
+logHTTPRequests:aBoolean
+    ^ self at:#logHTTPRequests put:aBoolean
+
+    "
+     UserPreferences current logHTTPRequests
+     UserPreferences current logHTTPRequests:true
+     UserPreferences current logHTTPRequests:false
+    "
+!
+
+logSOAPRequests
+    ^ (self soapLoggingLevel ? 0) > 0
+!
+
+logSOAPRequests:aBoolean
+    self soapLoggingLevel:(aBoolean ifTrue:3 ifFalse:0)
+
+    "
+     UserPreferences current logSOAPRequests
+     UserPreferences current logSOAPRequests:true
+     UserPreferences current logSOAPRequests:false
+    "
+!
+
 smtpServerName
     ^ self at:#smtpServerName ifAbsent:nil
 
@@ -691,6 +719,10 @@
 soapErrorDebugging:aBoolean
     "open a debugger on error, or report it as a soap-error"
     ^ self at:#soapErrorDebugging put:aBoolean
+
+    "
+     UserPreferences current soapErrorDebugging:true
+    "
 !
 
 soapLoggingLevel
@@ -3127,11 +3159,11 @@
 !UserPreferences class methodsFor:'documentation'!
 
 version
-    ^ '$Id: UserPreferences.st 10489 2009-12-27 20:16:54Z vranyj1 $'
+    ^ '$Id: UserPreferences.st 10508 2010-03-21 19:37:43Z vranyj1 $'
 !
 
 version_CVS
-    ^ '§Header: /cvs/stx/stx/libbasic/UserPreferences.st,v 1.242 2009/12/15 14:18:45 cg Exp §'
+    ^ '§Header: /cvs/stx/stx/libbasic/UserPreferences.st,v 1.245 2010/03/15 11:49:20 cg Exp §'
 ! !
 
 
@@ -3144,3 +3176,4 @@
 ! !
 
 
+
--- a/resources/de.rs	Sun Mar 21 17:58:43 2010 +0000
+++ b/resources/de.rs	Sun Mar 21 19:37:43 2010 +0000
@@ -1,6 +1,6 @@
 #encoding iso8859-1
 
-; $Header: /cvs/stx/stx/libbasic/resources/de.rs,v 1.4 2004/12/21 17:29:44 stefan Exp $
+; $Header: /cvs/stx/stx/libbasic/resources/de.rs,v 1.5 2010/03/11 13:18:37 cg Exp $
 ;
 ; German strings
 ;
@@ -44,7 +44,7 @@
 
 'jan'         'Jan'
 'feb'         'Feb'
-'mar'         'Mar'
+'mar'         'Mrz'
 'apr'         'Apr'
 MAY_ABBREV    'Mai'
 'jun'         'Jun'
@@ -189,3 +189,4 @@
 ; 'ERROR_OUT_OF_PAPER'            'Printer is out of paper'
 ; 'ERROR_PRINTQ_FULL'             'Printer queue is full'
 #endif
+
--- a/stx_libbasic.st	Sun Mar 21 17:58:43 2010 +0000
+++ b/stx_libbasic.st	Sun Mar 21 19:37:43 2010 +0000
@@ -531,13 +531,13 @@
     "Return a SVN revision number of myself.
      This number is updated after a commit"
 
-    ^ "$SVN-Revision:"'10504M'"$"
+    ^ "$SVN-Revision:"'10507M'"$"
 ! !
 
 !stx_libbasic class methodsFor:'documentation'!
 
 version
-    ^ '$Id: stx_libbasic.st 10505 2010-03-08 21:39:02Z vranyj1 $'
+    ^ '$Id: stx_libbasic.st 10508 2010-03-21 19:37:43Z vranyj1 $'
 !
 
 version_CVS
@@ -545,5 +545,5 @@
 !
 
 version_SVN
-    ^ '$Id: stx_libbasic.st 10505 2010-03-08 21:39:02Z vranyj1 $'
+    ^ '$Id: stx_libbasic.st 10508 2010-03-21 19:37:43Z vranyj1 $'
 ! !