11 |
Date: |
Date: |
12 |
Tag: <post-commit CVS tag> |
Tag: <post-commit CVS tag> |
13 |
Description: |
Description: |
14 |
|
|
15 |
|
---------------------------------------------------------------------- |
16 |
|
Name: Lal George |
17 |
|
Date: 2001/07/19 16:36:29 EDT 2001 |
18 |
|
Tag: george-20010719-simple-cells |
19 |
|
Description: |
20 |
|
|
21 |
|
I have dramatically simplified the interface for CELLS in MLRISC. |
22 |
|
|
23 |
|
In summary, the cells interface is broken up into three parts: |
24 |
|
|
25 |
|
1. CellsBasis : CELLS_BASIS |
26 |
|
|
27 |
|
CellsBasis is a top level structure and common for all |
28 |
|
architectures. it contains the definitions of basic datatypes |
29 |
|
and utility functions over these types. |
30 |
|
|
31 |
|
2. functor Cells() : CELLS |
32 |
|
|
33 |
|
Cells generates an interface for CELLS that incorporates the |
34 |
|
specific resources on the target architecture, such as the |
35 |
|
presence of special register classes, their number and size, |
36 |
|
and various useful substructures. |
37 |
|
|
38 |
|
3. <ARCH>CELLS |
39 |
|
|
40 |
|
e.g. SparcCells: SPARCCELLS |
41 |
|
|
42 |
|
<ARCH>CELLS usually contains additional bindings for special |
43 |
|
registers on the architecture, such as: |
44 |
|
|
45 |
|
val r0 : cell (* register zero *) |
46 |
|
val y : cell (* Y register *) |
47 |
|
val psr : cell (* processor status register *) |
48 |
|
... |
49 |
|
|
50 |
|
The structure returned by applying the Cells functor is opened |
51 |
|
in this interface. |
52 |
|
|
53 |
|
The main implication of all this is that the datatypes for cells is |
54 |
|
split between CellsBasis and CELLS -- a fairly simple change for user |
55 |
|
code. |
56 |
|
|
57 |
|
In the old scheme the CELLS interface had a definitional binding of |
58 |
|
the form: |
59 |
|
|
60 |
|
signature CELLS = sig |
61 |
|
|
62 |
|
structure CellsBasis = CellsBasis |
63 |
|
|
64 |
|
... |
65 |
|
|
66 |
|
end |
67 |
|
|
68 |
|
With all the sharing constraints that goes on in MLRISC, this old |
69 |
|
design quickly leads to errors such as: |
70 |
|
|
71 |
|
"structure definition spec inside of sharing ... " |
72 |
|
|
73 |
|
|
74 |
|
and appears to require an unacceptable amount of sharing and where |
75 |
|
constraint hackery. |
76 |
|
|
77 |
|
I think this error message (the interaction of definitional specs and |
78 |
|
sharing) requires more explanation on our web page. |
79 |
|
|
80 |
|
---------------------------------------------------------------------- |
81 |
|
Name: Matthias Blume |
82 |
|
Date: 2001/07/19 15:00:00 EDT |
83 |
|
Tag: blume-20010719-libreorg |
84 |
|
Description: |
85 |
|
|
86 |
|
This update puts together a fairly extensive but straightforward change |
87 |
|
to the way the libraries that implement the interactive system are |
88 |
|
organized: |
89 |
|
|
90 |
|
The biggest change is the elimination of structure Compiler. As a |
91 |
|
replacement for this structure, there is now a CM library |
92 |
|
(known as $smlnj/compiler.cm or $smlnj/compiler/current.cm) |
93 |
|
that exports all the substructures of the original structure Compiler |
94 |
|
directly. So instead of saying Compiler.Foo.bar one now simply |
95 |
|
says Foo.bar. (The CM libraries actually export a collection of |
96 |
|
structures that is richer than the collection of substructures of |
97 |
|
structure Compiler.) |
98 |
|
|
99 |
|
To make the transition smooth, there is a separate library called |
100 |
|
$smlnj/compiler/compiler.cm which puts together and exports the |
101 |
|
original structure Compiler (or at least something very close to it). |
102 |
|
|
103 |
|
There are five members of the original structure Compiler |
104 |
|
that are not exported directly but which instead became members |
105 |
|
of a new structure Backend (described by signature BACKEND). These are: |
106 |
|
structure Profile (: PROFILE), structure Compile (: COMPILE), structure |
107 |
|
Interact (: INTERACT), structure Machine (: MACHINE), and val |
108 |
|
architecture (: string). |
109 |
|
|
110 |
|
Structure Compiler.Version has become structure CompilerVersion. |
111 |
|
|
112 |
|
Cross-compilers for alpha32, hppa, ppc, sparc, and x86 are provided |
113 |
|
by $smlnj/compiler/<arch>.cm where <arch> is alpha32, hppa, ppc, sparc, |
114 |
|
or x86, respectively. |
115 |
|
Each of these exports the same frontend structures that |
116 |
|
$smlnj/compiler.cm exports. But they do not have a structure Backend |
117 |
|
and instead export some structure <Arch>Backend where <Arch> is Alpha32, |
118 |
|
Hppa, PPC, Sparc, or X86, respectively. |
119 |
|
|
120 |
|
Library $smlnj/compiler/all.cm exports the union of the exports of |
121 |
|
$smlnj/compiler/<arch>.cm |
122 |
|
|
123 |
|
There are no structures <Arch>Compiler anymore, use |
124 |
|
$smlnj/compiler/<arch>.cm instead. |
125 |
|
|
126 |
|
Library host-compiler-0.cm is gone. Instead, the internal library |
127 |
|
that instantiates CM is now called cm0.cm. Selection of the host |
128 |
|
compiler (backend) is no longer done here but. (Responsibility for it |
129 |
|
now lies with $smlnj/compiler/current.cm. This seems to be more |
130 |
|
logical.) |
131 |
|
|
132 |
|
Many individual files have been moved or renamed. Some files have |
133 |
|
been split into multiple files, and some "dead" files have been deleted. |
134 |
|
|
135 |
|
Aside from these changes to library organization, there are also changes |
136 |
|
to the way the code itself is organized: |
137 |
|
|
138 |
|
Structure Binfile has been re-implemented in such a way that it no |
139 |
|
longer needs any knowledge of the compiler. It exclusively deals |
140 |
|
with the details of binfile layout. It no longer invokes the |
141 |
|
compiler (for the purpose of creating new prospective binfile |
142 |
|
content), and it no longer has any knowledge of how to interpret |
143 |
|
pickles. |
144 |
|
|
145 |
|
Structure Compile (: COMPILE) has been stripped down to the bare |
146 |
|
essentials of compilation. It no longer deals with linking/execution. |
147 |
|
The interface has been cleaned up considerably. |
148 |
|
|
149 |
|
Utility routines for dealing with linking and execution have been |
150 |
|
moved into their own substructures. |
151 |
|
|
152 |
|
(The ultimate goal of these changes is to provide a light-weight |
153 |
|
binfile loader/linker (at least for, e.g., stable libraries) that |
154 |
|
does not require CM or the compiler to be present.) |
155 |
|
|
156 |
|
CM documentation has been updated to reflect the changes to library |
157 |
|
organization. |
158 |
|
|
159 |
|
---------------------------------------------------------------------- |
160 |
|
Name: Matthias Blume |
161 |
|
Date: 2001/07/10 17:30:00 EDT |
162 |
|
Tag: Release_110_34 |
163 |
|
Description: |
164 |
|
|
165 |
|
Minor tweak to 110.34 (re-tagged): |
166 |
|
|
167 |
|
- README.html file added to CVS repository |
168 |
|
- runtime compiles properly under FreeBSD 3.X and 4.X |
169 |
|
|
170 |
|
---------------------------------------------------------------------- |
171 |
|
Name: Matthias Blume |
172 |
|
Date: 2001/07/10 17:30:00 EDT |
173 |
|
Tag: Release_110_34 |
174 |
|
Description: |
175 |
|
|
176 |
|
New version number (110.34). New bootfiles. |
177 |
|
|
178 |
|
---------------------------------------------------------------------- |
179 |
|
Name: Matthias Blume |
180 |
|
Date: 2001/07/09 16:00:00 EDT |
181 |
|
Tag: blume-20010709-more-varargs |
182 |
|
Description: |
183 |
|
|
184 |
|
I changed the handling of varargs in ml-nlffigen again: |
185 |
|
The ellipsis ... will now simply be ignored (with an accompanying warning). |
186 |
|
|
187 |
|
The immediate effect is that you can actually call a varargs function |
188 |
|
from ML -- but you can't actually supply any arguments beyond the ones |
189 |
|
specified explicitly. (For example, you can call printf with its format |
190 |
|
string, but you cannot pass additional arguments.) |
191 |
|
|
192 |
|
This behavior is only marginally more useful than the one before, but |
193 |
|
it has the advantage that a function or, more importantly, a function |
194 |
|
type never gets dropped on the floor, thus avoiding follow-up problems with |
195 |
|
other types that refer to the offending one. |
196 |
|
|
197 |
|
---------------------------------------------------------------------- |
198 |
|
Name: Matthias Blume |
199 |
|
Date: 2001/07/09 11:25:00 EDT |
200 |
|
Tag: blume-20010709-varargs |
201 |
|
Description: |
202 |
|
|
203 |
|
1. ckit-lib.cm now exports structure Error |
204 |
|
2. ml-nlffigen reports occurences of "..." (i.e., varargs function types) |
205 |
|
with a warning accompanied by a source location. Moreover, it |
206 |
|
merely skips the offending function or type and proceeds with the |
207 |
|
rest of its work.u As a result, one can safely feed C code containing |
208 |
|
"..." to ml-nlffigen. |
209 |
|
3. There are some internal improvements to CM, providing slightly |
210 |
|
more general string substitutions in the tools subsystem. |
211 |
|
|
212 |
|
---------------------------------------------------------------------- |
213 |
|
Name: Matthias Blume |
214 |
|
Date: 2001/06/27 15:10:00 EDT |
215 |
|
Tag: blume-20010627-concur |
216 |
|
Description: |
217 |
|
|
218 |
|
Fixed a small bug in CM's handling of parallel compilation. |
219 |
|
(You could observe the bug by Control-C-interrupting an ordinary |
220 |
|
CMB.make or CM.stabilize and then attaching some compile servers. |
221 |
|
The result was that all of a sudden the previously interrupted |
222 |
|
compilation would continue on its own. This was because of |
223 |
|
an over-optimization: CM did not bother to clean out certain queues |
224 |
|
when no servers were attached "anyway", resulting in the contents |
225 |
|
of these queues to grab control when new servers did get attached.) |
226 |
|
|
227 |
|
There is also another minor update to the CM manual. |
228 |
|
|
229 |
|
---------------------------------------------------------------------- |
230 |
|
Name: Matthias Blume |
231 |
|
Date: 2001/06/26 16:15:00 EDT |
232 |
|
Tag: blume-20010626-cmdoc |
233 |
|
Description: |
234 |
|
|
235 |
|
Minor typo fixed in CM manual (syntax diagram for libraries). |
236 |
|
|
237 |
|
---------------------------------------------------------------------- |
238 |
|
Name: Matthias Blume |
239 |
|
Date: 2001/06/25 22:55:00 EDT |
240 |
|
Tag: blume-20010625-x86pc |
241 |
|
Description: |
242 |
|
|
243 |
|
Fixed a nasty bug in the X86 assembly code that caused signal |
244 |
|
handlers to fail (crash) randomly. |
245 |
|
|
246 |
|
---------------------------------------------------------------------- |
247 |
|
Name: Matthias Blume |
248 |
|
Date: 2001/06/25 12:05:00 EDT |
249 |
|
Tag: blume-20010625-nlffigen |
250 |
|
Description: |
251 |
|
|
252 |
|
This update fixes a number of minor bugs in ml-nlffigen as reported by |
253 |
|
Nick Carter <nbc@andrew.cmu.edu>. |
254 |
|
|
255 |
|
1. Silly but ok typedefs of the form "typedef void myvoid;" are now accepted. |
256 |
|
2. Default names for generated files are now derived from the name of |
257 |
|
the C file *without its directory*. In particular, this causes generated |
258 |
|
files to be placed locally even if the C file is in some system directory. |
259 |
|
3. Default names for generated signatures and structures are also derived |
260 |
|
from the C file name without its directory. This avoids silly things |
261 |
|
like "structure GL/GL". |
262 |
|
(Other silly names are still possible because ml-nlffigen does not do |
263 |
|
a thorough check of whether generated names are legal ML identifiers. |
264 |
|
When in doubt, use command line arguments to force particular names.) |
265 |
|
|
266 |
|
---------------------------------------------------------------------- |
267 |
|
Name: Matthias Blume |
268 |
|
Date: 2001/06/21 12:25:00 EDT |
269 |
|
Tag: blume-20010621-eXene |
270 |
|
Description: |
271 |
|
|
272 |
|
eXene now compiles and (sort of) works again. |
273 |
|
|
274 |
|
The library name (for version > 110.33) is $/eXene.cm. |
275 |
|
|
276 |
|
I also added an new example in src/eXene/examples/nbody. See the |
277 |
|
README file there for details. |
278 |
|
|
279 |
|
---------------------------------------------------------------------- |
280 |
|
Name: Matthias Blume |
281 |
|
Date: 2001/06/20 16:40:00 EDT |
282 |
|
Tag: blume-20010620-cml |
283 |
|
Description: |
284 |
|
|
285 |
|
CML now compiles and works again. |
286 |
|
|
287 |
|
Libraries (for version > 110.33): |
288 |
|
|
289 |
|
$cml/cml.cm Main CML library. |
290 |
|
$cml/basis.cm CML's version of $/basis.cm. |
291 |
|
$cml/cml-internal.cm Internal helper library. |
292 |
|
$cml/core-cml.cm Internal helper library. |
293 |
|
$cml-lib/trace-cml.cm Tracing facility. |
294 |
|
$cml-lib/smlnj-lib.cm CML's version of $/smlnj-lib.cm |
295 |
|
|
296 |
|
The installer (config/install.sh) has been taught how to properly |
297 |
|
install this stuff. |
298 |
|
|
299 |
|
---------------------------------------------------------------------- |
300 |
|
Name: Matthias Blume |
301 |
|
Date: 2001/06/19 17:55:00 EDT |
302 |
|
Tag: blume-20010619-instantiate |
303 |
|
Description: |
304 |
|
|
305 |
|
This un-breaks the fix for bug 1432. |
306 |
|
(The bug was originally fixed in 110.9 but I broke it again some |
307 |
|
time after that.) |
308 |
|
|
309 |
|
---------------------------------------------------------------------- |
310 |
|
Name: Matthias Blume |
311 |
|
Date: 2001/06/19 17:25:00 EDT |
312 |
|
Tag: blume-20010619-signals |
313 |
|
Description: |
314 |
|
|
315 |
|
This should (hopefully) fix the long-standing signal handling bug. |
316 |
|
(The runtime system was constructing a continuation record with an |
317 |
|
incorrect descriptor which would cause the GC to drop data on the floor...) |
318 |
|
|
319 |
|
---------------------------------------------------------------------- |
320 |
|
Name: Matthias Blume |
321 |
|
Date: 2001/06/15 15:05:00 EDT |
322 |
|
Tag: blume-20010615-moresparc |
323 |
|
Description: |
324 |
|
|
325 |
|
Here is a short late-hour update related to Sparc c-calls: |
326 |
|
|
327 |
|
-- made handling of double-word arguments a bit smarter |
328 |
|
|
329 |
|
-- instruction selection phase tries to collapse certain clumsily |
330 |
|
constructed ML-Trees; typical example: |
331 |
|
|
332 |
|
ADD(ty,ADD(_,e,LI d1),LI d2) -> ADD(ty,e,LI(d1+d2)) |
333 |
|
|
334 |
|
This currently has no further impact on SML/NJ since mlriscGen does |
335 |
|
not seem to generate such patterns in the first place, and c-calls |
336 |
|
(which did generate them in the beginning) has meanwhile been fixed |
337 |
|
so as to avoid them as well. |
338 |
|
|
339 |
|
---------------------------------------------------------------------- |
340 |
|
Name: Matthias Blume |
341 |
|
Date: 2001/06/15 15:05:00 EDT |
342 |
|
Tag: blume-20010615-sparc |
343 |
|
Description: |
344 |
|
|
345 |
|
The purpose of this update is to provide an implementation of NLFFI |
346 |
|
on Sparc machines. |
347 |
|
|
348 |
|
Here are the changes in detail: |
349 |
|
|
350 |
|
* src/MLRISC/sparc/c-calls/sparc-c-calls.sml is a new file containing |
351 |
|
the Sparc implementation of the c-calls API. |
352 |
|
* The Sparc backend of SML/NJ has been modified to uniformely use %fp |
353 |
|
for accessing the ML frame. Thus, we have a real frame pointer and |
354 |
|
can freely modify %sp without need for an omit-frame-ptr phase. |
355 |
|
The vfp logic in src/compiler/CodeGen/* has been changed to accomodate |
356 |
|
this case. |
357 |
|
* ml-nlffigen has been taught to produce code for different architectures |
358 |
|
and calling conventions. |
359 |
|
* In a way similar to what was done in the x86 case, the Sparc |
360 |
|
backend uses its own specific extension to mltree. (For example, |
361 |
|
it needs to be able to generate UNIMP instructions which are part |
362 |
|
of the calling convention.) |
363 |
|
* ml-nlffi-lib was reorganized to make it more modular (in particular, |
364 |
|
to make it easier to plug in new machine- and os-dependent parts). |
365 |
|
|
366 |
|
There are some other fairly unrelated bug fixes and cleanups as well: |
367 |
|
|
368 |
|
* I further hacked the .cm files for MLRISC tools (like MDLGen) so |
369 |
|
that they properly share their libraries with existing SML/NJ libraries. |
370 |
|
* I fixed a minor cosmetic bug in CM, supressing certain spurious |
371 |
|
follow-up error messages. |
372 |
|
* Updates to CM/CMB documentation. |
373 |
|
|
374 |
|
TODO items: |
375 |
|
|
376 |
|
* MLRISC should use a different register as its asmTemp on the Sparc. |
377 |
|
(The current %o2 is a really bad choice because it is part of the |
378 |
|
calling conventions, so things might interfere in unexpected ways.) |
379 |
|
|
380 |
|
---------------------------------------------------------------------- |
381 |
|
Name: Matthias Blume |
382 |
|
Date: 2001/06/07 |
383 |
|
Tag: blume-20010607-calls |
384 |
|
Description: |
385 |
|
|
386 |
|
A number of internal changes related to C calls and calling conventions: |
387 |
|
|
388 |
|
1. ML-Tree CALL statements now carry a "pops" field. It indicates the |
389 |
|
number of bytes popped implicitly (by the callee). In most cases |
390 |
|
this field is 0 but on x86/win32 it is some non-zero value. This |
391 |
|
is information provided for the benefit of the "omit-frameptr" pass. |
392 |
|
2. The CALL instruction on the x86 carries a similar "pops" field. |
393 |
|
The instruction selection phase copies its value from the ML-Tree |
394 |
|
CALL statement. |
395 |
|
3. On all other architectures, the instruction selection phase checks |
396 |
|
whether "pops=0" and complains if not. |
397 |
|
4. The c-calls implementation for x86 now accepts two calling conventions: |
398 |
|
"ccall" and "stdcall". When "ccall" is selected, the caller cleans |
399 |
|
up after the call and pops is set to 0. For "stdcall", the caller |
400 |
|
does nothing, leaving the cleanup to the callee; pops is set to |
401 |
|
the number of bytes that were pushed onto the stack. |
402 |
|
5. The cproto decoder (compiler/Semant/types/cproto.sml) now can |
403 |
|
distinguish between "ccall" and "stdcall". |
404 |
|
6. The UNIMP instruction has been added to the supported Sparc instruction |
405 |
|
set. (This is needed for implementing the official C calling convention |
406 |
|
on this architecture.) |
407 |
|
7. I fixed some of the .cm files under src/MLRISC/Tools to make them |
408 |
|
work with the latest CM. |
409 |
|
|
410 |
|
---------------------------------------------------------------------- |
411 |
|
Name: Matthias Blume |
412 |
|
Date: 2001/06/05 15:10:00 EDT |
413 |
|
Tag: blume-20010605-cm-index |
414 |
|
Description: |
415 |
|
|
416 |
|
0. The "lambdasplit" parameter for class "sml" in CM has been documented. |
417 |
|
|
418 |
|
1. CM can now generate "index files". These are human-readable files |
419 |
|
that list on a per-.cm-file basis each toplevel symbol defined or |
420 |
|
imported. The location of the index file for |
421 |
|
<p>/<d>.cm is <p>/CM/INDEX/<d>.cm. |
422 |
|
To enable index-file generation, set CM.Control.generate_index to true |
423 |
|
or export an environment-symbol: export CM_GENERATE_INDEX=true. |
424 |
|
|
425 |
|
The CM manual has been updated accordingly. |
426 |
|
|
427 |
|
2. I made some slight modifications to the c-calls API in MLRISC. |
428 |
|
|
429 |
|
a) There is now a callback to support saving/restoring of |
430 |
|
dedicated but caller-save registers around the actual call |
431 |
|
instruction. |
432 |
|
b) One can optionally specify a comment-annotation for the |
433 |
|
call instruction. |
434 |
|
|
435 |
|
3. SML/NJ (mlriscGen.sml) uses this new API for the rawccall primop. |
436 |
|
(For example, the comment annotation shows the C prototype of |
437 |
|
the function being called.) |
438 |
|
|
439 |
|
---------------------------------------------------------------------- |
440 |
|
Name: Matthias Blume |
441 |
|
Date: 2001/06/01 13:30:00 EDT |
442 |
|
Tag: blume-20010601-nlffi-cleanup |
443 |
|
Description: |
444 |
|
|
445 |
|
This is mostly a cleanup of MLFFI stuff: |
446 |
|
|
447 |
|
- some signature files have been put into a more exposed place |
448 |
|
- the ugly 'f type parameter is gone (simplifies types tremendously!) |
449 |
|
- ml-nlffigen changed accordingly |
450 |
|
- tutorial updated |
451 |
|
|
452 |
|
Other changes: |
453 |
|
|
454 |
|
- author's affiliation in CM manual(s) updated |
455 |
|
- some more recognized keywords added to Allen's sml.sty |
456 |
|
|
457 |
|
---------------------------------------------------------------------- |
458 |
|
Name: Matthias Blume |
459 |
|
Date: 2001/05/25 15:30:00 EDT |
460 |
|
Tag: blume-20010525-iptr |
461 |
|
Description: |
462 |
|
|
463 |
|
- put the official 110.33-README (as it appears on the ftp server) under |
464 |
|
CVS |
465 |
|
- fixed a small bug related to incomplete pointer types in |
466 |
|
ml-nlffigen |
467 |
|
- small cosmetic change to the ml-nlffi-lib's "arr" type constructor |
468 |
|
(it does not need the 'f type parameter) |
469 |
|
|
470 |
|
---------------------------------------------------------------------- |
471 |
|
Name: Matthias Blume |
472 |
|
Date: 2001/05/23 14:30:00 EDT |
473 |
|
Tag: Release_110_33 |
474 |
|
Description: |
475 |
|
|
476 |
|
New version number (110.33). New bootfiles. |
477 |
|
|
478 |
|
---------------------------------------------------------------------- |
479 |
|
Name: Matthias Blume |
480 |
|
Date: 2001/05/22 18:06:00 EDT |
481 |
|
Tag: blume-20010522-targets |
482 |
|
Description: |
483 |
|
|
484 |
|
Made install.sh use file config/targets.customized if it exists, falling |
485 |
|
back to config/targets if it doesn't. This way one can have a customized |
486 |
|
version of the targets file without touching the "real thing", thus |
487 |
|
eliminating the constant fear of accidentally checking something bogus |
488 |
|
back into the CVS repository... (File config/targets.customized must |
489 |
|
not be added to the repository!) |
490 |
|
|
491 |
|
---------------------------------------------------------------------- |
492 |
|
Name: Matthias Blume |
493 |
|
Date: 2001/05/22 16:30:00 EDT |
494 |
|
Tag: blume-20010522-minitut |
495 |
|
Description: |
496 |
|
|
497 |
|
1. Bug fix in ml-nlffigen; now (hopefully) correctly handling |
498 |
|
struct returns. |
499 |
|
2. Added src/ml-nlffi-lib/Doc/mini-tutorial.txt. This is some very |
500 |
|
incomplete, preliminary documentation for NLFFI. |
501 |
|
|
502 |
|
---------------------------------------------------------------------- |
503 |
|
Name: Matthias Blume |
504 |
|
Date: 2001/05/14 11:30:00 EDT |
505 |
|
Tag: blume-20010514-script |
506 |
|
Description: |
507 |
|
|
508 |
|
Some bugs in install script fixed. |
509 |
|
|
510 |
|
In addition to that I also made a slight change to the NLFFI API: |
511 |
|
Functors generated by ml-nlffigen now take the dynamic library as a |
512 |
|
straight functor argument, not as a suspended one. (The original |
513 |
|
functor code used to force the suspension right away anyway, so there |
514 |
|
was nothing gained by this complication of the interface.) |
515 |
|
|
516 |
|
---------------------------------------------------------------------- |
517 |
|
Name: Matthias Blume |
518 |
|
Date: 2001/05/11 14:35:00 EDT |
519 |
|
Tag: blume-20010511-ml-nlffi |
520 |
|
Description: |
521 |
|
|
522 |
|
I finally took the plunge and added my new FFI code to the main |
523 |
|
repository. For x86-linux it is now ready for prime-time. |
524 |
|
|
525 |
|
There are two new subdirectories of "src": |
526 |
|
|
527 |
|
- ml-nlffi-lib: |
528 |
|
The utility library for programs using the FFI interface. |
529 |
|
Here is the implementation of $/c.cm and its associated low-level |
530 |
|
partners $/c-int.cm and $/memory.cm. |
531 |
|
- ml-nlffigen: |
532 |
|
A stand-alone program for generating ML glue code from C source |
533 |
|
code. |
534 |
|
|
535 |
|
Building ml-nlffigen requires $/ckit-lib.cm. |
536 |
|
|
537 |
|
The config/install.sh script has been updates to do the Right Thing |
538 |
|
(hopefully). |
539 |
|
|
540 |
|
Notice that the source tree for the C-Kit will not be put under "src" |
541 |
|
but directly under the installation root directory. (This is the |
542 |
|
structure that currently exists on the CVS server when you check out |
543 |
|
module "sml".) Fortunately, config/install.sh knows about this oddity. |
544 |
|
|
545 |
|
Bugs: No documentation yet. |
546 |
|
|
547 |
|
---------------------------------------------------------------------- |
548 |
|
Name: Matthias Blume |
549 |
|
Date: 2001/05/09 16:35:00 EDT |
550 |
|
Tag: blume-20010509-cpscontract |
551 |
|
Description: |
552 |
|
|
553 |
|
Fixed a bug in the accounting code in cpsopt/contract.sml. (The |
554 |
|
wrapper/unwrapper elimination did not decrement usage counts and some |
555 |
|
dead variables got overlooked by the dead-up logic.) |
556 |
|
|
557 |
|
---------------------------------------------------------------------- |
558 |
|
Name: Lal George |
559 |
|
Date: 2001/05/08 17:26:09 EDT |
560 |
|
Tag: george-20010508-omit-frameptr |
561 |
|
Description: |
562 |
|
|
563 |
|
Changes to implement the omit-frame-pointer optimization to support |
564 |
|
raw C calls. For now, there is only support on the Intel x86, but |
565 |
|
other architectures will follow as more experience is gained with this. |
566 |
|
|
567 |
|
|
568 |
|
---------------------------------------------------------------------- |
569 |
|
Name: Matthias Blume |
570 |
|
Date: 2001/05/07 14:40:00 EDT |
571 |
|
Tag: blume-20010507-proxies |
572 |
|
Description: |
573 |
|
|
574 |
|
I made into "proxy libraries" all libraries that qualify for such a |
575 |
|
change. (A qualifying library is a library that has another library or |
576 |
|
groups as its sole member and repeats that member's export list |
577 |
|
verbatim. A proxy library avoids this repetition by omitting its export |
578 |
|
list, effectively inheriting the list that its (only) member exports. |
579 |
|
See the CM manual for more explanation.) |
580 |
|
The main effect is that explicit export lists for these libraries |
581 |
|
do not have to be kepts in sync, making maintenance a bit easier. |
582 |
|
|
583 |
|
I also added copyright notices to many .cm-files. |
584 |
|
|
585 |
|
Last but not least, I made a new set of bootfiles. |
586 |
|
|
587 |
|
---------------------------------------------------------------------- |
588 |
|
Name: Matthias Blume |
589 |
|
Date: 2001/05/04 17:00:00 EDT |
590 |
|
Tag: blume-20010504-cm-lsplit |
591 |
|
Description: |
592 |
|
|
593 |
|
0. John merged pending changes to $/smlnj-lib.cm |
594 |
|
|
595 |
|
1. Allen's previous change accidentally backed out of one of Lal's |
596 |
|
earlier changes. I undid this mistake (re-introducing Lal's change). |
597 |
|
|
598 |
|
2. I used the new topOrder' function from graph-scc.sml (from $/smlnj-lib.cm) |
599 |
|
within the compiler where applicable. There is some code simplification |
600 |
|
because of that. |
601 |
|
|
602 |
|
3. The "split" phase (in FLINT) is now part of the default list of phases. |
603 |
|
Compiler.Control.LambdaSplitting.* can be used to globally control the |
604 |
|
lambda-splitting (cross-module-inlining) engine. In addition to that, |
605 |
|
it can now also be controlled on a per-source basis: CM has been taught |
606 |
|
a new tool parameter applicable to ML source files. |
607 |
|
|
608 |
|
- To turn lambda-splitting off completely: |
609 |
|
local open Compiler.Control.LambdaSplitting in |
610 |
|
val _ = set Off |
611 |
|
end |
612 |
|
- To make "no lambda-splitting" the global default (but allow per-source |
613 |
|
overriding); this is the initial setting: |
614 |
|
local open Compiler.Control.LambdaSplitting in |
615 |
|
val _ = set (Default NONE) |
616 |
|
end |
617 |
|
- To make "lambda-splitting with aggressiveness a" the global default |
618 |
|
(and allow per-source overriding): |
619 |
|
local open Compiler.Control.LambdaSplitting in |
620 |
|
val _ = set (Default (SOME a)) |
621 |
|
end |
622 |
|
|
623 |
|
- To turn lambda-splitting off for a given ML souce file (say: a.sml) |
624 |
|
write (in the respective .cm-file): |
625 |
|
a.sml (lambdasplitting:off) |
626 |
|
- To turn lambda-splitting for a.sml on with minimal aggressiveness: |
627 |
|
a.sml (lambdasplitting:on) |
628 |
|
- To turn lambda-splitting for a.sml on with aggressiveness <a> (where |
629 |
|
<a> is a decimal non-negative integer): |
630 |
|
a.sml (lambdasplitting:<a>) |
631 |
|
- To turn lambda-splitting for a.sml on with maximal aggressiveness: |
632 |
|
a.sml (lambdasplitting:infinity) |
633 |
|
- To use the global default for a.sml: |
634 |
|
a.sml (lambdasplitting:default) |
635 |
|
or simply |
636 |
|
a.sml |
637 |
|
|
638 |
|
---------------------------------------------------------------------- |
639 |
|
Name: Allen Leung |
640 |
|
Date: 2001/05/04 01:57:00 EDT |
641 |
|
Tag: leunga-20010504-sync |
642 |
|
Description: |
643 |
|
|
644 |
|
MLRISC features. |
645 |
|
|
646 |
|
1. Fix to CMPXCHG instructions. |
647 |
|
2. Changed RA interface to allow annotations in callbacks. |
648 |
|
3. Added a new method to the stream interface to allow annotations updates. |
649 |
|
|
650 |
|
---------------------------------------------------------------------- |
651 |
|
Name: Matthias Blume |
652 |
|
Date: 2001/05/01 11:45:00 EDT |
653 |
|
Tag: blume-20010501-pcedittmp |
654 |
|
Description: |
655 |
|
|
656 |
|
Changed install.sh to use the current working directory instead of |
657 |
|
/usr/tmp for a temporary file (pcedittmp). The previous choice |
658 |
|
of /usr/tmp caused trouble with MacOS X because of file premission |
659 |
|
problems. |
660 |
|
|
661 |
|
---------------------------------------------------------------------- |
662 |
|
Name: Matthias Blume |
663 |
|
Date: 2001/04/20 11:10:00 EDT |
664 |
|
Tag: blume-20010420-inMLflag |
665 |
|
Description: |
666 |
|
|
667 |
|
- added vp_limitPtrMask to vproc-state.h |
668 |
|
(for use by the raw-C-calls mechanism to implement proper interrupt |
669 |
|
handling) |
670 |
|
- made the ML compiler aware of various data-structure offsets so it |
671 |
|
can generate code for accessing the vp_inML flag and vp_limitPtrMask |
672 |
|
- tweaked mlriscGen.sml to have it emit interrupt-handling code for |
673 |
|
raw C-calls |
674 |
|
|
675 |
|
---------------------------------------------------------------------- |
676 |
|
Name: Lal George |
677 |
|
Date: 2001/04/20 09:15:28 EDT |
678 |
|
Tag: george-20010420-macosX |
679 |
|
Description: |
680 |
|
|
681 |
|
- Changes to port to Mac OS X; Darwin. |
682 |
|
|
683 |
|
- In the process I found that sqrt was broken on the PPC, because the |
684 |
|
fsqrt instruction is not implemented. |
685 |
|
|
686 |
|
---------------------------------------------------------------------- |
687 |
|
Name: Matthias Blume |
688 |
|
Date: 2001/04/18 12:45:00 EDT |
689 |
|
Tag: blume-20010418-ccalls |
690 |
|
Description: |
691 |
|
|
692 |
|
- fixed two off-by-4 errors in the x86-specific c-calls implementation |
693 |
|
(this bug prevented structure arguments containing pointers from being |
694 |
|
passed correctly) |
695 |
|
- changed the raw-C-call code in mlriscGen.sml in such a way that |
696 |
|
structure arguments are represented as a pointer to the beginning |
697 |
|
of the structure (instead of having a series of synthesized arguments, |
698 |
|
one for each structure member) |
699 |
|
|
700 |
|
- made makeml script's verbosity level configurable via environment |
701 |
|
variable (MAKEML_VERBOSITY) |
702 |
|
|
703 |
|
- eliminated placeholder implementations for f32l, w16s, i16s, and f32s |
704 |
|
in rawmem-x86.sml; we are now using the real thing |
705 |
|
|
706 |
|
---------------------------------------------------------------------- |
707 |
|
Name: Matthias Blume |
708 |
|
Date: 2001/03/22 16:25:00 EST |
709 |
|
Tag: blume-20010322-bootfiles |
710 |
|
Description: |
711 |
|
|
712 |
|
Created a new set of bootfiles (for your automatic installation convenience). |
713 |
|
|
714 |
|
---------------------------------------------------------------------- |
715 |
|
Name: Matthias Blume |
716 |
|
Date: 2001/03/22 15:10:00 EST |
717 |
|
Tag: blume-20010322-rawmem-parcm |
718 |
|
Description: |
719 |
|
|
720 |
|
1. All "raw memory access" primitives for the new FFI are implemented now |
721 |
|
(at least on the x86). |
722 |
|
2. Some further cleanup of CM's parallel make mechanism. |
723 |
|
|
724 |
|
---------------------------------------------------------------------- |
725 |
|
Name: Matthias Blume |
726 |
|
Date: 2001/03/19 17:53:00 EST |
727 |
|
Tag: blume-20010319-parallel |
728 |
|
Description: |
729 |
|
|
730 |
|
Parallel make (using compile servers) now works again. |
731 |
|
|
732 |
|
To this end, CM.stabilize and CMB.make have been modified to work in |
733 |
|
two passes when compile servers are attached: |
734 |
|
1. Compile everything, do not perform stabilization; this pass |
735 |
|
uses compile servers |
736 |
|
2. Stabilize everything; this pass does not use compile servers |
737 |
|
If there are no compile servers, the two passes are combined into one |
738 |
|
(as before). Splitting the passes increases the inherent parallelism |
739 |
|
in the dependency graph because the entire graph including all |
740 |
|
libraries is available at the same time. This, in turn, improves |
741 |
|
server utilization. The downside is that the master process will |
742 |
|
have to do some extra work after compilation is done (because for |
743 |
|
technical reasons it must re-read all the binfiles during stabilization). |
744 |
|
|
745 |
|
---------------------------------------------------------------------- |
746 |
|
Name: Matthias Blume |
747 |
|
Date: 2001/03/16 12:22:00 EST |
748 |
|
Tag: blume-20010316-bootfiles |
749 |
|
Description: |
750 |
|
|
751 |
|
Created a new set of bootfiles (for your automatic installation convenience). |
752 |
|
|
753 |
|
---------------------------------------------------------------------- |
754 |
|
Name: Matthias Blume |
755 |
|
Date: 2001/03/16 11:00:00 EST |
756 |
|
Tag: blume-20010316-MLTREE-fixup |
757 |
|
Description: |
758 |
|
|
759 |
|
This is a minor fixup for an (untagged) earlier commit by Allen. |
760 |
|
(A file was missing). |
761 |
|
|
762 |
|
---------------------------------------------------------------------- |
763 |
|
Name: Allen Leung |
764 |
|
Date: Mon Mar 5 18:54:57 EST 2001 |
765 |
|
Tag: leunga-20010305-cut-support |
766 |
|
|
767 |
|
1. New support for alternative control-flow in MLTREE. |
768 |
|
Currently we support |
769 |
|
|
770 |
|
FLOW_TO(CALL ...., [k1,...,kn]) |
771 |
|
|
772 |
|
This is needed for 'cuts to' in C-- and try/handle-like constructs |
773 |
|
in Moby |
774 |
|
|
775 |
|
New assembler flag "asm-show-cutsto" to turn on control-flow debugging. |
776 |
|
|
777 |
|
2. Register Allocator |
778 |
|
|
779 |
|
Changes in interface [from Fermin, John] |
780 |
|
|
781 |
|
3. Alpha 8-bit SLL support [Fermin] |
782 |
|
|
783 |
|
4. All architectures |
784 |
|
|
785 |
|
A new module (ClusterExpandCopies) for expanding parallel copies. |
786 |
|
|
787 |
|
---------------------------------------------------------------------- |
788 |
|
Name: Allen Leung |
789 |
|
Date: 2001/02/27 23:07:00 EST |
790 |
|
Tag: leunga-20010227-minor-stuff |
791 |
|
|
792 |
|
1. Alpha bug fix for CMOVNE |
793 |
|
2. Handle mltree COND(..,FCMP ...,...) |
794 |
|
3. Bug fix in simplifier |
795 |
|
|
796 |
|
---------------------------------------------------------------------- |
797 |
|
Name: Matthias Blume |
798 |
|
Date: 2001/01/30 17:50:00 EST |
799 |
|
Tag: blume-20010130-sync |
800 |
|
Description: |
801 |
|
|
802 |
|
This is just a minor update to sync my devel branch with the main brach. |
803 |
|
The only visible change is the addition of some README files. |
804 |
|
|
805 |
|
---------------------------------------------------------------------- |
806 |
|
Name: Matthias Blume |
807 |
|
Date: 2001/01/12 23:30:00 JST |
808 |
|
Tag: blume-20010112-bootfiles |
809 |
|
Description: |
810 |
|
|
811 |
|
Made a new set of bootfiles that goes with the current state of the |
812 |
|
repository. |
813 |
|
|
814 |
|
---------------------------------------------------------------------- |
815 |
|
Name: Matthias Blume |
816 |
|
Date: 2001/01/12 21:20:00 JST |
817 |
|
Tag: blume-20010112-sync |
818 |
|
Description: |
819 |
|
|
820 |
|
I am just flushing out some minor changes that had accumulated in |
821 |
|
my private branch in order to sync with the main tree. (This is |
822 |
|
mainly because I had CVS trouble when trying to merge _into_ my |
823 |
|
private branch.) |
824 |
|
|
825 |
|
Most people should be completely unaffected by this. |
826 |
|
|
827 |
|
---------------------------------------------------------------------- |
828 |
|
Name: Allen Leung |
829 |
|
Date: Thu Jan 11 21:03:00 EST 2001 |
830 |
|
Tag: leunga-20010111-labexp=mltree |
831 |
|
Description: |
832 |
|
|
833 |
|
1. Removed the type LabelExp and replace it by MLTree. |
834 |
|
2. Rewritten mltree-simplify with the pattern matcher tool. |
835 |
|
3. There were some bugs in alpha code generator which would break |
836 |
|
64-bit code generation. |
837 |
|
4. Redo the tools to generate code with the |
838 |
|
5. The CM files in MLRISC (and in src/system/smlnj/MLRISC) |
839 |
|
are now generated by perl scripts. |
840 |
|
|
841 |
|
---------------------------------------------------------------------- |
842 |
|
Name: Matthias Blume |
843 |
|
Date: 2001/01/10 21:55:00 JST |
844 |
|
Tag: blume-20010110-rcc |
845 |
|
Description: |
846 |
|
|
847 |
|
The RCC stuff now seems to work (but only on the x86). |
848 |
|
This required hacking of the c-calls interface (and -implementation) in |
849 |
|
MLRISC. |
850 |
|
|
851 |
|
Normal compiler users should be unaffected. |
852 |
|
|
853 |
|
---------------------------------------------------------------------- |
854 |
|
Name: Matthias Blume |
855 |
|
Date: 2001/01/09 01:20:00 JST |
856 |
|
Tag: blume-20010109-rcc |
857 |
|
Description: |
858 |
|
|
859 |
|
This is a fairly big patch, flushing out a large number of pending |
860 |
|
changes that I made to my development copy over the last couple of days. |
861 |
|
|
862 |
|
Of practical relevance at this moment is a workaround for a pickling |
863 |
|
bug that Allen ran into the other day. The cause of the bug itself is |
864 |
|
still unknown and it might be hard to fix it properly, but the |
865 |
|
workaround has some merits of its own (namely somewhat reducing pickling |
866 |
|
overhead for certain libraries). Therefore, I think this solution should |
867 |
|
be satisfactory at this time. |
868 |
|
|
869 |
|
The rest of the changes (i.e., the vast majority) has to do with my |
870 |
|
ongoing efforts of providing direct support for C function calls from |
871 |
|
ML. At the moment there is a new primop "RAW_CCALL", typing magic |
872 |
|
in types/cproto.sml (invoked from FLINT/trans/translate.sml), a new |
873 |
|
case in the FLINT CPS datatype (RCC), changes to cps/convert.sml to |
874 |
|
translate uses of RAW_CCALL into RCC, and changes to mlriscGen.sml to |
875 |
|
handle RCC. |
876 |
|
|
877 |
|
The last part (the changes to mlriscGen.sml) are still known to be |
878 |
|
wrong on the x86 and not implemented on all other architectures. But |
879 |
|
the infrastructure is in place. I had to change a few functor |
880 |
|
signatures in the backend to be able to route the CCalls interface |
881 |
|
from MLRISC there, and I had to specialize the mltree type (on the |
882 |
|
x86) to include the necessary extensions. (The extensions themselves |
883 |
|
were already there and redy to go in MLRISC/x86). |
884 |
|
|
885 |
|
Everything should be very happy as soon as someone helps me with |
886 |
|
mlriscGen.sml... |
887 |
|
|
888 |
|
In any case, nothing of this should matter to anyone as long as the |
889 |
|
new primop is not being used (which is going to be the case unless you |
890 |
|
find it where I hid it :). The rest of the compiler is completely |
891 |
|
unaffected. |
892 |
|
|
893 |
|
---------------------------------------------------------------------- |
894 |
|
Name: Matthias Blume |
895 |
|
Date: 2001/01/05 00:30:00 JST |
896 |
|
Tag: blume-20010105-primops |
897 |
|
Description: |
898 |
|
|
899 |
|
Added some experimental support for work that I am doing right now. |
900 |
|
These changes mostly concern added primops, but there is also a new |
901 |
|
experimental C library in the runtime system (but currently not enabled |
902 |
|
anywhere except on Linux/X86). |
903 |
|
|
904 |
|
In the course of adding primops (and playing with them), I discovered that |
905 |
|
Zhong's INL_PRIM hack (no type info for certain primops) was, in fact, badly |
906 |
|
broken. (Zhong was very right he labeled this stuff as "major gross hack".) |
907 |
|
To recover, I made type information in INL_PRIM mandatory and changed |
908 |
|
prim.sml as well as built-in.sml accordingly. The InLine structure now |
909 |
|
has complete, correct type information (i.e., no bottom types). |
910 |
|
|
911 |
|
Since all these changes mean that we need new binfiles, I also bumped the |
912 |
|
version number to 110.32.1. |
913 |
|
|
914 |
|
---------------------------------------------------------------------- |
915 |
|
Name: Matthias Blume |
916 |
|
Date: 2000/12/30 22:10:00 JST |
917 |
|
Tag: blume-20001230-various |
918 |
|
Description: |
919 |
|
|
920 |
|
Added proxy libraries for MLRISC and let MLRISC libraries refer |
921 |
|
to each other using path anchors. (See CM manual for explanation.) |
922 |
|
|
923 |
|
Updated CM documentation. |
924 |
|
|
925 |
|
Fixed some bugs in CM. |
926 |
|
|
927 |
|
Implemented "proxy" libraries (= syntactic sugar for CM). |
928 |
|
|
929 |
|
Added "-quiet" option to makeml and changed runtime system accordingly. |
930 |
|
|
931 |
|
Added cleanup handler for exportML to reset timers and compiler stats. |
932 |
|
|
933 |
|
---------------------------------------------------------------------- |
934 |
|
Name: Lal George |
935 |
|
Date: 2000/12/22 22:22:58 EST 2000 |
936 |
|
Tag: Release_110_32 |
937 |
|
Description: |
938 |
|
|
939 |
|
Infinite precision used throughout MLRISC. |
940 |
|
see MLRISC/mltree/machine-int.sig |
941 |
|
|
942 |
|
---------------------------------------------------------------------- |
943 |
|
Name: Matthias Blume |
944 |
|
Date: 2000/12/22 23:16:00 JST |
945 |
|
Tag: blume-20001222-warn |
946 |
|
Description: |
947 |
|
|
948 |
|
Corrected wording and formatting of some CM warning message which I |
949 |
|
broke in my previous patch. |
950 |
|
|
951 |
|
---------------------------------------------------------------------- |
952 |
|
Name: Matthias Blume |
953 |
|
Date: 2000/12/22 21:20:00 JST |
954 |
|
Tag: blume-20001222-anchorenv |
955 |
|
Description: |
956 |
|
|
957 |
|
Fixed CM's handling of anchor environments in connection with CMB.make. |
958 |
|
|
959 |
|
---------------------------------------------------------------------- |
960 |
|
Name: Matthias Blume |
961 |
|
Date: 2000/12/22 13:15:00 JST |
962 |
|
Tag: blume-20001222-cleanup |
963 |
|
Description: |
964 |
|
|
965 |
|
Removed src/cm/ffi which does not (and did not) belong here. |
966 |
|
|
967 |
|
---------------------------------------------------------------------- |
968 |
|
Name: Matthias Blume |
969 |
|
Date: 2000/12/21 23:55:00 JST |
970 |
|
Tag: blume-20001221-exn |
971 |
|
Description: |
972 |
|
|
973 |
|
Probably most important: CM no longer silently swallows all exceptions |
974 |
|
in the compiler. |
975 |
|
Plus: some other minor CM changes. For example, CM now reports some |
976 |
|
sizes for generated binfiles (code, data, envpickle, lambdapickle). |
977 |
|
|
978 |
---------------------------------------------------------------------- |
---------------------------------------------------------------------- |
979 |
Name: Matthias Blume |
Name: Matthias Blume |
980 |
Date: 2000/12/15 00:01:05 JST |
Date: 2000/12/15 00:01:05 JST |