14 |
|
|
15 |
---------------------------------------------------------------------- |
---------------------------------------------------------------------- |
16 |
Name: Matthias Blume |
Name: Matthias Blume |
17 |
|
Date: 2001/07/19 15:00:00 EDT |
18 |
|
Tag: blume-20010719-libreorg |
19 |
|
Description: |
20 |
|
|
21 |
|
This update puts together a fairly extensive but straightforward change |
22 |
|
to the way the libraries that implement the interactive system are |
23 |
|
organized: |
24 |
|
|
25 |
|
The biggest change is the elimination of structure Compiler. As a |
26 |
|
replacement for this structure, there is now a CM library |
27 |
|
(known as $smlnj/compiler.cm or $smlnj/compiler/current.cm) |
28 |
|
that exports all the substructures of the original structure Compiler |
29 |
|
directly. So instead of saying Compiler.Foo.bar one now simply |
30 |
|
says Foo.bar. (The CM libraries actually export a collection of |
31 |
|
structures that is richer than the collection of substructures of |
32 |
|
structure Compiler.) |
33 |
|
|
34 |
|
To make the transition smooth, there is a separate library called |
35 |
|
$smlnj/compiler/compiler.cm which puts together and exports the |
36 |
|
original structure Compiler (or at least something very close to it). |
37 |
|
|
38 |
|
There are five members of the original structure Compiler |
39 |
|
that are not exported directly but which instead became members |
40 |
|
of a new structure Backend (described by signature BACKEND). These are: |
41 |
|
structure Profile (: PROFILE), structure Compile (: COMPILE), structure |
42 |
|
Interact (: INTERACT), structure Machine (: MACHINE), and val |
43 |
|
architecture (: string). |
44 |
|
|
45 |
|
Structure Compiler.Version has become structure CompilerVersion. |
46 |
|
|
47 |
|
Cross-compilers for alpha32, hppa, ppc, sparc, and x86 are provided |
48 |
|
by $smlnj/compiler/<arch>.cm where <arch> is alpha32, hppa, ppc, sparc, |
49 |
|
or x86, respectively. |
50 |
|
Each of these exports the same frontend structures that |
51 |
|
$smlnj/compiler.cm exports. But they do not have a structure Backend |
52 |
|
and instead export some structure <Arch>Backend where <Arch> is Alpha32, |
53 |
|
Hppa, PPC, Sparc, or X86, respectively. |
54 |
|
|
55 |
|
Library $smlnj/compiler/all.cm exports the union of the exports of |
56 |
|
$smlnj/compiler/<arch>.cm |
57 |
|
|
58 |
|
There are no structures <Arch>Compiler anymore, use |
59 |
|
$smlnj/compiler/<arch>.cm instead. |
60 |
|
|
61 |
|
Library host-compiler-0.cm is gone. Instead, the internal library |
62 |
|
that instantiates CM is now called cm0.cm. Selection of the host |
63 |
|
compiler (backend) is no longer done here but. (Responsibility for it |
64 |
|
now lies with $smlnj/compiler/current.cm. This seems to be more |
65 |
|
logical.) |
66 |
|
|
67 |
|
Many individual files have been moved or renamed. Some files have |
68 |
|
been split into multiple files, and some "dead" files have been deleted. |
69 |
|
|
70 |
|
Aside from these changes to library organization, there are also changes |
71 |
|
to the way the code itself is organized: |
72 |
|
|
73 |
|
Structure Binfile has been re-implemented in such a way that it no |
74 |
|
longer needs any knowledge of the compiler. It exclusively deals |
75 |
|
with the details of binfile layout. It no longer invokes the |
76 |
|
compiler (for the purpose of creating new prospective binfile |
77 |
|
content), and it no longer has any knowledge of how to interpret |
78 |
|
pickles. |
79 |
|
|
80 |
|
Structure Compile (: COMPILE) has been stripped down to the bare |
81 |
|
essentials of compilation. It no longer deals with linking/execution. |
82 |
|
The interface has been cleaned up considerably. |
83 |
|
|
84 |
|
Utility routines for dealing with linking and execution have been |
85 |
|
moved into their own substructures. |
86 |
|
|
87 |
|
(The ultimate goal of these changes is to provide a light-weight |
88 |
|
binfile loader/linker (at least for, e.g., stable libraries) that |
89 |
|
does not require CM or the compiler to be present.) |
90 |
|
|
91 |
|
CM documentation has been updated to reflect the changes to library |
92 |
|
organization. |
93 |
|
|
94 |
|
---------------------------------------------------------------------- |
95 |
|
Name: Matthias Blume |
96 |
|
Date: 2001/07/10 17:30:00 EDT |
97 |
|
Tag: Release_110_34 |
98 |
|
Description: |
99 |
|
|
100 |
|
Minor tweak to 110.34 (re-tagged): |
101 |
|
|
102 |
|
- README.html file added to CVS repository |
103 |
|
- runtime compiles properly under FreeBSD 3.X and 4.X |
104 |
|
|
105 |
|
---------------------------------------------------------------------- |
106 |
|
Name: Matthias Blume |
107 |
|
Date: 2001/07/10 17:30:00 EDT |
108 |
|
Tag: Release_110_34 |
109 |
|
Description: |
110 |
|
|
111 |
|
New version number (110.34). New bootfiles. |
112 |
|
|
113 |
|
---------------------------------------------------------------------- |
114 |
|
Name: Matthias Blume |
115 |
|
Date: 2001/07/09 16:00:00 EDT |
116 |
|
Tag: blume-20010709-more-varargs |
117 |
|
Description: |
118 |
|
|
119 |
|
I changed the handling of varargs in ml-nlffigen again: |
120 |
|
The ellipsis ... will now simply be ignored (with an accompanying warning). |
121 |
|
|
122 |
|
The immediate effect is that you can actually call a varargs function |
123 |
|
from ML -- but you can't actually supply any arguments beyond the ones |
124 |
|
specified explicitly. (For example, you can call printf with its format |
125 |
|
string, but you cannot pass additional arguments.) |
126 |
|
|
127 |
|
This behavior is only marginally more useful than the one before, but |
128 |
|
it has the advantage that a function or, more importantly, a function |
129 |
|
type never gets dropped on the floor, thus avoiding follow-up problems with |
130 |
|
other types that refer to the offending one. |
131 |
|
|
132 |
|
---------------------------------------------------------------------- |
133 |
|
Name: Matthias Blume |
134 |
|
Date: 2001/07/09 11:25:00 EDT |
135 |
|
Tag: blume-20010709-varargs |
136 |
|
Description: |
137 |
|
|
138 |
|
1. ckit-lib.cm now exports structure Error |
139 |
|
2. ml-nlffigen reports occurences of "..." (i.e., varargs function types) |
140 |
|
with a warning accompanied by a source location. Moreover, it |
141 |
|
merely skips the offending function or type and proceeds with the |
142 |
|
rest of its work.u As a result, one can safely feed C code containing |
143 |
|
"..." to ml-nlffigen. |
144 |
|
3. There are some internal improvements to CM, providing slightly |
145 |
|
more general string substitutions in the tools subsystem. |
146 |
|
|
147 |
|
---------------------------------------------------------------------- |
148 |
|
Name: Matthias Blume |
149 |
|
Date: 2001/06/27 15:10:00 EDT |
150 |
|
Tag: blume-20010627-concur |
151 |
|
Description: |
152 |
|
|
153 |
|
Fixed a small bug in CM's handling of parallel compilation. |
154 |
|
(You could observe the bug by Control-C-interrupting an ordinary |
155 |
|
CMB.make or CM.stabilize and then attaching some compile servers. |
156 |
|
The result was that all of a sudden the previously interrupted |
157 |
|
compilation would continue on its own. This was because of |
158 |
|
an over-optimization: CM did not bother to clean out certain queues |
159 |
|
when no servers were attached "anyway", resulting in the contents |
160 |
|
of these queues to grab control when new servers did get attached.) |
161 |
|
|
162 |
|
There is also another minor update to the CM manual. |
163 |
|
|
164 |
|
---------------------------------------------------------------------- |
165 |
|
Name: Matthias Blume |
166 |
|
Date: 2001/06/26 16:15:00 EDT |
167 |
|
Tag: blume-20010626-cmdoc |
168 |
|
Description: |
169 |
|
|
170 |
|
Minor typo fixed in CM manual (syntax diagram for libraries). |
171 |
|
|
172 |
|
---------------------------------------------------------------------- |
173 |
|
Name: Matthias Blume |
174 |
|
Date: 2001/06/25 22:55:00 EDT |
175 |
|
Tag: blume-20010625-x86pc |
176 |
|
Description: |
177 |
|
|
178 |
|
Fixed a nasty bug in the X86 assembly code that caused signal |
179 |
|
handlers to fail (crash) randomly. |
180 |
|
|
181 |
|
---------------------------------------------------------------------- |
182 |
|
Name: Matthias Blume |
183 |
|
Date: 2001/06/25 12:05:00 EDT |
184 |
|
Tag: blume-20010625-nlffigen |
185 |
|
Description: |
186 |
|
|
187 |
|
This update fixes a number of minor bugs in ml-nlffigen as reported by |
188 |
|
Nick Carter <nbc@andrew.cmu.edu>. |
189 |
|
|
190 |
|
1. Silly but ok typedefs of the form "typedef void myvoid;" are now accepted. |
191 |
|
2. Default names for generated files are now derived from the name of |
192 |
|
the C file *without its directory*. In particular, this causes generated |
193 |
|
files to be placed locally even if the C file is in some system directory. |
194 |
|
3. Default names for generated signatures and structures are also derived |
195 |
|
from the C file name without its directory. This avoids silly things |
196 |
|
like "structure GL/GL". |
197 |
|
(Other silly names are still possible because ml-nlffigen does not do |
198 |
|
a thorough check of whether generated names are legal ML identifiers. |
199 |
|
When in doubt, use command line arguments to force particular names.) |
200 |
|
|
201 |
|
---------------------------------------------------------------------- |
202 |
|
Name: Matthias Blume |
203 |
|
Date: 2001/06/21 12:25:00 EDT |
204 |
|
Tag: blume-20010621-eXene |
205 |
|
Description: |
206 |
|
|
207 |
|
eXene now compiles and (sort of) works again. |
208 |
|
|
209 |
|
The library name (for version > 110.33) is $/eXene.cm. |
210 |
|
|
211 |
|
I also added an new example in src/eXene/examples/nbody. See the |
212 |
|
README file there for details. |
213 |
|
|
214 |
|
---------------------------------------------------------------------- |
215 |
|
Name: Matthias Blume |
216 |
|
Date: 2001/06/20 16:40:00 EDT |
217 |
|
Tag: blume-20010620-cml |
218 |
|
Description: |
219 |
|
|
220 |
|
CML now compiles and works again. |
221 |
|
|
222 |
|
Libraries (for version > 110.33): |
223 |
|
|
224 |
|
$cml/cml.cm Main CML library. |
225 |
|
$cml/basis.cm CML's version of $/basis.cm. |
226 |
|
$cml/cml-internal.cm Internal helper library. |
227 |
|
$cml/core-cml.cm Internal helper library. |
228 |
|
$cml-lib/trace-cml.cm Tracing facility. |
229 |
|
$cml-lib/smlnj-lib.cm CML's version of $/smlnj-lib.cm |
230 |
|
|
231 |
|
The installer (config/install.sh) has been taught how to properly |
232 |
|
install this stuff. |
233 |
|
|
234 |
|
---------------------------------------------------------------------- |
235 |
|
Name: Matthias Blume |
236 |
|
Date: 2001/06/19 17:55:00 EDT |
237 |
|
Tag: blume-20010619-instantiate |
238 |
|
Description: |
239 |
|
|
240 |
|
This un-breaks the fix for bug 1432. |
241 |
|
(The bug was originally fixed in 110.9 but I broke it again some |
242 |
|
time after that.) |
243 |
|
|
244 |
|
---------------------------------------------------------------------- |
245 |
|
Name: Matthias Blume |
246 |
|
Date: 2001/06/19 17:25:00 EDT |
247 |
|
Tag: blume-20010619-signals |
248 |
|
Description: |
249 |
|
|
250 |
|
This should (hopefully) fix the long-standing signal handling bug. |
251 |
|
(The runtime system was constructing a continuation record with an |
252 |
|
incorrect descriptor which would cause the GC to drop data on the floor...) |
253 |
|
|
254 |
|
---------------------------------------------------------------------- |
255 |
|
Name: Matthias Blume |
256 |
|
Date: 2001/06/15 15:05:00 EDT |
257 |
|
Tag: blume-20010615-moresparc |
258 |
|
Description: |
259 |
|
|
260 |
|
Here is a short late-hour update related to Sparc c-calls: |
261 |
|
|
262 |
|
-- made handling of double-word arguments a bit smarter |
263 |
|
|
264 |
|
-- instruction selection phase tries to collapse certain clumsily |
265 |
|
constructed ML-Trees; typical example: |
266 |
|
|
267 |
|
ADD(ty,ADD(_,e,LI d1),LI d2) -> ADD(ty,e,LI(d1+d2)) |
268 |
|
|
269 |
|
This currently has no further impact on SML/NJ since mlriscGen does |
270 |
|
not seem to generate such patterns in the first place, and c-calls |
271 |
|
(which did generate them in the beginning) has meanwhile been fixed |
272 |
|
so as to avoid them as well. |
273 |
|
|
274 |
|
---------------------------------------------------------------------- |
275 |
|
Name: Matthias Blume |
276 |
|
Date: 2001/06/15 15:05:00 EDT |
277 |
|
Tag: blume-20010615-sparc |
278 |
|
Description: |
279 |
|
|
280 |
|
The purpose of this update is to provide an implementation of NLFFI |
281 |
|
on Sparc machines. |
282 |
|
|
283 |
|
Here are the changes in detail: |
284 |
|
|
285 |
|
* src/MLRISC/sparc/c-calls/sparc-c-calls.sml is a new file containing |
286 |
|
the Sparc implementation of the c-calls API. |
287 |
|
* The Sparc backend of SML/NJ has been modified to uniformely use %fp |
288 |
|
for accessing the ML frame. Thus, we have a real frame pointer and |
289 |
|
can freely modify %sp without need for an omit-frame-ptr phase. |
290 |
|
The vfp logic in src/compiler/CodeGen/* has been changed to accomodate |
291 |
|
this case. |
292 |
|
* ml-nlffigen has been taught to produce code for different architectures |
293 |
|
and calling conventions. |
294 |
|
* In a way similar to what was done in the x86 case, the Sparc |
295 |
|
backend uses its own specific extension to mltree. (For example, |
296 |
|
it needs to be able to generate UNIMP instructions which are part |
297 |
|
of the calling convention.) |
298 |
|
* ml-nlffi-lib was reorganized to make it more modular (in particular, |
299 |
|
to make it easier to plug in new machine- and os-dependent parts). |
300 |
|
|
301 |
|
There are some other fairly unrelated bug fixes and cleanups as well: |
302 |
|
|
303 |
|
* I further hacked the .cm files for MLRISC tools (like MDLGen) so |
304 |
|
that they properly share their libraries with existing SML/NJ libraries. |
305 |
|
* I fixed a minor cosmetic bug in CM, supressing certain spurious |
306 |
|
follow-up error messages. |
307 |
|
* Updates to CM/CMB documentation. |
308 |
|
|
309 |
|
TODO items: |
310 |
|
|
311 |
|
* MLRISC should use a different register as its asmTemp on the Sparc. |
312 |
|
(The current %o2 is a really bad choice because it is part of the |
313 |
|
calling conventions, so things might interfere in unexpected ways.) |
314 |
|
|
315 |
|
---------------------------------------------------------------------- |
316 |
|
Name: Matthias Blume |
317 |
|
Date: 2001/06/07 |
318 |
|
Tag: blume-20010607-calls |
319 |
|
Description: |
320 |
|
|
321 |
|
A number of internal changes related to C calls and calling conventions: |
322 |
|
|
323 |
|
1. ML-Tree CALL statements now carry a "pops" field. It indicates the |
324 |
|
number of bytes popped implicitly (by the callee). In most cases |
325 |
|
this field is 0 but on x86/win32 it is some non-zero value. This |
326 |
|
is information provided for the benefit of the "omit-frameptr" pass. |
327 |
|
2. The CALL instruction on the x86 carries a similar "pops" field. |
328 |
|
The instruction selection phase copies its value from the ML-Tree |
329 |
|
CALL statement. |
330 |
|
3. On all other architectures, the instruction selection phase checks |
331 |
|
whether "pops=0" and complains if not. |
332 |
|
4. The c-calls implementation for x86 now accepts two calling conventions: |
333 |
|
"ccall" and "stdcall". When "ccall" is selected, the caller cleans |
334 |
|
up after the call and pops is set to 0. For "stdcall", the caller |
335 |
|
does nothing, leaving the cleanup to the callee; pops is set to |
336 |
|
the number of bytes that were pushed onto the stack. |
337 |
|
5. The cproto decoder (compiler/Semant/types/cproto.sml) now can |
338 |
|
distinguish between "ccall" and "stdcall". |
339 |
|
6. The UNIMP instruction has been added to the supported Sparc instruction |
340 |
|
set. (This is needed for implementing the official C calling convention |
341 |
|
on this architecture.) |
342 |
|
7. I fixed some of the .cm files under src/MLRISC/Tools to make them |
343 |
|
work with the latest CM. |
344 |
|
|
345 |
|
---------------------------------------------------------------------- |
346 |
|
Name: Matthias Blume |
347 |
|
Date: 2001/06/05 15:10:00 EDT |
348 |
|
Tag: blume-20010605-cm-index |
349 |
|
Description: |
350 |
|
|
351 |
|
0. The "lambdasplit" parameter for class "sml" in CM has been documented. |
352 |
|
|
353 |
|
1. CM can now generate "index files". These are human-readable files |
354 |
|
that list on a per-.cm-file basis each toplevel symbol defined or |
355 |
|
imported. The location of the index file for |
356 |
|
<p>/<d>.cm is <p>/CM/INDEX/<d>.cm. |
357 |
|
To enable index-file generation, set CM.Control.generate_index to true |
358 |
|
or export an environment-symbol: export CM_GENERATE_INDEX=true. |
359 |
|
|
360 |
|
The CM manual has been updated accordingly. |
361 |
|
|
362 |
|
2. I made some slight modifications to the c-calls API in MLRISC. |
363 |
|
|
364 |
|
a) There is now a callback to support saving/restoring of |
365 |
|
dedicated but caller-save registers around the actual call |
366 |
|
instruction. |
367 |
|
b) One can optionally specify a comment-annotation for the |
368 |
|
call instruction. |
369 |
|
|
370 |
|
3. SML/NJ (mlriscGen.sml) uses this new API for the rawccall primop. |
371 |
|
(For example, the comment annotation shows the C prototype of |
372 |
|
the function being called.) |
373 |
|
|
374 |
|
---------------------------------------------------------------------- |
375 |
|
Name: Matthias Blume |
376 |
|
Date: 2001/06/01 13:30:00 EDT |
377 |
|
Tag: blume-20010601-nlffi-cleanup |
378 |
|
Description: |
379 |
|
|
380 |
|
This is mostly a cleanup of MLFFI stuff: |
381 |
|
|
382 |
|
- some signature files have been put into a more exposed place |
383 |
|
- the ugly 'f type parameter is gone (simplifies types tremendously!) |
384 |
|
- ml-nlffigen changed accordingly |
385 |
|
- tutorial updated |
386 |
|
|
387 |
|
Other changes: |
388 |
|
|
389 |
|
- author's affiliation in CM manual(s) updated |
390 |
|
- some more recognized keywords added to Allen's sml.sty |
391 |
|
|
392 |
|
---------------------------------------------------------------------- |
393 |
|
Name: Matthias Blume |
394 |
Date: 2001/05/25 15:30:00 EDT |
Date: 2001/05/25 15:30:00 EDT |
395 |
Tag: blume-20010525-iptr |
Tag: blume-20010525-iptr |
396 |
Description: |
Description: |