Smalltalk.st
changeset 13947 efccef803a92
parent 13893 580686880e8f
child 13958 698009ec817a
--- a/Smalltalk.st	Wed Jan 18 12:10:55 2012 +0100
+++ b/Smalltalk.st	Thu Jan 19 10:18:11 2012 +0100
@@ -1714,8 +1714,9 @@
 !
 
 vmInstructionTrace:aBoolean
-
-
+    self halt:'not yet implemented'
+
+    "Modified: / 19-01-2012 / 10:15:35 / cg"
 ! !
 
 !Smalltalk class methodsFor:'enumerating'!
@@ -2101,93 +2102,6 @@
     StandAlone := aBoolean
 ! !
 
-!Smalltalk class methodsFor:'misc stuff'!
-
-addExitBlock:aBlock
-    "{ Pragma: +optSpace }"
-
-    "add a block to be executed when Smalltalk finishes.
-     This feature is currently not used anywhere - but could be useful for
-     cleanup in stand alone applications.
-
-     Better use: ObjectMemory>>#addDependent: and handle the change message
-     #aboutToQuit."
-
-    ExitBlocks isNil ifTrue:[
-	ExitBlocks := OrderedCollection with:aBlock
-    ] ifFalse:[
-	ExitBlocks add:aBlock
-    ]
-!
-
-addImageStartBlock:aBlock
-    "{ Pragma: +optSpace }"
-
-    "add a blocks to be executed in a separate process after
-     everything has been initialized.
-     These blocks will be executed after an image restart."
-
-    ImageStartBlocks isNil ifTrue:[
-	ImageStartBlocks := OrderedCollection with:aBlock
-    ] ifFalse:[
-	ImageStartBlocks add:aBlock
-    ]
-
-    "Created: 9.9.1996 / 16:48:20 / stefan"
-!
-
-addStartBlock:aBlock
-    "add a block to be executed in a separate process after
-     everything has been initialized. These blocks will
-     be executed only once and not be executed after an image restart.
-     Initial processes such as the launcher are usually started here
-     (see smalltalk.rc / private.rc)."
-
-    "{ Pragma: +optSpace }"
-
-    StartBlocks isNil ifTrue:[
-	StartBlocks := OrderedCollection with:aBlock
-    ] ifFalse:[
-	StartBlocks add:aBlock
-    ]
-
-    "Created: / 09-09-1996 / 16:46:53 / stefan"
-    "Modified (comment): / 18-08-2011 / 09:18:42 / cg"
-!
-
-exit
-    "{ Pragma: +optSpace }"
-
-    "finish the Smalltalk system"
-
-    self exit:0
-    "not reached"
-
-    "Be careful evaluating this
-     Smalltalk exit
-    "
-!
-
-exit:statusInteger
-    "{ Pragma: +optSpace }"
-
-    "finish the Smalltalk system"
-
-    ObjectMemory changed:#aboutToExit.  "/ for ST/X backward compatibility
-    ObjectMemory changed:#aboutToQuit.  "/ for ST-80 compatibility
-    ExitBlocks notNil ifTrue:[
-	ExitBlocks do:[:aBlock |
-	    aBlock value
-	]
-    ].
-    OperatingSystem exit:statusInteger
-    "not reached"
-
-    "Be careful evaluating this
-     Smalltalk exit:1
-    "
-! !
-
 !Smalltalk class methodsFor:'private-system management-packages'!
 
 knownPackages
@@ -4246,6 +4160,93 @@
     "Modified: / 07-01-2012 / 12:59:01 / cg"
 ! !
 
+!Smalltalk class methodsFor:'startup and exit'!
+
+addExitBlock:aBlock
+    "{ Pragma: +optSpace }"
+
+    "add a block to be executed when Smalltalk finishes.
+     This feature is currently not used anywhere - but could be useful for
+     cleanup in stand alone applications.
+
+     Better use: ObjectMemory>>#addDependent: and handle the change message
+     #aboutToQuit."
+
+    ExitBlocks isNil ifTrue:[
+	ExitBlocks := OrderedCollection with:aBlock
+    ] ifFalse:[
+	ExitBlocks add:aBlock
+    ]
+!
+
+addImageStartBlock:aBlock
+    "{ Pragma: +optSpace }"
+
+    "add a blocks to be executed in a separate process after
+     everything has been initialized.
+     These blocks will be executed after an image restart."
+
+    ImageStartBlocks isNil ifTrue:[
+	ImageStartBlocks := OrderedCollection with:aBlock
+    ] ifFalse:[
+	ImageStartBlocks add:aBlock
+    ]
+
+    "Created: 9.9.1996 / 16:48:20 / stefan"
+!
+
+addStartBlock:aBlock
+    "add a block to be executed in a separate process after
+     everything has been initialized. These blocks will
+     be executed only once and not be executed after an image restart.
+     Initial processes such as the launcher are usually started here
+     (see smalltalk.rc / private.rc)."
+
+    "{ Pragma: +optSpace }"
+
+    StartBlocks isNil ifTrue:[
+	StartBlocks := OrderedCollection with:aBlock
+    ] ifFalse:[
+	StartBlocks add:aBlock
+    ]
+
+    "Created: / 09-09-1996 / 16:46:53 / stefan"
+    "Modified (comment): / 18-08-2011 / 09:18:42 / cg"
+!
+
+exit
+    "{ Pragma: +optSpace }"
+
+    "finish the Smalltalk system"
+
+    self exit:0
+    "not reached"
+
+    "Be careful evaluating this
+     Smalltalk exit
+    "
+!
+
+exit:statusInteger
+    "{ Pragma: +optSpace }"
+
+    "finish the Smalltalk system"
+
+    ObjectMemory changed:#aboutToExit.  "/ for ST/X backward compatibility
+    ObjectMemory changed:#aboutToQuit.  "/ for ST-80 compatibility
+    ExitBlocks notNil ifTrue:[
+	ExitBlocks do:[:aBlock |
+	    aBlock value
+	]
+    ].
+    OperatingSystem exit:statusInteger
+    "not reached"
+
+    "Be careful evaluating this
+     Smalltalk exit:1
+    "
+! !
+
 !Smalltalk class methodsFor:'startup queries'!
 
 commandLine
@@ -4393,6 +4394,19 @@
     "
 !
 
+isStandAloneDebug
+    "return true, if this is a standAlone application which
+     was started with the -debug option."
+
+    ^ DebuggingStandAlone ? false
+
+    "
+     Smalltalk isStandAloneDebug
+    "
+
+    "Created: / 19-01-2012 / 10:17:41 / cg"
+!
+
 startupArguments
     "return the arguments passed to StartupClass when stx gets started.
      Usually these are nil,
@@ -7711,11 +7725,11 @@
 !Smalltalk class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.985 2012-01-07 12:04:29 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.986 2012-01-19 09:18:11 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.985 2012-01-07 12:04:29 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.986 2012-01-19 09:18:11 cg Exp $'
 !
 
 version_SVN