- Smalltalk jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Thu, 26 Jul 2012 11:01:13 +0100
branchjv
changeset 17956 e3da46f1312c
parent 17955 f5ee690b1a27
child 17957 3a220976a410
- Smalltalk changed: #restart
Smalltalk.st
--- a/Smalltalk.st	Wed Jul 25 09:45:15 2012 +0100
+++ b/Smalltalk.st	Thu Jul 26 11:01:13 2012 +0100
@@ -1058,6 +1058,7 @@
     "Created: 20.6.1997 / 16:58:28 / cg"
 ! !
 
+
 !Smalltalk class methodsFor:'browsing'!
 
 browseAllCallsOn:aSelectorSymbol
@@ -2083,6 +2084,7 @@
     ]
 ! !
 
+
 !Smalltalk class methodsFor:'message control'!
 
 silentLoading
@@ -3750,15 +3752,15 @@
      #earlySystemInstallation is sent for ST80 compatibility
 
      #earlyRestart is send first, nothing has been setup yet.
-		   (should be used to flush all device dependent entries)
+                   (should be used to flush all device dependent entries)
 
      #restarted is send right after.
-		   (should be used to recreate external resources (fds, bitmaps etc)
+                   (should be used to recreate external resources (fds, bitmaps etc)
 
      #returnFromSnapshot is sent last
-		   (should be used to restart processes, reOpen Streams which cannot
-		    be automatically be reopened (i.e. Sockets, Pipes) and so on.
-		   (Notice that positionable fileStreams are already reopened and repositioned)
+                   (should be used to restart processes, reOpen Streams which cannot
+                    be automatically be reopened (i.e. Sockets, Pipes) and so on.
+                   (Notice that positionable fileStreams are already reopened and repositioned)
      "
 
     |deb insp transcript idx|
@@ -3775,6 +3777,8 @@
     AbstractOperatingSystem initializeConcreteClass.
 
     ImageRestartTime := Timestamp now.
+    TimeOfLastChangeEvent := nil.
+    NumberOfChangeEventsInLast200msecs := 0.
 
     CommandLine := CommandLineArguments copy.
     CommandLineArguments := CommandLineArguments asOrderedCollection.
@@ -3782,12 +3786,12 @@
 
     idx := CommandLineArguments indexOf:'-q'.
     idx == 0 ifTrue:[
-	idx := CommandLineArguments indexOf:'--silent'.
+        idx := CommandLineArguments indexOf:'--silent'.
     ].
     idx ~~ 0 ifTrue:[
-	Object infoPrinting:false.
-	ObjectMemory infoPrinting:false.
-	CommandLineArguments removeAtIndex:idx.
+        Object infoPrinting:false.
+        ObjectMemory infoPrinting:false.
+        CommandLineArguments removeAtIndex:idx.
     ].
 
     "/
@@ -3822,7 +3826,7 @@
     insp := Inspector.
     deb := Debugger.
     deb notNil ifTrue:[
-	deb reinitialize
+        deb reinitialize
     ].
     Inspector := MiniInspector.
     Debugger := MiniDebugger.
@@ -3835,7 +3839,7 @@
     "/ ObjectFileLoader; therefore, must reload before doing any notifications.
 
     ObjectFileLoader notNil ifTrue:[
-	ObjectFileLoader reloadAllRememberedObjectFiles.
+        ObjectFileLoader reloadAllRememberedObjectFiles.
     ].
 
     "/
@@ -3844,9 +3848,9 @@
     "/ a display during early startup.
 
     Screen notNil ifTrue:[
-	Screen allScreens do:[:aDisplay |
-	    aDisplay invalidateConnection
-	].
+        Screen allScreens do:[:aDisplay |
+            aDisplay invalidateConnection
+        ].
     ].
 
     ObjectMemory changed:#earlySystemInstallation.
@@ -3862,7 +3866,7 @@
     "/ (mostly view/GC/color & font stuff)
 
     ObjectMemory
-	changed:#earlyRestart; changed:#restarted.
+        changed:#earlyRestart; changed:#restarted.
 
     "/
     "/ start catching SIGINT and SIGQUIT
@@ -3876,80 +3880,80 @@
 
     idx := CommandLineArguments indexOf:'--faststart'.
     idx == 0 ifTrue:[
-	idx := CommandLineArguments indexOf:'--fastStart'.
+        idx := CommandLineArguments indexOf:'--fastStart'.
     ].
     idx ~~ 0 ifTrue:[
-	CommandLineArguments removeAtIndex:idx.
+        CommandLineArguments removeAtIndex:idx.
     ] ifFalse:[
-	CallbackSignal := QuerySignal new.
-	[
-	    Class withoutUpdatingChangesDo:[
-		(self fileIn:(self commandName , '_r.rc')) ifFalse:[
-		    "no _r.rc file where executable is; try default smalltalk_r.rc"
-		    self fileIn:'smalltalk_r.rc'
-		].
-	    ]
-	] on:CallbackSignal do:[:ex|
-	    "/ now, display and view-stuff works;
-	    "/ back to the previous debugging interface
-
-	    Inspector := insp.
-	    Debugger := deb.
-
-	    "/ reinstall Transcript, if not changed during restart.
-	    "/ if there was no Transcript, go to stderr
-
-	    (transcript notNil and:[Transcript == Stderr]) ifTrue:[
-		Transcript := transcript.
-	    ].
-	    Initializing := false.
-	    ex proceed.
-	].
-	CallbackSignal := nil.
+        CallbackSignal := QuerySignal new.
+        [
+            Class withoutUpdatingChangesDo:[
+                (self fileIn:(self commandName , '_r.rc')) ifFalse:[
+                    "no _r.rc file where executable is; try default smalltalk_r.rc"
+                    self fileIn:'smalltalk_r.rc'
+                ].
+            ]
+        ] on:CallbackSignal do:[:ex|
+            "/ now, display and view-stuff works;
+            "/ back to the previous debugging interface
+
+            Inspector := insp.
+            Debugger := deb.
+
+            "/ reinstall Transcript, if not changed during restart.
+            "/ if there was no Transcript, go to stderr
+
+            (transcript notNil and:[Transcript == Stderr]) ifTrue:[
+                Transcript := transcript.
+            ].
+            Initializing := false.
+            ex proceed.
+        ].
+        CallbackSignal := nil.
     ].
 
     "/ reinitialization (restart) of Display is normally performed
     "/ in the restart script. If this has not been run for some reason,
     "/ do in now.
     Initializing ifTrue:[
-	Display notNil ifTrue:[
-	    [
-		Display reinitializeFor:Screen defaultDisplayName.
-	    ] on:Screen deviceOpenErrorSignal do:[
-		'Smalltalk [error]: Cannot restart connection to: ' errorPrint.
-		Screen defaultDisplayName errorPrintCR.
-		OperatingSystem exit:1.
-	    ].
-	].
-	"/ now, display and view-stuff works;
-	"/ back to the previous debugging interface
-
-	Inspector := insp.
-	Debugger := deb.
-
-	"/ reinstall Transcript, if not changed during restart.
-	"/ if there was no Transcript, go to stderr
-
-	(transcript notNil and:[Transcript == Stderr]) ifTrue:[
-	    Transcript := transcript.
-	].
-	Initializing := false.
+        Display notNil ifTrue:[
+            [
+                Display reinitializeFor:Screen defaultDisplayName.
+            ] on:Screen deviceOpenErrorSignal do:[
+                'Smalltalk [error]: Cannot restart connection to: ' errorPrint.
+                Screen defaultDisplayName errorPrintCR.
+                OperatingSystem exit:1.
+            ].
+        ].
+        "/ now, display and view-stuff works;
+        "/ back to the previous debugging interface
+
+        Inspector := insp.
+        Debugger := deb.
+
+        "/ reinstall Transcript, if not changed during restart.
+        "/ if there was no Transcript, go to stderr
+
+        (transcript notNil and:[Transcript == Stderr]) ifTrue:[
+            Transcript := transcript.
+        ].
+        Initializing := false.
     ].
     Screen notNil ifTrue:[
-	"clean up leftover screens (and views) that haven't been reopened.
-	 Operate on a copy, since brokenConnection removes us from AllScreens"
-	Screen allScreens copy do:[:eachDisplay |
-	    eachDisplay isOpen ifFalse:[
-		'Smalltalk [info]: cannot reopen secondary display: ' errorPrint.
-		eachDisplay errorPrintCR.
-		eachDisplay cleanupAfterDispatch; brokenConnection.
-	    ]
-	].
+        "clean up leftover screens (and views) that haven't been reopened.
+         Operate on a copy, since brokenConnection removes us from AllScreens"
+        Screen allScreens copy do:[:eachDisplay |
+            eachDisplay isOpen ifFalse:[
+                'Smalltalk [info]: cannot reopen secondary display: ' errorPrint.
+                eachDisplay errorPrintCR.
+                eachDisplay cleanupAfterDispatch; brokenConnection.
+            ]
+        ].
     ].
 
     deb := insp := transcript := nil.   "avoid dangling refs"
     (StartupClass perform:#keepSplashWindowOpen ifNotUnderstood:[false]) ifFalse:[
-	self hideSplashWindow.   "/ if there is one, it's now time to hide it
+        self hideSplashWindow.   "/ if there is one, it's now time to hide it
     ].
     self mainStartup:true
 
@@ -7786,7 +7790,7 @@
 !Smalltalk class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.991 2012/07/18 17:09:50 cg Exp $'
+    ^ '$Id: Smalltalk.st 10830 2012-07-26 10:01:13Z vranyj1 $'
 !
 
 version_CVS
@@ -7794,5 +7798,5 @@
 !
 
 version_SVN
-    ^ '$Id: Smalltalk.st 10829 2012-07-25 08:45:15Z vranyj1 $'
+    ^ '$Id: Smalltalk.st 10830 2012-07-26 10:01:13Z vranyj1 $'
 ! !