.
authorclaus
Sun, 13 Aug 1995 22:48:41 +0200
changeset 390 32585822527b
parent 389 759e73ac879d
child 391 66bb97f4e41f
.
Smalltalk.st
--- a/Smalltalk.st	Sun Aug 13 05:03:07 1995 +0200
+++ b/Smalltalk.st	Sun Aug 13 22:48:41 1995 +0200
@@ -17,7 +17,7 @@
 			   CachedAbbreviations
 			   SilentLoading Initializing
 			   StandAlone
-			   LogDoits 
+			   LogDoits LoadBinaries
 			   RealSystemPath ResourcePath SourcePath BitmapPath BinaryPath FileInPath'
        poolDictionaries:''
        category:'System-Support'
@@ -27,7 +27,7 @@
 COPYRIGHT (c) 1988 by Claus Gittinger
 	     All Rights Reserved
 
-$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.58 1995-08-11 03:03:56 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.59 1995-08-13 20:48:41 claus Exp $
 '!
 
 "
@@ -56,7 +56,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.58 1995-08-11 03:03:56 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.59 1995-08-13 20:48:41 claus Exp $
 "
 !
 
@@ -97,6 +97,9 @@
 					file. Default is false, since the changes file
 					may become huge ...
 
+	LoadBinaries	<Boolean>	if true, we attempt to load classes rom a binary
+					file, if present. If false, this is always suppressed.
+
 	SourcePath      <Collection>    cached names of really existing directories
 	BitmapPath                      These are remembered, since in NFS systems,
 	ResourcePath                    the time to lookup files may become long
@@ -334,7 +337,8 @@
 initUserPreferences
     "setup other stuff"
 
-    LogDoits := false
+    LogDoits := false.
+    LoadBinaries := false.
 !
 
 initGlobalsFromEnvironment
@@ -492,8 +496,6 @@
     "
     Class updateChanges:false.
 
-    self secureFileIn:'patches'.
-
     "
      look for a '-e filename' argument - this will force evaluation of
      filename only, no standard startup
@@ -504,6 +506,8 @@
 	self exit
     ].
 
+    self secureFileIn:'patches'.
+
     (self secureFileIn:((Arguments at:1) , '.rc')) ifFalse:[
 	"no .rc file where executable is; try default smalltalk.rc"
 	(self secureFileIn:'smalltalk.rc') ifFalse:[
@@ -1492,6 +1496,19 @@
 
 !
 
+loadBinaries
+    "return true, if binaries should be loaded into the system,
+     false if this should be suppressed. The default is false (for now)."
+
+    ^ LoadBinaries
+!
+
+loadBinaries:aBoolean
+    "turn on/off loading of binary objects"
+
+    LoadBinaries := aBoolean
+!
+
 systemPath
     "return a collection of directorynames, where smalltalk
      looks for system files 
@@ -1909,7 +1926,7 @@
     "
      check if the dynamic loader class is in
     "
-    ObjectFileLoader isNil ifTrue:[^ false].
+    (LoadBinaries not or:[ObjectFileLoader isNil]) ifTrue:[^ false].
 
     (path := self getBinaryFileName:aFileName) isNil ifTrue:[^ false].
     ok := (ObjectFileLoader loadClass:aClassName fromObjectFile:path) notNil.
@@ -1999,7 +2016,7 @@
     ((aFileName endsWith:'.o')
     or:[(aFileName endsWith:'.obj')
     or:[aFileName endsWith:'.so']]) ifTrue:[
-	ObjectFileLoader isNil ifTrue:[^ false].
+	(LoadBinaries not or:[ObjectFileLoader isNil]) ifTrue:[^ false].
 	path := self getBinaryFileName:aFileName.
 	path isNil ifTrue:[^ false].
 	^ ObjectFileLoader loadObjectFile:aFileName
@@ -2132,7 +2149,7 @@
 		    "
 		     then, if dynamic linking is available, 
 		    "
-		    ObjectFileLoader notNil ifTrue:[
+		    (LoadBinaries and:[ObjectFileLoader notNil]) ifTrue:[
 			"
 			 first look for a class packages shared binary in binary/xxx.o
 			"