author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Mon, 04 Jan 2016 21:17:25 +0000 | |
branch | jv |
changeset 3694 | e89d2870030c |
parent 3686 | d8bf4414aa3d |
child 3727 | 5ce5e4d7a752 |
permissions | -rw-r--r-- |
1669 | 1 |
" |
2 |
COPYRIGHT (c) 1989 by Claus Gittinger |
|
3 |
COPYRIGHT (c) 2006 by eXept Software AG |
|
4 |
All Rights Reserved |
|
5 |
||
6 |
This software is furnished under a license and may be used |
|
7 |
only in accordance with the terms of that license and with the |
|
8 |
inclusion of the above copyright notice. This software may not |
|
9 |
be provided or otherwise made available to, or used by, any |
|
10 |
other person. No title to or ownership of the software is |
|
11 |
hereby transferred. |
|
12 |
" |
|
13 |
"{ Package: 'stx:libcomp' }" |
|
14 |
||
3659 | 15 |
"{ NameSpace: Smalltalk }" |
16 |
||
1669 | 17 |
Object subclass:#STCCompilerInterface |
3240 | 18 |
instanceVariableNames:'originator parserFlags initName theNonMetaclassToCompileFor |
19 |
classToCompileFor stFileName cFileName oFileName stcFlags cFlags |
|
20 |
stcPath ccPath requestor methodCategory executionStatus package' |
|
3686
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
21 |
classVariableNames:'SequenceNumber Verbose KeepIntermediateFiles |
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
22 |
BuiltinCIncludeDirectories' |
3240 | 23 |
poolDictionaries:'' |
24 |
category:'System-Compiler' |
|
1669 | 25 |
! |
26 |
||
27 |
!STCCompilerInterface class methodsFor:'documentation'! |
|
28 |
||
29 |
copyright |
|
30 |
" |
|
31 |
COPYRIGHT (c) 1989 by Claus Gittinger |
|
32 |
COPYRIGHT (c) 2006 by eXept Software AG |
|
33 |
All Rights Reserved |
|
34 |
||
35 |
This software is furnished under a license and may be used |
|
36 |
only in accordance with the terms of that license and with the |
|
37 |
inclusion of the above copyright notice. This software may not |
|
38 |
be provided or otherwise made available to, or used by, any |
|
39 |
other person. No title to or ownership of the software is |
|
40 |
hereby transferred. |
|
41 |
" |
|
42 |
! |
|
43 |
||
44 |
documentation |
|
45 |
" |
|
46 |
a refactored complex method - originally found in ByteCodeCompiler. |
|
47 |
" |
|
48 |
! ! |
|
49 |
||
50 |
!STCCompilerInterface class methodsFor:'accessing'! |
|
51 |
||
3685
4087099b6e26
STC interface clenaup: cleaned up C flags initialization
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3664
diff
changeset
|
52 |
builtinCFlags |
4087099b6e26
STC interface clenaup: cleaned up C flags initialization
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3664
diff
changeset
|
53 |
"Return C compiler flags that are always passed to the C compiler |
4087099b6e26
STC interface clenaup: cleaned up C flags initialization
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3664
diff
changeset
|
54 |
when a (ST)C file is compiled." |
4087099b6e26
STC interface clenaup: cleaned up C flags initialization
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3664
diff
changeset
|
55 |
|
4087099b6e26
STC interface clenaup: cleaned up C flags initialization
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3664
diff
changeset
|
56 |
^ OperatingSystem getCPUDefine , ' ', OperatingSystem getOSDefine |
4087099b6e26
STC interface clenaup: cleaned up C flags initialization
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3664
diff
changeset
|
57 |
|
4087099b6e26
STC interface clenaup: cleaned up C flags initialization
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3664
diff
changeset
|
58 |
"Created: / 04-12-2015 / 16:41:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
4087099b6e26
STC interface clenaup: cleaned up C flags initialization
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3664
diff
changeset
|
59 |
! |
4087099b6e26
STC interface clenaup: cleaned up C flags initialization
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3664
diff
changeset
|
60 |
|
3686
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
61 |
builtinCIncludeDirectories |
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
62 |
"Return C compiler include directories that are always passed to the C compiler |
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
63 |
when a (ST)C file is compiled." |
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
64 |
|
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
65 |
BuiltinCIncludeDirectories isNil ifTrue:[ |
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
66 |
| executablePath | |
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
67 |
(executablePath := OperatingSystem pathOfSTXExecutable) notNil ifTrue:[ |
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
68 |
executablePath := executablePath asFilename directory. |
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
69 |
((executablePath / 'include' / 'stc.h') exists |
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
70 |
or:[((executablePath := executablePath directory) / 'include' / 'stc.h') exists |
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
71 |
or:[((executablePath := executablePath directory) / 'include' / 'stc.h') exists]]) |
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
72 |
ifTrue:[ |
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
73 |
BuiltinCIncludeDirectories := '-I' , (executablePath / 'include') pathName. |
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
74 |
^ BuiltinCIncludeDirectories |
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
75 |
] |
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
76 |
]. |
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
77 |
^ '' |
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
78 |
]. |
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
79 |
^ BuiltinCIncludeDirectories |
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
80 |
|
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
81 |
" |
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
82 |
STCCompilerInterface builtinCIncludeDirectories |
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
83 |
" |
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
84 |
|
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
85 |
"Created: / 09-12-2015 / 16:54:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
86 |
! |
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
87 |
|
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
88 |
builtinCIncludeDirectories: aString |
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
89 |
"Set C compiler include directories that are always passed to the C compiler |
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
90 |
when a (ST)C file is compiled. |
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
91 |
This is an entry for init scripts for custom Smalltalk/X distributions which use |
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
92 |
different directory layout than just a plain St/X worktree (such as Smalltalk/X jv-branch). |
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
93 |
|
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
94 |
Note, that this is a string, so it must include '-I' |
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
95 |
" |
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
96 |
|
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
97 |
BuiltinCIncludeDirectories := aString |
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
98 |
|
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
99 |
"Created: / 09-12-2015 / 16:59:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
100 |
! |
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
101 |
|
1669 | 102 |
stcPathOf:command |
103 |
"return the path to an stc command, or nil if not found." |
|
104 |
||
105 |
|f d reqdSuffix cmd| |
|
106 |
||
107 |
"/ |
|
108 |
"/ care for executable suffix |
|
109 |
"/ |
|
110 |
cmd := command. |
|
111 |
OperatingSystem isMSDOSlike ifTrue:[ |
|
112 |
reqdSuffix := 'exe' |
|
113 |
] ifFalse:[ |
|
114 |
OperatingSystem isVMSlike ifTrue:[ |
|
115 |
reqdSuffix := 'EXE' |
|
116 |
]. |
|
117 |
]. |
|
118 |
reqdSuffix notNil ifTrue:[ |
|
119 |
(f := cmd asFilename) suffix isEmpty ifTrue:[ |
|
120 |
cmd := (f withSuffix:reqdSuffix) name |
|
121 |
] |
|
122 |
]. |
|
123 |
"/ |
|
124 |
"/ for our convenience, also check in current |
|
125 |
"/ and parent directories; even if PATH does not |
|
126 |
"/ include them ... |
|
127 |
"/ |
|
128 |
"/ look in current ... |
|
129 |
d := Filename currentDirectory. |
|
130 |
(f := d construct:cmd) isExecutable ifTrue:[ |
|
131 |
^ f pathName |
|
132 |
]. |
|
133 |
"/ look in ../stc ... |
|
134 |
d := d construct:'..'. |
|
135 |
(f := (d construct:'stc') construct:cmd) isExecutable ifTrue:[ |
|
136 |
^ f pathName |
|
137 |
]. |
|
138 |
"/ look in ../../stc ... |
|
139 |
d := d construct:'..'. |
|
140 |
(f := (d construct:'stc') construct:cmd) isExecutable ifTrue:[ |
|
141 |
^ f pathName |
|
142 |
]. |
|
143 |
||
144 |
"/ |
|
145 |
"/ ok, stc must be installed in some directory along the PATH |
|
146 |
"/ |
|
147 |
^ OperatingSystem pathOfCommand:command |
|
148 |
||
149 |
" |
|
150 |
STCCompilerInterface stcPathOf:'stc' |
|
151 |
" |
|
152 |
||
153 |
"Created: 13.9.1995 / 14:37:16 / claus" |
|
3173 | 154 |
! |
155 |
||
156 |
verbose |
|
157 |
"if on, trace command execution on the Transcript" |
|
158 |
||
159 |
^ Verbose |
|
160 |
! |
|
161 |
||
162 |
verbose:aBoolean |
|
163 |
"if on, trace command execution on the Transcript" |
|
164 |
||
165 |
Verbose := aBoolean |
|
3685
4087099b6e26
STC interface clenaup: cleaned up C flags initialization
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3664
diff
changeset
|
166 |
|
4087099b6e26
STC interface clenaup: cleaned up C flags initialization
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3664
diff
changeset
|
167 |
" |
4087099b6e26
STC interface clenaup: cleaned up C flags initialization
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3664
diff
changeset
|
168 |
STCCompilerInterface verbose: true. |
4087099b6e26
STC interface clenaup: cleaned up C flags initialization
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3664
diff
changeset
|
169 |
STCCompilerInterface verbose: false. |
4087099b6e26
STC interface clenaup: cleaned up C flags initialization
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3664
diff
changeset
|
170 |
" |
4087099b6e26
STC interface clenaup: cleaned up C flags initialization
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3664
diff
changeset
|
171 |
|
4087099b6e26
STC interface clenaup: cleaned up C flags initialization
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3664
diff
changeset
|
172 |
"Modified (comment): / 04-12-2015 / 16:44:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1669 | 173 |
! ! |
174 |
||
175 |
!STCCompilerInterface class methodsFor:'class initialization'! |
|
176 |
||
177 |
initialize |
|
178 |
Verbose := false. |
|
179 |
! ! |
|
180 |
||
181 |
!STCCompilerInterface methodsFor:'accessing'! |
|
182 |
||
2335 | 183 |
cFileName:something |
184 |
cFileName := something. |
|
185 |
! |
|
186 |
||
1669 | 187 |
incrementalStcPath |
188 |
"return the path to the stc command for incremental method compilation, |
|
189 |
or nil if not found." |
|
190 |
||
191 |
|f cmd| |
|
192 |
||
193 |
(cmd := parserFlags stcPath) isEmptyOrNil ifTrue:[ |
|
194 |
(f := self class stcPathOf:'stc') notNil ifTrue:[ |
|
195 |
cmd := f |
|
196 |
] ifFalse:[ |
|
197 |
cmd := self class stcPathOf:'demostc' |
|
198 |
] |
|
199 |
]. |
|
200 |
(cmd notNil and:[cmd includes:Character space]) ifTrue:[ |
|
201 |
cmd := '"' , cmd , '"'. |
|
202 |
]. |
|
203 |
^ cmd |
|
204 |
||
205 |
"Created: 13.9.1995 / 14:36:36 / claus" |
|
206 |
"Modified: 13.9.1995 / 15:15:04 / claus" |
|
207 |
! |
|
208 |
||
209 |
originator:something |
|
210 |
originator := something. |
|
211 |
! |
|
212 |
||
213 |
parserFlags:something |
|
214 |
parserFlags := something. |
|
2335 | 215 |
! |
216 |
||
217 |
stFileName:something |
|
218 |
stFileName := something. |
|
1669 | 219 |
! ! |
220 |
||
3411 | 221 |
!STCCompilerInterface methodsFor:'error raising'! |
222 |
||
223 |
parseError:messageText position:position |
|
224 |
originator parseError:messageText position:position. |
|
225 |
"not normally reached" |
|
226 |
ParseError raiseErrorString:messageText. |
|
227 |
! ! |
|
228 |
||
1669 | 229 |
!STCCompilerInterface methodsFor:'machine code generation'! |
230 |
||
1939 | 231 |
compileToMachineCode:aString forClass:aClass selector:selector inCategory:categoryArg |
232 |
notifying:requestorArg install:install skipIfSame:skipIfSame silent:silent |
|
1669 | 233 |
"this is called to compile primitive code. |
3357 | 234 |
It saves the code to a tmporary, calls stc to create C-code, compiles it, links |
235 |
it to a tiny little dll and loads it. |
|
236 |
As you already see, this takes some time and is therefore ONLY done for code containing prims; |
|
237 |
all pure smalltalk code is compiled to bytecode and jitted by the VM." |
|
1669 | 238 |
|
3042 | 239 |
|handle oldMethod newMethod ok dllFileName| |
1669 | 240 |
|
241 |
install ifFalse:[ |
|
242 |
"/ cannot do it uninstalled. reason: |
|
243 |
"/ if it is loaded twice, the first version could be unloaded by |
|
244 |
"/ finalization, which would also unload the second version |
|
245 |
"/ (because the first unload would unload the second version too) |
|
246 |
^ #CannotLoad |
|
247 |
]. |
|
2704
19bedf5ff15e
changed: #compileToMachineCode:forClass:selector:inCategory:notifying:install:skipIfSame:silent:
Claus Gittinger <cg@exept.de>
parents:
2703
diff
changeset
|
248 |
parserFlags isNil ifTrue:[ |
19bedf5ff15e
changed: #compileToMachineCode:forClass:selector:inCategory:notifying:install:skipIfSame:silent:
Claus Gittinger <cg@exept.de>
parents:
2703
diff
changeset
|
249 |
parserFlags := ParserFlags new |
19bedf5ff15e
changed: #compileToMachineCode:forClass:selector:inCategory:notifying:install:skipIfSame:silent:
Claus Gittinger <cg@exept.de>
parents:
2703
diff
changeset
|
250 |
]. |
1669 | 251 |
parserFlags stcCompilation == #never ifTrue:[^ #CannotLoad]. |
1670 | 252 |
|
1939 | 253 |
classToCompileFor := aClass. |
254 |
requestor := requestorArg. |
|
255 |
methodCategory := categoryArg. |
|
1669 | 256 |
|
3411 | 257 |
self ensureExternalToolsArePresent. |
1939 | 258 |
self ensureModuleDirectoryExists. |
1669 | 259 |
|
1939 | 260 |
theNonMetaclassToCompileFor := classToCompileFor theNonMetaclass. |
1941 | 261 |
|
1939 | 262 |
self ensureSuperClassesAreLoadedOf:theNonMetaclassToCompileFor. |
263 |
theNonMetaclassToCompileFor privateClassesSorted do:[:aPrivateClass | |
|
1670 | 264 |
self ensureSuperClassesAreLoadedOf:aPrivateClass. |
265 |
]. |
|
266 |
||
1939 | 267 |
(classToCompileFor isNil |
268 |
or:[parserFlags allowExtensionsToPrivateClasses |
|
269 |
or:[classToCompileFor owningClass isNil]]) ifTrue:[ |
|
270 |
(requestor respondsTo:#packageToInstall) ifFalse:[ |
|
271 |
package := Class packageQuerySignal query. |
|
272 |
] ifTrue:[ |
|
273 |
package := requestor packageToInstall |
|
274 |
]. |
|
275 |
] ifFalse:[ |
|
276 |
package := classToCompileFor owningClass package |
|
1669 | 277 |
]. |
278 |
||
279 |
[ |
|
1939 | 280 |
self generateSTSource:aString. |
281 |
self setupCompilationCommandArguments. |
|
282 |
ok := self compileToC. |
|
3042 | 283 |
ok ifFalse:[ |
284 |
self reportCompilationErrorFor:stcPath. |
|
1669 | 285 |
]. |
286 |
||
3042 | 287 |
parserFlags stcKeepSIntermediate ifTrue:[ self compileToS ]. |
288 |
"/ now compile to machine code |
|
289 |
ok := self compileToObj. |
|
1669 | 290 |
ok ifFalse:[ |
3005 | 291 |
self reportCompilationErrorFor:ccPath. |
1669 | 292 |
]. |
293 |
||
294 |
originator activityNotification:''. |
|
295 |
OperatingSystem removeFile:'errorOutput'. |
|
296 |
||
297 |
" |
|
298 |
if required, make a shared or otherwise loadable object file for it |
|
299 |
" |
|
300 |
originator activityNotification:'linking'. |
|
2656 | 301 |
dllFileName := ObjectFileLoader createLoadableObjectFor:(oFileName asFilename withoutSuffix name). |
302 |
dllFileName isNil ifTrue:[ |
|
1669 | 303 |
"/ something went wrong |
3411 | 304 |
self parseError:('link error: ' , ObjectFileLoader lastError) position:1. |
1669 | 305 |
]. |
2656 | 306 |
dllFileName asFilename exists ifFalse:[ |
3411 | 307 |
self parseError:'link failed - cannot create machine code' position:1. |
1669 | 308 |
]. |
309 |
||
1939 | 310 |
oldMethod := classToCompileFor compiledMethodAt:selector. |
311 |
oldMethod notNil ifTrue:[package := oldMethod package]. |
|
3159 | 312 |
install ifTrue:[ |
313 |
(Smalltalk |
|
314 |
changeRequest:#methodInClass |
|
315 |
with:(Array with:classToCompileFor with:selector with:oldMethod)) ifFalse:[ |
|
316 |
^ #CannotLoad |
|
317 |
]. |
|
318 |
]. |
|
1669 | 319 |
|
320 |
" |
|
321 |
load the method objectfile |
|
322 |
" |
|
323 |
originator activityNotification:'loading'. |
|
3361 | 324 |
handle := ObjectFileLoader loadMethodObjectFile:dllFileName. |
325 |
originator activityNotification:''. |
|
1669 | 326 |
|
327 |
handle isNil ifTrue:[ |
|
3173 | 328 |
KeepIntermediateFiles ~~ true ifTrue:[ OperatingSystem removeFile:dllFileName ]. |
2185
cb311d08a486
changed #compileToMachineCode:forClass:selector:inCategory:notifying:install:skipIfSame:silent:
Stefan Vogel <sv@exept.de>
parents:
2068
diff
changeset
|
329 |
"catch, so that #CannotLoad processing is done" |
3069 | 330 |
ParseError catch:[ |
2185
cb311d08a486
changed #compileToMachineCode:forClass:selector:inCategory:notifying:install:skipIfSame:silent:
Stefan Vogel <sv@exept.de>
parents:
2068
diff
changeset
|
331 |
originator parseError:'dynamic load of machine code failed' position:1. |
cb311d08a486
changed #compileToMachineCode:forClass:selector:inCategory:notifying:install:skipIfSame:silent:
Stefan Vogel <sv@exept.de>
parents:
2068
diff
changeset
|
332 |
]. |
1669 | 333 |
^ #CannotLoad |
334 |
]. |
|
335 |
||
336 |
" |
|
337 |
did it work ? |
|
338 |
" |
|
1939 | 339 |
newMethod := classToCompileFor compiledMethodAt:selector. |
1669 | 340 |
|
341 |
"/ if install is false, we have to undo the install (which is always done, when loading machine code) |
|
342 |
install ifFalse:[ |
|
343 |
oldMethod isNil ifTrue:[ |
|
1939 | 344 |
classToCompileFor removeSelector:selector |
1669 | 345 |
] ifFalse:[ |
346 |
newMethod setPackage:oldMethod package. |
|
1939 | 347 |
classToCompileFor addSelector:selector withMethod:oldMethod. |
348 |
oldMethod setPackage:package. |
|
1669 | 349 |
] |
350 |
]. |
|
351 |
||
352 |
newMethod notNil ifTrue:[ |
|
353 |
handle method ~~ newMethod ifTrue:[ |
|
354 |
'Compiler [warning]: loaded method installed itself in another class' errorPrintCR. |
|
355 |
]. |
|
356 |
||
357 |
newMethod source:aString string. |
|
1939 | 358 |
newMethod setPackage:package. |
1669 | 359 |
"/ Project notNil ifTrue:[ |
360 |
"/ newMethod package:(Project currentPackageName) |
|
361 |
"/ ]. |
|
362 |
||
1939 | 363 |
"/ classToCompileFor updateRevisionString. |
1669 | 364 |
install ifTrue:[ |
1939 | 365 |
classToCompileFor addChangeRecordForMethod:newMethod fromOld:oldMethod. |
1669 | 366 |
|
367 |
"/ kludge-sigh: must send change messages manually here (stc-loaded code does not do it) |
|
368 |
"/ see addMethod:... in ClassDescription |
|
1939 | 369 |
classToCompileFor changed:#methodDictionary with:(Array with:selector with:oldMethod). |
370 |
Smalltalk changed:#methodInClass with:(Array with:classToCompileFor with:selector with:oldMethod). |
|
2350
16caba266df4
changed: #compileToMachineCode:forClass:selector:inCategory:notifying:install:skipIfSame:silent:
Stefan Vogel <sv@exept.de>
parents:
2336
diff
changeset
|
371 |
] ifFalse:[ |
16caba266df4
changed: #compileToMachineCode:forClass:selector:inCategory:notifying:install:skipIfSame:silent:
Stefan Vogel <sv@exept.de>
parents:
2336
diff
changeset
|
372 |
oldMethod := nil. |
1669 | 373 |
]. |
374 |
||
1986 | 375 |
silent ifFalse:[ |
1941 | 376 |
Transcript showCR:(' compiled: ', aClass name,' ',selector,' - machine code') |
1669 | 377 |
]. |
378 |
ObjectMemory flushCaches. |
|
379 |
||
380 |
handle method:newMethod. |
|
381 |
||
2350
16caba266df4
changed: #compileToMachineCode:forClass:selector:inCategory:notifying:install:skipIfSame:silent:
Stefan Vogel <sv@exept.de>
parents:
2336
diff
changeset
|
382 |
"/ check for obsolete compiled method code and unload the |
16caba266df4
changed: #compileToMachineCode:forClass:selector:inCategory:notifying:install:skipIfSame:silent:
Stefan Vogel <sv@exept.de>
parents:
2336
diff
changeset
|
383 |
"/ corresponding ObjectFileHandle. |
16caba266df4
changed: #compileToMachineCode:forClass:selector:inCategory:notifying:install:skipIfSame:silent:
Stefan Vogel <sv@exept.de>
parents:
2336
diff
changeset
|
384 |
"/ The old method with its source code is usually kept in the method history. |
16caba266df4
changed: #compileToMachineCode:forClass:selector:inCategory:notifying:install:skipIfSame:silent:
Stefan Vogel <sv@exept.de>
parents:
2336
diff
changeset
|
385 |
"/ and will be recompiled on an undo |
1669 | 386 |
|
387 |
ObjectFileLoader loadedObjectHandlesDo:[:anotherHandle | |
|
388 |
anotherHandle isMethodHandle ifTrue:[ |
|
2350
16caba266df4
changed: #compileToMachineCode:forClass:selector:inCategory:notifying:install:skipIfSame:silent:
Stefan Vogel <sv@exept.de>
parents:
2336
diff
changeset
|
389 |
anotherHandle method == oldMethod ifTrue:[ |
16caba266df4
changed: #compileToMachineCode:forClass:selector:inCategory:notifying:install:skipIfSame:silent:
Stefan Vogel <sv@exept.de>
parents:
2336
diff
changeset
|
390 |
"break association betwen old method, code and handle" |
16caba266df4
changed: #compileToMachineCode:forClass:selector:inCategory:notifying:install:skipIfSame:silent:
Stefan Vogel <sv@exept.de>
parents:
2336
diff
changeset
|
391 |
anotherHandle removeConnectedObjects. |
16caba266df4
changed: #compileToMachineCode:forClass:selector:inCategory:notifying:install:skipIfSame:silent:
Stefan Vogel <sv@exept.de>
parents:
2336
diff
changeset
|
392 |
]. |
16caba266df4
changed: #compileToMachineCode:forClass:selector:inCategory:notifying:install:skipIfSame:silent:
Stefan Vogel <sv@exept.de>
parents:
2336
diff
changeset
|
393 |
anotherHandle isObsolete ifTrue:[ |
16caba266df4
changed: #compileToMachineCode:forClass:selector:inCategory:notifying:install:skipIfSame:silent:
Stefan Vogel <sv@exept.de>
parents:
2336
diff
changeset
|
394 |
anotherHandle unload. |
16caba266df4
changed: #compileToMachineCode:forClass:selector:inCategory:notifying:install:skipIfSame:silent:
Stefan Vogel <sv@exept.de>
parents:
2336
diff
changeset
|
395 |
anotherHandle removeUnusedObjectFile. |
16caba266df4
changed: #compileToMachineCode:forClass:selector:inCategory:notifying:install:skipIfSame:silent:
Stefan Vogel <sv@exept.de>
parents:
2336
diff
changeset
|
396 |
]. |
16caba266df4
changed: #compileToMachineCode:forClass:selector:inCategory:notifying:install:skipIfSame:silent:
Stefan Vogel <sv@exept.de>
parents:
2336
diff
changeset
|
397 |
]. |
1669 | 398 |
]. |
399 |
^ newMethod. |
|
400 |
]. |
|
401 |
||
3013 | 402 |
"/ OperatingSystem removeFile:moduleFileName. |
3411 | 403 |
self parseError:'dynamic load failed' position:1. |
1669 | 404 |
] ensure:[ |
3173 | 405 |
KeepIntermediateFiles == true ifTrue:[ |
406 |
Transcript showCR:'keeping files' |
|
2703
2e966ec31082
changed: #compileToMachineCode:forClass:selector:inCategory:notifying:install:skipIfSame:silent:
Claus Gittinger <cg@exept.de>
parents:
2658
diff
changeset
|
407 |
] ifFalse:[ |
3173 | 408 |
parserFlags stcKeepSTIntermediate ifTrue:[ |
409 |
Transcript showCR:'keeping st file: ', stFileName asFilename pathName |
|
410 |
] ifFalse:[ |
|
411 |
OperatingSystem removeFile:stFileName. |
|
412 |
OperatingSystem removeFile:'errorOutput'. |
|
413 |
]. |
|
414 |
cFileName notNil ifTrue:[ |
|
415 |
parserFlags stcKeepCIntermediate == true ifTrue:[ |
|
416 |
Transcript showCR:'keeping c file: ', cFileName asFilename pathName |
|
417 |
] ifFalse:[ |
|
418 |
OperatingSystem removeFile:cFileName. |
|
419 |
] |
|
420 |
]. |
|
421 |
oFileName notNil ifTrue:[ |
|
422 |
parserFlags stcKeepOIntermediate == true ifTrue:[ |
|
423 |
Transcript showCR:'keeping o file: ', oFileName asFilename pathName |
|
424 |
] ifFalse:[ |
|
425 |
OperatingSystem removeFile:oFileName. |
|
426 |
]. |
|
427 |
]. |
|
428 |
"/ OperatingSystem isMSDOSlike ifTrue:[ |
|
429 |
"/ mapFileName notNil ifTrue:[ |
|
430 |
"/ OperatingSystem removeFile:mapFileName. |
|
431 |
"/ ]. |
|
432 |
"/ libFileName notNil ifTrue:[ |
|
433 |
"/ OperatingSystem removeFile:libFileName. |
|
434 |
"/ ]. |
|
435 |
"/ ]. |
|
436 |
] |
|
1669 | 437 |
]. |
438 |
||
439 |
" |
|
440 |
|m| |
|
441 |
||
442 |
Object subclass:#Test |
|
443 |
instanceVariableNames:'' |
|
444 |
classVariableNames:'' |
|
445 |
poolDictionaries:'' |
|
446 |
category:'tests'. |
|
447 |
m := ByteCodeCompiler |
|
448 |
compile:'foo ^ ''hello''' |
|
449 |
forClass:Test |
|
450 |
inCategory:'tests' |
|
451 |
notifying:nil |
|
452 |
install:false |
|
453 |
skipIfSame:false. |
|
454 |
m inspect |
|
455 |
" |
|
456 |
" |
|
457 |
|m| |
|
458 |
||
459 |
Object subclass:#Test |
|
460 |
instanceVariableNames:'' |
|
461 |
classVariableNames:'' |
|
462 |
poolDictionaries:'' |
|
463 |
category:'tests'. |
|
464 |
m := ByteCodeCompiler |
|
465 |
compileToMachineCode:'foo %{ RETURN (_MKSMALLINT(1)); %}' |
|
466 |
forClass:Test |
|
467 |
inCategory:'tests' |
|
468 |
notifying:nil |
|
469 |
install:false |
|
470 |
skipIfSame:false |
|
471 |
silent:false. |
|
472 |
m inspect |
|
473 |
" |
|
474 |
||
1939 | 475 |
"Modified: / 14-09-1995 / 22:33:04 / claus" |
476 |
"Modified: / 19-03-1999 / 08:31:42 / stefan" |
|
2704
19bedf5ff15e
changed: #compileToMachineCode:forClass:selector:inCategory:notifying:install:skipIfSame:silent:
Claus Gittinger <cg@exept.de>
parents:
2703
diff
changeset
|
477 |
"Modified: / 17-09-2011 / 10:39:25 / cg" |
1939 | 478 |
! ! |
479 |
||
480 |
!STCCompilerInterface methodsFor:'machine code generation-helpers'! |
|
481 |
||
482 |
compileToC |
|
483 |
"compile st to C using stc" |
|
484 |
||
485 |
|command errorStream ok| |
|
486 |
||
2658 | 487 |
command := (self possiblyQuotedPath:stcPath) , ' ' , stcFlags |
3170 | 488 |
, ' -defdir=', (self possiblyQuotedPath:cFileName asFilename directory pathName). |
3659 | 489 |
cFileName asFilename suffix ~= 'c' ifTrue:[ |
3170 | 490 |
command := command , ' -cSuffix=',cFileName asFilename suffix. |
491 |
]. |
|
492 |
command := command , |
|
2658 | 493 |
' -C ' , (self possiblyQuotedPath:stFileName asFilename pathName). |
3170 | 494 |
|
1939 | 495 |
errorStream := 'errorOutput' asFilename writeStream. |
496 |
||
497 |
Verbose == true ifTrue:[ |
|
498 |
'executing: ' infoPrint. command infoPrintCR. |
|
499 |
]. |
|
500 |
||
501 |
originator activityNotification:'compiling (stc)'. |
|
502 |
ok := OperatingSystem |
|
503 |
executeCommand:command |
|
504 |
inputFrom:nil |
|
505 |
outputTo:errorStream |
|
506 |
errorTo:errorStream |
|
507 |
onError:[:stat| |
|
508 |
executionStatus := stat. |
|
509 |
false |
|
510 |
]. |
|
511 |
||
512 |
errorStream close. |
|
513 |
||
514 |
cFileName asFilename exists ifTrue:[ |
|
515 |
ok ifFalse:[ |
|
516 |
'Compiler [info]: oops - system says stc failed - but c-file is there ...' infoPrintCR. |
|
517 |
ok := true |
|
518 |
] |
|
519 |
] ifFalse:[ |
|
520 |
ok ifTrue:[ |
|
521 |
'Compiler [info]: oops - system says stc ok - but no c-file is there ...' infoPrintCR. |
|
522 |
]. |
|
523 |
ok := false |
|
524 |
]. |
|
525 |
^ ok |
|
526 |
||
527 |
"Created: / 07-11-2006 / 12:11:24 / cg" |
|
2643
60d2bae2be58
comment/format in: #generateSTSource:
Claus Gittinger <cg@exept.de>
parents:
2491
diff
changeset
|
528 |
"Modified: / 08-08-2011 / 22:12:01 / cg" |
1939 | 529 |
! |
530 |
||
2336 | 531 |
compileToExe |
532 |
"compile C to exe, using cc" |
|
533 |
||
534 |
|command errorStream ok| |
|
535 |
||
536 |
errorStream := 'errorOutput' asFilename newReadWriteStream. |
|
537 |
||
2658 | 538 |
command := (self possiblyQuotedPath:ccPath) , ' ' , cFlags , ' -D__INCREMENTAL_COMPILE__ ' , (self possiblyQuotedPath:cFileName). |
2336 | 539 |
|
540 |
Verbose == true ifTrue:[ |
|
541 |
'executing: ' infoPrint. command infoPrintCR. |
|
542 |
]. |
|
543 |
originator activityNotification:'compiling (' , ccPath , ')'. |
|
544 |
ok := OperatingSystem |
|
545 |
executeCommand:command |
|
546 |
inputFrom:nil |
|
547 |
outputTo:errorStream |
|
548 |
errorTo:errorStream |
|
549 |
onError:[:stat| |
|
550 |
executionStatus := stat. |
|
551 |
false |
|
552 |
]. |
|
553 |
||
554 |
ok ifFalse:[ |
|
555 |
errorStream reset. |
|
556 |
errorStream copyToEndInto:Transcript. |
|
557 |
]. |
|
558 |
||
559 |
errorStream close. |
|
560 |
||
561 |
^ ok |
|
562 |
! |
|
563 |
||
1939 | 564 |
compileToObj |
565 |
"compile C to obj, using cc" |
|
566 |
||
3423 | 567 |
|errorStream ok commandTemplate command ccDefine env| |
1939 | 568 |
|
2195
2996fe27c2f8
Add primitive functions when compiling
Stefan Vogel <sv@exept.de>
parents:
2185
diff
changeset
|
569 |
errorStream := 'errorOutput' asFilename newReadWriteStream. |
1939 | 570 |
|
3170 | 571 |
"/ bcc does not like -D__BORLANDC__ (needs to be set to a version, such as 0x0505 |
572 |
"/ others do not need it (is already predefined in the compiler) |
|
573 |
"/ ccDefine := ' -D',ParserFlags usedCompilerDefine. |
|
3173 | 574 |
"/ so, never redefine ccDefine |
3170 | 575 |
ccDefine := ''. |
576 |
||
3010
7970294627a3
flag settings for 64bit mingw
Claus Gittinger <cg@exept.de>
parents:
3005
diff
changeset
|
577 |
ParserFlags useBorlandC ifTrue:[ |
7970294627a3
flag settings for 64bit mingw
Claus Gittinger <cg@exept.de>
parents:
3005
diff
changeset
|
578 |
"Note: Windows/bcc32 does not understand a space between -o and filename" |
7970294627a3
flag settings for 64bit mingw
Claus Gittinger <cg@exept.de>
parents:
3005
diff
changeset
|
579 |
"/ cg: I guess, this does not work for visual-c |
3423 | 580 |
commandTemplate := '%1 %2%3 -D__INCREMENTAL_COMPILE__ -o%4 -c %5'. |
3010
7970294627a3
flag settings for 64bit mingw
Claus Gittinger <cg@exept.de>
parents:
3005
diff
changeset
|
581 |
] ifFalse:[ |
3423 | 582 |
commandTemplate := '%1 %2%3 -D__INCREMENTAL_COMPILE__ -o %4 -c %5'. |
3010
7970294627a3
flag settings for 64bit mingw
Claus Gittinger <cg@exept.de>
parents:
3005
diff
changeset
|
583 |
]. |
3423 | 584 |
command := commandTemplate |
585 |
bindWith:(self possiblyQuotedPath:ccPath) |
|
586 |
with:cFlags |
|
587 |
with:ccDefine |
|
588 |
with:(self possiblyQuotedPath:oFileName) |
|
589 |
with:(self possiblyQuotedPath:cFileName). |
|
1939 | 590 |
|
591 |
Verbose == true ifTrue:[ |
|
592 |
'executing: ' infoPrint. command infoPrintCR. |
|
593 |
]. |
|
594 |
originator activityNotification:'compiling (' , ccPath , ')'. |
|
3423 | 595 |
|
596 |
env := OperatingSystem isUNIXlike |
|
597 |
ifTrue:[OperatingSystem getEnvironment copy] |
|
598 |
ifFalse:[env := Dictionary new]. |
|
599 |
env at:'LANG' put:'C'. |
|
600 |
env at:'LC_MESSAGES' put:'C'. |
|
601 |
||
3694
e89d2870030c
STC interface clenaup: fixed compilation inder MINGW(32)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3686
diff
changeset
|
602 |
"/ When compiling using MINGW32/64, the bin directory |
e89d2870030c
STC interface clenaup: fixed compilation inder MINGW(32)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3686
diff
changeset
|
603 |
"/ must be in path since compiler uses some .dlls found there |
e89d2870030c
STC interface clenaup: fixed compilation inder MINGW(32)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3686
diff
changeset
|
604 |
"/ (an otherwise, they won't be found) |
e89d2870030c
STC interface clenaup: fixed compilation inder MINGW(32)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3686
diff
changeset
|
605 |
(ParserFlags useMingw32 or:[ ParserFlags useMingw64 ]) ifTrue:[ |
e89d2870030c
STC interface clenaup: fixed compilation inder MINGW(32)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3686
diff
changeset
|
606 |
"/ JV @ 2016-01-04: I dunno why, but adding new, fixed path to env variable passed |
e89d2870030c
STC interface clenaup: fixed compilation inder MINGW(32)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3686
diff
changeset
|
607 |
"/ to executeCommand:...environment:... below does not work. |
e89d2870030c
STC interface clenaup: fixed compilation inder MINGW(32)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3686
diff
changeset
|
608 |
"/ Modifying this very process own environment works, though, |
e89d2870030c
STC interface clenaup: fixed compilation inder MINGW(32)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3686
diff
changeset
|
609 |
| path | |
e89d2870030c
STC interface clenaup: fixed compilation inder MINGW(32)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3686
diff
changeset
|
610 |
|
e89d2870030c
STC interface clenaup: fixed compilation inder MINGW(32)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3686
diff
changeset
|
611 |
path := OperatingSystem getEnvironment: 'PATH'. |
e89d2870030c
STC interface clenaup: fixed compilation inder MINGW(32)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3686
diff
changeset
|
612 |
(path includesSubstring: ccPath) ifFalse:[ |
e89d2870030c
STC interface clenaup: fixed compilation inder MINGW(32)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3686
diff
changeset
|
613 |
OperatingSystem setEnvironment: 'PATH' to: path , ';', ccPath asFilename directory pathName |
e89d2870030c
STC interface clenaup: fixed compilation inder MINGW(32)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3686
diff
changeset
|
614 |
]. |
e89d2870030c
STC interface clenaup: fixed compilation inder MINGW(32)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3686
diff
changeset
|
615 |
]. |
e89d2870030c
STC interface clenaup: fixed compilation inder MINGW(32)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3686
diff
changeset
|
616 |
|
1939 | 617 |
ok := OperatingSystem |
618 |
executeCommand:command |
|
619 |
inputFrom:nil |
|
620 |
outputTo:errorStream |
|
621 |
errorTo:errorStream |
|
3423 | 622 |
environment:env |
1939 | 623 |
onError:[:stat| |
624 |
executionStatus := stat. |
|
625 |
false |
|
2195
2996fe27c2f8
Add primitive functions when compiling
Stefan Vogel <sv@exept.de>
parents:
2185
diff
changeset
|
626 |
]. |
2996fe27c2f8
Add primitive functions when compiling
Stefan Vogel <sv@exept.de>
parents:
2185
diff
changeset
|
627 |
|
2996fe27c2f8
Add primitive functions when compiling
Stefan Vogel <sv@exept.de>
parents:
2185
diff
changeset
|
628 |
ok ifFalse:[ |
2996fe27c2f8
Add primitive functions when compiling
Stefan Vogel <sv@exept.de>
parents:
2185
diff
changeset
|
629 |
errorStream reset. |
3437 | 630 |
errorStream contents do:[:l | Transcript showCR:(OperatingSystem decodePathOrCommandOutput: l)]. |
2195
2996fe27c2f8
Add primitive functions when compiling
Stefan Vogel <sv@exept.de>
parents:
2185
diff
changeset
|
631 |
]. |
1939 | 632 |
|
633 |
errorStream close. |
|
634 |
||
635 |
oFileName asFilename exists ifTrue:[ |
|
636 |
ok ifFalse:[ |
|
637 |
'Compiler [info]: system says compile failed - but o-file is there ...' infoPrintCR. |
|
638 |
ok := true |
|
639 |
] |
|
640 |
] ifFalse:[ |
|
641 |
ok ifTrue:[ |
|
642 |
'Compiler [info]: system says compile ok - but no o-file is there ...' infoPrintCR. |
|
643 |
]. |
|
644 |
ok := false |
|
645 |
]. |
|
646 |
^ ok |
|
647 |
||
648 |
"Created: / 07-11-2006 / 12:14:51 / cg" |
|
3694
e89d2870030c
STC interface clenaup: fixed compilation inder MINGW(32)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3686
diff
changeset
|
649 |
"Modified: / 04-01-2016 / 21:12:56 / jv" |
1939 | 650 |
! |
651 |
||
2491 | 652 |
compileToS |
653 |
"compile C to assembler, using cc" |
|
654 |
||
655 |
|command errorStream ok| |
|
656 |
||
657 |
errorStream := 'errorOutput' asFilename newReadWriteStream. |
|
658 |
||
2658 | 659 |
command := (self possiblyQuotedPath:ccPath) , ' ' , cFlags , ' -D__INCREMENTAL_COMPILE__ -S ' , (self possiblyQuotedPath:cFileName). |
2491 | 660 |
|
661 |
Verbose == true ifTrue:[ |
|
662 |
'executing: ' infoPrint. command infoPrintCR. |
|
663 |
]. |
|
664 |
originator activityNotification:'compiling (' , ccPath , ')'. |
|
665 |
ok := OperatingSystem |
|
666 |
executeCommand:command |
|
667 |
inputFrom:nil |
|
668 |
outputTo:errorStream |
|
669 |
errorTo:errorStream |
|
670 |
onError:[:stat| |
|
671 |
executionStatus := stat. |
|
672 |
false |
|
673 |
]. |
|
674 |
||
675 |
ok ifFalse:[ |
|
676 |
errorStream reset. |
|
677 |
errorStream copyToEndInto:Transcript. |
|
678 |
]. |
|
679 |
||
680 |
errorStream close. |
|
681 |
^ ok |
|
682 |
! |
|
683 |
||
1939 | 684 |
ensureExternalToolsArePresent |
685 |
(stcPath := self incrementalStcPath) isNil ifTrue:[ |
|
3411 | 686 |
self parseError:'no stc compiler available - cannot create machine code' position:1. |
1939 | 687 |
]. |
2649 | 688 |
|
689 |
"make it absolute, so that we are immune to directory changes" |
|
690 |
stcPath := stcPath asFilename pathName. |
|
1939 | 691 |
(ccPath := parserFlags ccPath) isNil ifTrue:[ |
3411 | 692 |
self parseError:'no cc compiler available - cannot create machine code' position:1. |
1939 | 693 |
]. |
2649 | 694 |
"make it absolute, so that we are immune to directory changes" |
695 |
ccPath := ccPath asFilename pathName. |
|
1939 | 696 |
|
697 |
(ObjectFileLoader notNil and:[ObjectFileLoader canLoadObjectFiles]) ifFalse:[ |
|
3411 | 698 |
self parseError:'no dynamic loader configured - cannot create machine code' position:1. |
1939 | 699 |
]. |
700 |
||
701 |
"Created: / 07-11-2006 / 12:31:48 / cg" |
|
1670 | 702 |
! |
703 |
||
704 |
ensureModuleDirectoryExists |
|
3664 | 705 |
|mP t msg| |
1670 | 706 |
|
3411 | 707 |
mP := parserFlags stcModulePath. |
708 |
mP isEmptyOrNil ifTrue:[ |
|
709 |
self parseError:'No temporary module directory, check your settings!!' position:1. |
|
710 |
]. |
|
711 |
mP := mP asFilename. |
|
712 |
mP exists ifFalse:[ |
|
1670 | 713 |
mP makeDirectory |
714 |
]. |
|
3240 | 715 |
(mP isWritableDirectory and:[mP isReadable]) ifFalse:[ |
3664 | 716 |
(mP exists and:[mP isDirectory]) ifTrue:[ |
717 |
msg := 'No write permission in temporary module directory: '. |
|
718 |
] ifFalse:[ |
|
719 |
msg := 'No access to temporary module directory: '. |
|
720 |
]. |
|
721 |
self parseError:(msg , mP pathName) position:1. |
|
1670 | 722 |
]. |
3664 | 723 |
|
1670 | 724 |
"/ create a small README there ... |
725 |
||
726 |
(t := mP construct:'README') exists ifFalse:[ |
|
3411 | 727 |
t contents:'This temporary ST/X directory contains machine code for |
1670 | 728 |
accepted methods with embedded C-code |
729 |
(i.e. dynamic compiled code for inline-C methods). |
|
730 |
||
731 |
Files here are not automatically removed, since ST/X |
|
732 |
cannot determine if any (other) snapshot image still |
|
733 |
requires a file here. |
|
734 |
||
735 |
Please be careful when removing files here - a snapshot |
|
736 |
image which was saved with accepted embedded C-code |
|
737 |
may not be able to restart correctly if you remove a |
|
738 |
required file. |
|
739 |
Also, when you export a snapshot image for execution |
|
740 |
on another machine, make certain that the required |
|
741 |
module-files are also present there. |
|
742 |
||
743 |
You should periodically clean dead entries here. |
|
744 |
i.e. remove files, when you are certain that none |
|
745 |
of your snapshot images refers to any module here. |
|
746 |
||
747 |
See the launchers File-Modules dialog for a list of |
|
748 |
modules which are still required by your running image. |
|
749 |
||
750 |
With kind regards - your ST/X. |
|
751 |
'. |
|
752 |
]. |
|
753 |
! |
|
754 |
||
755 |
ensureSuperClassesAreLoadedOf:aClass |
|
756 |
|supers| |
|
757 |
||
758 |
supers := aClass allSuperclasses. |
|
759 |
supers reverseDo:[:cls| |
|
760 |
cls isLoaded ifFalse:[ |
|
3411 | 761 |
self parseError:('Cannot stc-compile (superclass %1 is unloaded)' bindWith:cls) position:1. |
1670 | 762 |
] |
763 |
]. |
|
764 |
! |
|
765 |
||
766 |
fileOutAllDefinitionsOf:aClass to:aStream rememberIn:definedClasses |
|
767 |
|defineAction| |
|
768 |
||
769 |
defineAction := |
|
770 |
[:cls| |
|
771 |
(definedClasses includes:cls) ifFalse:[ |
|
772 |
cls |
|
773 |
basicFileOutDefinitionOn:aStream |
|
774 |
withNameSpace:false withPackage:false |
|
775 |
syntaxHilighting:false. |
|
776 |
||
777 |
aStream nextPut:(aStream class chunkSeparator); cr. |
|
778 |
definedClasses add:cls. |
|
779 |
]. |
|
780 |
]. |
|
781 |
||
782 |
aClass allSuperclasses reverseDo:defineAction. |
|
783 |
defineAction value:aClass. |
|
1939 | 784 |
! |
785 |
||
786 |
generateSTSource:aString |
|
3359 | 787 |
|stream definedClasses sep className modulesDir ns nsName| |
1939 | 788 |
|
789 |
"/ generate a unique name, consisting of my processID and a sequence number |
|
790 |
"/ the processId is added to allow filein of modules from different |
|
791 |
"/ lifes |
|
792 |
||
793 |
SequenceNumber := (SequenceNumber ? 0) + 1. |
|
794 |
||
795 |
initName := 'm_' , OperatingSystem getProcessId printString, '_' , SequenceNumber printString. |
|
796 |
||
2646 | 797 |
"/ Smalltalk isSmalltalkDevelopmentSystem ifTrue:[ |
798 |
"/ modulesParentDir := Filename currentDirectory. |
|
799 |
"/ ] ifFalse:[ |
|
800 |
"/ modulesParentDir := Filename tempDirectory. |
|
801 |
"/ ]. |
|
802 |
"/ modulesDir := modulesParentDir construct:'modules'. |
|
803 |
modulesDir := ParserFlags stcModulePath. |
|
2647 | 804 |
stFileName := (modulesDir asFilename construct:(initName , '.st')) name. |
2646 | 805 |
|
1939 | 806 |
[ |
807 |
stream := stFileName asFilename writeStream. |
|
808 |
] on:FileStream openErrorSignal do:[:ex| |
|
3411 | 809 |
self parseError:'cannot create temporary sourcefile for compilation' position:1. |
1939 | 810 |
^ #CannotLoad |
811 |
]. |
|
3419 | 812 |
stream := EncodedStream stream:stream encoder:(CharacterEncoder encoderForUTF8). |
813 |
stream nextPutLine:'"{ Encoding: utf8 }" !!'. |
|
1939 | 814 |
|
815 |
definedClasses := IdentitySet new. |
|
816 |
||
817 |
sep := stream class chunkSeparator. |
|
818 |
||
819 |
Class fileOutNameSpaceQuerySignal answer:true |
|
820 |
do:[ |
|
2467 | 821 |
theNonMetaclassToCompileFor realSharedPoolNames do:[:eachPoolname | |
2067
6204fefb44a3
must also file-out the definition of sharedPools
Claus Gittinger <cg@exept.de>
parents:
2026
diff
changeset
|
822 |
|pool| |
6204fefb44a3
must also file-out the definition of sharedPools
Claus Gittinger <cg@exept.de>
parents:
2026
diff
changeset
|
823 |
|
6204fefb44a3
must also file-out the definition of sharedPools
Claus Gittinger <cg@exept.de>
parents:
2026
diff
changeset
|
824 |
pool := Smalltalk at:eachPoolname. |
6204fefb44a3
must also file-out the definition of sharedPools
Claus Gittinger <cg@exept.de>
parents:
2026
diff
changeset
|
825 |
self |
6204fefb44a3
must also file-out the definition of sharedPools
Claus Gittinger <cg@exept.de>
parents:
2026
diff
changeset
|
826 |
fileOutAllDefinitionsOf:pool |
6204fefb44a3
must also file-out the definition of sharedPools
Claus Gittinger <cg@exept.de>
parents:
2026
diff
changeset
|
827 |
to:stream |
6204fefb44a3
must also file-out the definition of sharedPools
Claus Gittinger <cg@exept.de>
parents:
2026
diff
changeset
|
828 |
rememberIn:definedClasses. |
6204fefb44a3
must also file-out the definition of sharedPools
Claus Gittinger <cg@exept.de>
parents:
2026
diff
changeset
|
829 |
]. |
6204fefb44a3
must also file-out the definition of sharedPools
Claus Gittinger <cg@exept.de>
parents:
2026
diff
changeset
|
830 |
|
1939 | 831 |
self |
832 |
fileOutAllDefinitionsOf:theNonMetaclassToCompileFor |
|
833 |
to:stream |
|
834 |
rememberIn:definedClasses. |
|
835 |
||
836 |
theNonMetaclassToCompileFor privateClassesSorted do:[:aPrivateClass | |
|
837 |
self |
|
838 |
fileOutAllDefinitionsOf:aPrivateClass |
|
839 |
to:stream |
|
840 |
rememberIn:definedClasses. |
|
841 |
]. |
|
2195
2996fe27c2f8
Add primitive functions when compiling
Stefan Vogel <sv@exept.de>
parents:
2185
diff
changeset
|
842 |
"/ theNonMetaclassToCompileFor fileOutPrimitiveDefinitionsOn:stream. |
2026 | 843 |
"/ If a method uses a static primitive function... - but this doesn't work |
2195
2996fe27c2f8
Add primitive functions when compiling
Stefan Vogel <sv@exept.de>
parents:
2185
diff
changeset
|
844 |
"/ Yes it does work, but primitive functions have to be strictly static!! |
2996fe27c2f8
Add primitive functions when compiling
Stefan Vogel <sv@exept.de>
parents:
2185
diff
changeset
|
845 |
theNonMetaclassToCompileFor fileOutPrimitiveSpecsOn:stream. |
1939 | 846 |
]. |
847 |
||
2026 | 848 |
"/ stream cr. |
849 |
"/ stream nextPutLine:'"{ Package: ''' , package , ''' }"'. |
|
850 |
"/ stream cr. |
|
1939 | 851 |
|
3357 | 852 |
className := theNonMetaclassToCompileFor name. |
853 |
ns := theNonMetaclassToCompileFor topNameSpace. |
|
3359 | 854 |
(ns notNil and:[ns ~= Smalltalk and:[nsName := ns name. className startsWith:(nsName,'::')]]) ifTrue:[ |
855 |
className := className copyFrom:nsName size+2+1. |
|
856 |
"/ split to avoid being regognized as a directive |
|
857 |
stream nextPutLine:('"','{ NameSpace: ',nsName,' }"'). |
|
3357 | 858 |
]. |
859 |
||
1939 | 860 |
stream nextPut:sep. |
861 |
stream nextPutAll:className. |
|
862 |
classToCompileFor isMeta ifTrue:[ |
|
863 |
stream nextPutAll:' class'. |
|
864 |
]. |
|
865 |
stream nextPutAll:' methodsFor:'''; nextPutAll:methodCategory; nextPutAll:''''. |
|
866 |
stream nextPut:sep; cr. |
|
867 |
||
868 |
stream nextPutLine:'"{ Line: 0 }"'; |
|
869 |
nextChunkPut:aString; |
|
870 |
space; nextPut:sep. |
|
871 |
||
872 |
stream close. |
|
873 |
||
2646 | 874 |
"Modified: / 08-08-2011 / 23:23:10 / cg" |
1939 | 875 |
! |
876 |
||
2658 | 877 |
possiblyQuotedPath:aPath |
3173 | 878 |
(aPath includes:Character space) ifTrue:[ |
2658 | 879 |
(aPath startsWith:'"') ifFalse:[ |
880 |
^ '"',aPath,'"' |
|
881 |
] |
|
882 |
]. |
|
883 |
^ aPath |
|
884 |
! |
|
885 |
||
3005 | 886 |
reportCompilationErrorFor:aCommand |
1939 | 887 |
|eMsg errorMessages lNr| |
888 |
||
889 |
(executionStatus notNil and:[executionStatus couldNotExecute]) ifTrue:[ |
|
3411 | 890 |
eMsg := 'oops, no %1 - cannot create machine code' bindWith:aCommand. |
1939 | 891 |
] ifFalse:[ |
3437 | 892 |
errorMessages := 'errorOutput' asFilename contents collect:[:l | OperatingSystem decodePathOrCommandOutput: l ]. |
1939 | 893 |
OperatingSystem removeFile:'errorOutput'. |
894 |
||
895 |
errorMessages notNil ifTrue:[ |
|
896 |
errorMessages := errorMessages reject:[:line | line includesString:'Warning:']. |
|
897 |
||
898 |
errorMessages size > 20 ifTrue:[ |
|
899 |
errorMessages := errorMessages select:[:line | line asLowercase startsWith:'error']. |
|
900 |
errorMessages size > 20 ifTrue:[ |
|
901 |
errorMessages := (errorMessages copyTo:20) copyWith:'... more messages skipped' |
|
902 |
]. |
|
903 |
]. |
|
904 |
"/ errorMessages := errorMessages collect:[:line | |
|
905 |
"/ (line startsWith:(stFileName , ':')) ifTrue:[ |
|
906 |
"/ 'Line: ' , (line copyFrom:(stFileName size + 2)) |
|
907 |
"/ ] ifFalse:[ |
|
908 |
"/ line |
|
909 |
"/ ] |
|
910 |
"/ ]. |
|
911 |
]. |
|
912 |
errorMessages isNil ifTrue:[ |
|
913 |
errorMessages := #('') |
|
914 |
]. |
|
3005 | 915 |
errorMessages := (Array with:'Failed to execute: "', aCommand,'"') , errorMessages. |
1939 | 916 |
|
917 |
"/ try to extract a line number" |
|
918 |
(errorMessages contains:[:line | line includesString:'Borland']) ifTrue:[ |
|
919 |
|i i2 s| |
|
920 |
i := errorMessages findFirst:[:l | l startsWith:(cFileName,':')]. |
|
921 |
i ~~ 0 ifTrue:[ |
|
922 |
((errorMessages at:i+1) startsWith:'Error') ifTrue:[ |
|
923 |
i2 := (errorMessages at:i+1) indexOfSubCollection:(stFileName). |
|
924 |
i2 ~~ 0 ifTrue:[ |
|
925 |
s := (errorMessages at:i+1) copyFrom:(i2+stFileName size+1). |
|
926 |
s := s readStream. |
|
927 |
lNr := Integer readFrom:s. |
|
928 |
s skipSeparators. |
|
929 |
]. |
|
930 |
] |
|
931 |
]. |
|
932 |
]. |
|
933 |
||
934 |
errorMessages isEmpty ifTrue:[ |
|
935 |
eMsg := 'Error during compilation:\\Unspecified error (no output)' withCRs |
|
936 |
] ifFalse:[ |
|
937 |
eMsg := 'Error during compilation:\\' withCRs , |
|
938 |
(errorMessages asStringCollection asString). |
|
939 |
]. |
|
940 |
]. |
|
2461
89458faaeeb3
changed: #reportCompilationError
Stefan Vogel <sv@exept.de>
parents:
2350
diff
changeset
|
941 |
|
1939 | 942 |
originator activityNotification:''. |
943 |
||
3069 | 944 |
ParseError new |
2461
89458faaeeb3
changed: #reportCompilationError
Stefan Vogel <sv@exept.de>
parents:
2350
diff
changeset
|
945 |
lineNumber:lNr; |
89458faaeeb3
changed: #reportCompilationError
Stefan Vogel <sv@exept.de>
parents:
2350
diff
changeset
|
946 |
errorMessage:eMsg; |
89458faaeeb3
changed: #reportCompilationError
Stefan Vogel <sv@exept.de>
parents:
2350
diff
changeset
|
947 |
raise. |
89458faaeeb3
changed: #reportCompilationError
Stefan Vogel <sv@exept.de>
parents:
2350
diff
changeset
|
948 |
|
1939 | 949 |
"Created: / 07-11-2006 / 12:29:04 / cg" |
3348
b59a15a24ab3
class: STCCompilerInterface
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3240
diff
changeset
|
950 |
"Modified: / 21-12-2013 / 00:08:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1939 | 951 |
! |
952 |
||
953 |
setupCompilationCommandArguments |
|
3685
4087099b6e26
STC interface clenaup: cleaned up C flags initialization
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3664
diff
changeset
|
954 |
|stFn libDir incDir incDirArg defs incl opts| |
2335 | 955 |
|
956 |
parserFlags isNil ifTrue:[ parserFlags := ParserFlags new]. |
|
1939 | 957 |
|
1941 | 958 |
stFn := stFileName asFilename. |
959 |
oFileName := stFn nameWithoutSuffix , (ObjectFileLoader objectFileExtension). |
|
960 |
cFileName := (stFn withSuffix:'c') name. |
|
3170 | 961 |
"/ ParserFlags useBorlandC ifTrue:[ |
962 |
"/ cFileName := (stFn withSuffix:'sc') name. |
|
963 |
"/ ]. |
|
1939 | 964 |
oFileName asFilename delete. |
965 |
cFileName asFilename delete. |
|
966 |
||
967 |
"/ stcFlags := '-commonSymbols +sharedLibCode +newIncremental -E:errorOutput -N' , initName . |
|
2335 | 968 |
stcFlags := '+newIncremental -E:errorOutput'. |
3659 | 969 |
initName notEmptyOrNil ifTrue:[ |
2335 | 970 |
stcFlags := stcFlags,' -N' , initName . |
971 |
]. |
|
3685
4087099b6e26
STC interface clenaup: cleaned up C flags initialization
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3664
diff
changeset
|
972 |
cFlags := self class builtinCFlags. |
1939 | 973 |
|
3659 | 974 |
(defs := parserFlags stcCompilationDefines) notEmptyOrNil ifTrue:[ |
2335 | 975 |
cFlags := cFlags , ' ' , defs |
1939 | 976 |
]. |
3686
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
977 |
stcFlags := stcFlags , ' ', self class builtinCIncludeDirectories. |
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
978 |
cFlags := cFlags , ' ', self class builtinCIncludeDirectories. |
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
979 |
|
3659 | 980 |
(incl := parserFlags stcCompilationIncludes) notEmptyOrNil ifTrue:[ |
2335 | 981 |
stcFlags := incl , ' ' , stcFlags. |
982 |
cFlags := cFlags , ' ' , incl. |
|
1939 | 983 |
|
984 |
"/ if STX_LIBDIR is defined, and not in passed argument, |
|
985 |
"/ add it here. |
|
986 |
||
987 |
libDir := OperatingSystem getEnvironment:'STX_LIBDIR'. |
|
988 |
(libDir notNil and:[libDir asFilename exists]) ifTrue:[ |
|
989 |
incDir := libDir asFilename construct:'include'. |
|
990 |
incDir exists ifTrue:[ |
|
991 |
incDirArg := '-I' , incDir pathName. |
|
2335 | 992 |
(incl asCollectionOfWords includes:incDirArg) ifFalse:[ |
1939 | 993 |
stcFlags := stcFlags , ' ' , incDirArg. |
994 |
cFlags := cFlags , ' ' , incDirArg. |
|
995 |
] |
|
996 |
] |
|
997 |
]. |
|
998 |
]. |
|
3659 | 999 |
(opts := parserFlags stcCompilationOptions) notEmptyOrNil ifTrue:[ |
2335 | 1000 |
stcFlags := opts , ' ' , stcFlags |
1939 | 1001 |
]. |
3659 | 1002 |
(opts := parserFlags ccCompilationOptions) notEmptyOrNil ifTrue:[ |
2335 | 1003 |
cFlags := cFlags , ' ' , opts |
1939 | 1004 |
]. |
1005 |
||
1006 |
"Created: / 07-11-2006 / 12:24:47 / cg" |
|
1941 | 1007 |
"Modified: / 07-11-2006 / 13:58:54 / cg" |
3686
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
1008 |
"Modified: / 09-12-2015 / 17:00:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1669 | 1009 |
! ! |
1010 |
||
1011 |
!STCCompilerInterface class methodsFor:'documentation'! |
|
1012 |
||
1013 |
version |
|
3659 | 1014 |
^ '$Header$' |
2335 | 1015 |
! |
1016 |
||
1017 |
version_CVS |
|
3659 | 1018 |
^ '$Header$' |
3686
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
1019 |
! |
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
1020 |
|
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
1021 |
version_HG |
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
1022 |
|
d8bf4414aa3d
STC interface clenaup: cleaned up C include directories initialization and settings
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3685
diff
changeset
|
1023 |
^ '$Changeset: <not expanded> $' |
1669 | 1024 |
! ! |
1025 |
||
3005 | 1026 |
|
1669 | 1027 |
STCCompilerInterface initialize! |