author | Stefan Vogel <sv@exept.de> |
Thu, 02 May 2002 18:08:45 +0200 | |
changeset 485 | df1e36a8c5ce |
parent 446 | e740c00fb271 |
child 488 | 521e2d58f050 |
permissions | -rw-r--r-- |
12 | 1 |
"/ |
2 |
"/ $Header$ |
|
3 |
"/ |
|
4 |
"/ This file is processed at initial startup |
|
5 |
"/ - not when resuming an image. |
|
6 |
"/ |
|
0 | 7 |
|
12 | 8 |
"/ |
9 |
"/ install uncompiled classes as autoload |
|
10 |
"/ classes ... (if not already present) |
|
11 |
"/ Autoloaded classes will be automatically filed-in |
|
12 |
"/ when first accessed. This allows a smaller executable, |
|
13 |
"/ but creates a short delay, when the class is loaded on |
|
14 |
"/ first access. |
|
15 |
"/ |
|
16 |
"/ You can add more classes to these lists - |
|
17 |
"/ i.e. all your classes you like to have around, |
|
18 |
"/ but which are not needed often enough to justify |
|
19 |
"/ machine code for them ... |
|
0 | 20 |
|
485 | 21 |
|cpu iSets requiredClasses enableJIT| |
24 | 22 |
|
196 | 23 |
'patches [info]: initial startup (snapshot image restart is faster) ...' infoPrintCR. |
225 | 24 |
|
371
ff10a765331c
for now: disable JIT for sparcV9 architectures
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
25 |
"/ |
ff10a765331c
for now: disable JIT for sparcV9 architectures
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
26 |
"/ the JIT translator is known to work with the following |
ff10a765331c
for now: disable JIT for sparcV9 architectures
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
27 |
"/ architectures: |
ff10a765331c
for now: disable JIT for sparcV9 architectures
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
28 |
"/ ix86 (linux, win32, unixware) |
ff10a765331c
for now: disable JIT for sparcV9 architectures
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
29 |
"/ sgi-mips (irix) |
ff10a765331c
for now: disable JIT for sparcV9 architectures
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
30 |
"/ alpha (osf) |
485 | 31 |
"/ sparc (solaris) [only tested with v7 & v8 & v9 cpus] |
32 |
"/ aix (rs6k) [not very well tested] |
|
371
ff10a765331c
for now: disable JIT for sparcV9 architectures
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
33 |
"/ |
ff10a765331c
for now: disable JIT for sparcV9 architectures
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
34 |
enableJIT := false. |
ff10a765331c
for now: disable JIT for sparcV9 architectures
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
35 |
|
485 | 36 |
cpu := OperatingSystem getCPUType. |
282 | 37 |
(#( |
485 | 38 |
'i386' |
39 |
'sparc' |
|
40 |
'mips' |
|
41 |
'alpha' |
|
42 |
) includes:cpu) ifTrue:[ |
|
384 | 43 |
enableJIT := true. |
44 |
||
485 | 45 |
cpu = 'sparc' ifTrue:[ |
46 |
"/ for now, disable if we detect running on a sparcV10; |
|
384 | 47 |
"/ Reason: |
485 | 48 |
"/ we do not have v10 machines here at Exept (they even do not exist at this time), |
49 |
"/ and therefore have no way of checking if it runs on v10. |
|
384 | 50 |
"/ I dont want ST/X to crash on your side in that case ... |
51 |
"/ ... better run a bit slower than not running at all. |
|
52 |
"/ Please let us know if it runs and we will remove the code below |
|
53 |
"/ (which you should do as well). |
|
54 |
||
371
ff10a765331c
for now: disable JIT for sparcV9 architectures
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
55 |
iSets := OperatingSystem getSystemInfo at:#instructionSets. |
485 | 56 |
(iSets includesString:'sparcv10') ifTrue:[ |
57 |
'patches [warning]: disable JIT for sparcV10 - not yet validated' infoPrintCR. |
|
384 | 58 |
enableJIT := false |
371
ff10a765331c
for now: disable JIT for sparcV9 architectures
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
59 |
] |
ff10a765331c
for now: disable JIT for sparcV9 architectures
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
60 |
] |
ff10a765331c
for now: disable JIT for sparcV9 architectures
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
61 |
]. |
ff10a765331c
for now: disable JIT for sparcV9 architectures
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
62 |
|
ff10a765331c
for now: disable JIT for sparcV9 architectures
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
63 |
enableJIT ifTrue:[ |
268 | 64 |
"/ 'patches [info]: turn on JIT ...' infoPrintCR. |
265 | 65 |
ObjectMemory justInTimeCompilation:true. |
66 |
]. |
|
175 | 67 |
|
81 | 68 |
"/ GLXWorkstation forceGL:true. |
79 | 69 |
"/ OperatingSystem disableSignal:14. |
81 | 70 |
|
26 | 71 |
ObjectMemory infoPrinting:false. |
174 | 72 |
"/ Smalltalk loadBinaries:true. |
160 | 73 |
Compiler allowUnderscoreInIdentifier:true. |
74 |
Compiler warnUnderscoreInIdentifier:false. |
|
75 |
Compiler warnSTXSpecials:false. |
|
26 | 76 |
|
446 | 77 |
"/ |
78 |
"/ set the package for changes done below |
|
79 |
"/ |
|
24 | 80 |
Project notNil ifTrue:[ |
446 | 81 |
|p| |
82 |
||
83 |
p := Project new. |
|
84 |
p package:#'autoloaded'. |
|
85 |
p comment:'only for autoloaded classes'. |
|
86 |
Project current:p. |
|
24 | 87 |
]. |
10 | 88 |
|
12 | 89 |
"/ |
77 | 90 |
"/ when filing in, keep source as reference to file |
91 |
"/ (instead of keeping a string locally in the image) |
|
92 |
"/ |
|
85 | 93 |
"/ I disable this - its dangerous if you fileIn |
94 |
"/ classes from other directories and fileOut later clobbers those files |
|
95 |
"/ |
|
96 |
"/ ClassCategoryReader sourceMode:#reference. |
|
77 | 97 |
|
98 |
"/ |
|
12 | 99 |
"/ the following are required (either compiled or interpreted) ... |
100 |
"/ |
|
10 | 101 |
requiredClasses := #( |
77 | 102 |
ObsoleteObject |
397 | 103 |
"/ BinaryIOManager BinaryInputManager BinaryOutputManager BinaryObjectStorage |
77 | 104 |
StringCollection |
379 | 105 |
CachingRegistry Registry |
77 | 106 |
). |
10 | 107 |
|
108 |
requiredClasses do:[:s | |
|
109 |
(Smalltalk at:s) isNil ifTrue:[ |
|
196 | 110 |
('patches [info]: loading ' , s , ' ...') infoPrintCR. |
10 | 111 |
Smalltalk fileInClass:s initialize:true lazy:false silent:true |
112 |
] |
|
113 |
]. |
|
24 | 114 |
! |
115 |
||
169 | 116 |
|optionalViews| |
0 | 117 |
|
24 | 118 |
(Smalltalk at:#View) isNil ifTrue:[ |
196 | 119 |
'patches [info]: installing required autoloaded classes ...' infoPrintCR. |
169 | 120 |
|
24 | 121 |
optionalViews := #( |
26 | 122 |
DeviceWorkstation |
24 | 123 |
Workstation |
26 | 124 |
XWorkstation |
24 | 125 |
DisplayRootView |
126 |
SimpleView |
|
127 |
TopView |
|
128 |
StandardSystemView |
|
129 |
ModalBox |
|
130 |
View |
|
131 |
PseudoView |
|
132 |
DeviceDrawable |
|
133 |
DisplayMedium |
|
362 | 134 |
DisplaySurface |
135 |
GraphicsMedium |
|
136 |
DeviceGraphicsContext |
|
24 | 137 |
GraphicsContext |
138 |
Image |
|
139 |
ViewStyle |
|
140 |
KeyboardMap |
|
141 |
KeyboardForwarder |
|
142 |
TextCollector |
|
77 | 143 |
SynchronousWindowSensor |
24 | 144 |
WindowSensor |
145 |
WindowGroup |
|
146 |
WindowEvent |
|
147 |
WindowingTransformation |
|
148 |
FontDescription |
|
149 |
Font |
|
150 |
Form |
|
151 |
Cursor |
|
152 |
Color |
|
153 |
Depth1Image |
|
154 |
Depth8Image |
|
155 |
ResourcePack |
|
156 |
Model |
|
157 |
Controller |
|
158 |
ApplicationModel |
|
291
b6ece4a96c36
preps to read patchFiles from stxPatches directory
Claus Gittinger <cg@exept.de>
parents:
284
diff
changeset
|
159 |
ApplicationWindow |
24 | 160 |
WindowBuilder |
161 |
PopUpView |
|
162 |
ShadowView |
|
163 |
Colormap |
|
25 | 164 |
DeviceHandle |
165 |
DisplayObject |
|
24 | 166 |
). |
167 |
optionalViews do:[:s | |
|
168 |
"install if not already compiled-in" |
|
169 |
(Smalltalk at:s) isNil ifTrue:[ |
|
170 |
Autoload subclass:s |
|
171 |
instanceVariableNames:'' |
|
172 |
classVariableNames:'' |
|
173 |
poolDictionaries:'' |
|
174 |
category:'autoloaded-Views' |
|
175 |
] |
|
176 |
]. |
|
179 | 177 |
(Smalltalk at:#DeviceWorkstation) autoload. |
178 |
(Smalltalk at:#XWorkstation) autoload. |
|
179 |
(Smalltalk at:#Workstation) autoload. |
|
180 |
(Smalltalk at:#DeviceHandle) autoload. |
|
24 | 181 |
]. |
131
20fc8bdf1de5
removed (old) builtIn class list; depend on abbrev.stc alone
Claus Gittinger <cg@exept.de>
parents:
125
diff
changeset
|
182 |
! |
24 | 183 |
|
446 | 184 |
"/ |
185 |
"/ set the package for changes done below |
|
186 |
"/ |
|
24 | 187 |
Project notNil ifTrue:[ |
446 | 188 |
|p| |
189 |
||
190 |
p := Project new. |
|
191 |
p package:#'patches'. |
|
192 |
p comment:'only for patches'. |
|
193 |
Project current:p. |
|
24 | 194 |
]. |
195 |
||
196 | 196 |
'patches [info]: installing patches ...' infoPrintCR. |
174 | 197 |
! |
125 | 198 |
|
291
b6ece4a96c36
preps to read patchFiles from stxPatches directory
Claus Gittinger <cg@exept.de>
parents:
284
diff
changeset
|
199 |
"/ future systems will read patches from a patch-directory, |
b6ece4a96c36
preps to read patchFiles from stxPatches directory
Claus Gittinger <cg@exept.de>
parents:
284
diff
changeset
|
200 |
"/ called stxPatches. (we will deliver patch-sets in the future) |
b6ece4a96c36
preps to read patchFiles from stxPatches directory
Claus Gittinger <cg@exept.de>
parents:
284
diff
changeset
|
201 |
"/ This is not yet implemented, but we are prepared here for |
b6ece4a96c36
preps to read patchFiles from stxPatches directory
Claus Gittinger <cg@exept.de>
parents:
284
diff
changeset
|
202 |
"/ this ... |
358
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
323
diff
changeset
|
203 |
"/ patches from that directory are read in alphabetic order; |
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
323
diff
changeset
|
204 |
"/ patches will be named them p_nnnn.st, where nnnn is a sequence-nr. |
291
b6ece4a96c36
preps to read patchFiles from stxPatches directory
Claus Gittinger <cg@exept.de>
parents:
284
diff
changeset
|
205 |
|
b6ece4a96c36
preps to read patchFiles from stxPatches directory
Claus Gittinger <cg@exept.de>
parents:
284
diff
changeset
|
206 |
|patchDir| |
b6ece4a96c36
preps to read patchFiles from stxPatches directory
Claus Gittinger <cg@exept.de>
parents:
284
diff
changeset
|
207 |
|
b6ece4a96c36
preps to read patchFiles from stxPatches directory
Claus Gittinger <cg@exept.de>
parents:
284
diff
changeset
|
208 |
patchDir := 'stxPatches' asFilename. |
b6ece4a96c36
preps to read patchFiles from stxPatches directory
Claus Gittinger <cg@exept.de>
parents:
284
diff
changeset
|
209 |
(patchDir exists and:[patchDir isDirectory and:[patchDir isReadable]]) ifTrue:[ |
358
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
323
diff
changeset
|
210 |
patchDir directoryContents sort do:[:f | |
291
b6ece4a96c36
preps to read patchFiles from stxPatches directory
Claus Gittinger <cg@exept.de>
parents:
284
diff
changeset
|
211 |
|fn| |
b6ece4a96c36
preps to read patchFiles from stxPatches directory
Claus Gittinger <cg@exept.de>
parents:
284
diff
changeset
|
212 |
|
b6ece4a96c36
preps to read patchFiles from stxPatches directory
Claus Gittinger <cg@exept.de>
parents:
284
diff
changeset
|
213 |
fn := (patchDir construct:f) name. |
b6ece4a96c36
preps to read patchFiles from stxPatches directory
Claus Gittinger <cg@exept.de>
parents:
284
diff
changeset
|
214 |
('patches [info]: reading patchFile ''' , fn , ''' ...') infoPrintCR. |
b6ece4a96c36
preps to read patchFiles from stxPatches directory
Claus Gittinger <cg@exept.de>
parents:
284
diff
changeset
|
215 |
Smalltalk fileIn:fn. |
b6ece4a96c36
preps to read patchFiles from stxPatches directory
Claus Gittinger <cg@exept.de>
parents:
284
diff
changeset
|
216 |
] |
b6ece4a96c36
preps to read patchFiles from stxPatches directory
Claus Gittinger <cg@exept.de>
parents:
284
diff
changeset
|
217 |
]. |
b6ece4a96c36
preps to read patchFiles from stxPatches directory
Claus Gittinger <cg@exept.de>
parents:
284
diff
changeset
|
218 |
! |
b6ece4a96c36
preps to read patchFiles from stxPatches directory
Claus Gittinger <cg@exept.de>
parents:
284
diff
changeset
|
219 |
|
16 | 220 |
"/ |
12 | 221 |
"/ the following patches where added by the changesBrowsers 'make change a patch' |
222 |
"/ function ... |
|
223 |
"/ |
|
210 | 224 |
! |