8 |
The form of an entry should be: |
The form of an entry should be: |
9 |
|
|
10 |
Name: |
Name: |
11 |
Date: |
Date: yyyy/mm/dd |
12 |
Tag: <post-commit CVS tag> |
Tag: <post-commit CVS tag> |
13 |
Description: |
Description: |
14 |
|
---------------------------------------------------------------------- |
15 |
|
Name: Matthias Blume |
16 |
|
Date: 2002/01/15 |
17 |
|
Tag: blume-20020115-ffiupdates |
18 |
|
Description: |
19 |
|
|
20 |
|
1. Fix for bug resulting in single-precision float values being returned |
21 |
|
incorrectly from FFI calls. |
22 |
|
|
23 |
|
2. Small modifications to C FFI API: |
24 |
|
|
25 |
|
- memory-allocation routines return straight objects (no options) |
26 |
|
and raise an exception in out-of-memory situations |
27 |
|
- unsafe extensions to cast between function pointers and pointers |
28 |
|
from/to ints |
29 |
|
- added structure C_Debug as an alternative to structure C where |
30 |
|
pointer-dereferencing (|*| and |*!) always check for null-pointers |
31 |
|
- added open_lib' to DynLinkage; open_lib' works like open_lib |
32 |
|
but also takes a (possibly empty) list of existing library handles |
33 |
|
that the current library depends on |
34 |
|
|
35 |
|
---------------------------------------------------------------------- |
36 |
|
Name: Matthias Blume |
37 |
|
Date: 2002/01/10 |
38 |
|
Tag: blume-20020110-newffigen |
39 |
|
Description: |
40 |
|
|
41 |
|
1. Updates to portable graph code. |
42 |
|
|
43 |
|
2. Major update to ml-nlffigen and ml-nlffi-lib. Things are much |
44 |
|
more scalable now so that even huge interfaces such as the one |
45 |
|
for GTK compile in finite time and space. :-) |
46 |
|
See src/ml-nlffigen/README for details on what's new. |
47 |
|
|
48 |
|
---------------------------------------------------------------------- |
49 |
|
Name: Lal George |
50 |
|
Date: 2001/01/09 14:31:35 EST 2002 |
51 |
|
Tag: george-20011206-rm-native-copy |
52 |
|
Description: |
53 |
|
|
54 |
|
Removed the native COPY and FCOPY instructions |
55 |
|
from all the architectures and replaced it with the |
56 |
|
explicit COPY instruction from the previous commit. |
57 |
|
|
58 |
|
It is now possible to simplify many of the optimizations |
59 |
|
modules that manipulate copies. This has not been |
60 |
|
done in this change. |
61 |
|
|
62 |
|
---------------------------------------------------------------------- |
63 |
|
Name: Lal George |
64 |
|
Date: 2001/12/06 16:50:13 EST 2001 |
65 |
|
Tag: george-20011206-mlrisc-instruction |
66 |
|
Description: |
67 |
|
|
68 |
|
Changed the representation of instructions from being fully abstract |
69 |
|
to being partially concrete. That is to say: |
70 |
|
|
71 |
|
from |
72 |
|
type instruction |
73 |
|
|
74 |
|
to |
75 |
|
type instr (* machine instruction *) |
76 |
|
|
77 |
|
datatype instruction = |
78 |
|
LIVE of {regs: C.cellset, spilled: C.cellset} |
79 |
|
| KILL of {regs: C.cellset, spilled: C.cellset} |
80 |
|
| COPYXXX of {k: CB.cellkind, dst: CB.cell list, src: CB.cell list} |
81 |
|
| ANNOTATION of {i: instruction, a: Annotations.annotation} |
82 |
|
| INSTR of instr |
83 |
|
|
84 |
|
This makes the handling of certain special instructions that appear on |
85 |
|
all architectures easier and uniform. |
86 |
|
|
87 |
|
LIVE and KILL say that a list of registers are live or killed at the |
88 |
|
program point where they appear. No spill code is generated when an |
89 |
|
element of the 'regs' field is spilled, but the register is moved to |
90 |
|
the 'spilled' (which is present, more for debugging than anything else). |
91 |
|
|
92 |
|
LIVE replaces the (now deprecated) DEFFREG instruction on the alpha. |
93 |
|
We used to generate: |
94 |
|
|
95 |
|
DEFFREG f1 |
96 |
|
f1 := f2 + f3 |
97 |
|
trapb |
98 |
|
|
99 |
|
but now generate: |
100 |
|
|
101 |
|
f1 := f2 + f3 |
102 |
|
trapb |
103 |
|
LIVE {regs=[f1,f2,f3], spilled=[]} |
104 |
|
|
105 |
|
Furthermore, the DEFFREG (hack) required that all floating point instruction |
106 |
|
use all registers mentioned in the instruction. Therefore f1 := f2 + f3, |
107 |
|
defines f1 and uses [f1,f2,f3]! This hack is no longer required resulting |
108 |
|
in a cleaner alpha implementation. (Hopefully, intel will not get rid of |
109 |
|
this architecture). |
110 |
|
|
111 |
|
COPYXXX is intended to replace the parallel COPY and FCOPY available on |
112 |
|
all the architectures. This will result in further simplification of the |
113 |
|
register allocator that must be aware of them for coalescing purposes, and |
114 |
|
will also simplify certain aspects of the machine description that provides |
115 |
|
callbacks related to parallel copies. |
116 |
|
|
117 |
|
ANNOTATION should be obvious, and now INSTR represents the honest to God |
118 |
|
machine instruction set! |
119 |
|
|
120 |
|
The <arch>/instructions/<arch>Instr.sml files define certain utility |
121 |
|
functions for making porting easier -- essentially converting upper case |
122 |
|
to lower case. All machine instructions (of type instr) are in upper case, |
123 |
|
and the lower case form generates an MLRISC instruction. For example on |
124 |
|
the alpha we have: |
125 |
|
|
126 |
|
datatype instr = |
127 |
|
LDA of {r:cell, b:cell, d:operand} |
128 |
|
| ... |
129 |
|
|
130 |
|
val lda : {r:cell, b:cell, d:operand} -> instruction |
131 |
|
... |
132 |
|
|
133 |
|
where lda is just (INSTR o LDA), etc. |
134 |
|
|
135 |
|
---------------------------------------------------------------------- |
136 |
|
Name: Matthias Blume |
137 |
|
Date: 2001/11/22 21:40:00 EST |
138 |
|
Tag: Release_110_37 |
139 |
|
Description: |
140 |
|
|
141 |
|
Release 110.37. This time for real. |
142 |
|
|
143 |
|
---------------------------------------------------------------------- |
144 |
|
Name: Matthias Blume |
145 |
|
Date: 2001/11/21 16:35:00 EST |
146 |
|
Tag: blume-20011121-foot-in-mouth |
147 |
|
Description: |
148 |
|
|
149 |
|
Removed the "Release_110_37" tag because of a serious bug. |
150 |
|
This will be re-tagged once the bug is fixed. |
151 |
|
|
152 |
|
---------------------------------------------------------------------- |
153 |
|
Name: Matthias Blume |
154 |
|
Date: 2001/11/21 16:14:00 EST |
155 |
|
Tag: blume-20011121-forgottenfile |
156 |
|
Description: |
157 |
|
|
158 |
|
Forgot to add a file. (Just a .tex-file -- part of |
159 |
|
the CM manual source.) |
160 |
|
|
161 |
|
---------------------------------------------------------------------- |
162 |
|
Name: Matthias Blume |
163 |
|
Date: 2001/11/21 16:10:00 EST |
164 |
|
Tag: blume-20011121-invalid_110_37 |
165 |
|
Description: |
166 |
|
|
167 |
|
Note: I removed the original tag "Release_110_37" from this commit |
168 |
|
because we found a serious bug in all non-x86 backends. |
169 |
|
- Matthias |
170 |
|
|
171 |
|
1. Modifications to the SML/NJ code generator and to the runtime system |
172 |
|
so that code object name strings are directly inserted into code |
173 |
|
objects at code generation time. The only business the runtime system |
174 |
|
has with this is now to read the name strings on occasions. |
175 |
|
(The encoding of the name string has also changed somewhat.) |
176 |
|
|
177 |
|
2. CM now implements a simple "set calculus" for specifying export lists. |
178 |
|
In particular, it is now possible to refer to the export lists of |
179 |
|
other libraries/groups/sources and form unions as well as differences. |
180 |
|
See the latest CM manual for details. |
181 |
|
|
182 |
|
3. An separate notion of "proxy" libraries has again be eliminated from |
183 |
|
CM's model. (Proxy libraries are now simply a special case of using |
184 |
|
the export list calculus.) |
185 |
|
|
186 |
|
4. Some of the existing libraries now take advantage of the new set |
187 |
|
calculus. |
188 |
|
(Notice that not all libraries have been converted because some |
189 |
|
of the existing .cm-files are supposed to be backward compatible |
190 |
|
with 110.0.x.) |
191 |
|
|
192 |
|
5. Some cleanup in stand-alone programs. (Don't use "exnMessage" -- use |
193 |
|
"General.exnMessage"! The former relies on a certain hook to be |
194 |
|
initialized, and that often does not happen in the stand-alone case.) |
195 |
|
|
196 |
|
---------------------------------------------------------------------- |
197 |
|
Name: Lal George |
198 |
|
Date: 2001/11/21 13:56:18 EST |
199 |
|
Tag: george-2001121-pseudo-ops |
200 |
|
Description: |
201 |
|
|
202 |
|
Implemented a complete redesign of MLRISC pseudo-ops. Now there |
203 |
|
ought to never be any question of incompatabilities with |
204 |
|
pseudo-op syntax expected by host assemblers. |
205 |
|
|
206 |
|
For now, only modules supporting GAS syntax are implemented |
207 |
|
but more should follow, such as MASM, and vendor assembler |
208 |
|
syntax, e.g. IBM as, Sun as, etc. |
209 |
|
|
210 |
|
---------------------------------------------------------------------- |
211 |
|
Name: Matthias Blume |
212 |
|
Date: 2001/11/14 11:52:00 EST |
213 |
|
Tag: blume-20011114-srcname |
214 |
|
Description: |
215 |
|
|
216 |
|
1. Routed the name of the current source file to mlriscgen where it |
217 |
|
should be directly emitted into the code object. (This last part |
218 |
|
is yet to be done.) |
219 |
|
|
220 |
|
2. Some cleanup of the pgraph code to make it match the proposal that |
221 |
|
I put out the other day. (The proposal notwithstanding, things are |
222 |
|
still in flux here.) |
223 |
|
|
224 |
|
---------------------------------------------------------------------- |
225 |
|
Name: Lal George |
226 |
|
Date: 2001/11/14 09:44:04 EST |
227 |
|
Tag: |
228 |
|
Description: |
229 |
|
|
230 |
|
Fix for a backpatching bug reported by Allen. |
231 |
|
|
232 |
|
Because the boundary between short and long span-dependent |
233 |
|
instructions is +/- 128, there are an astounding number of |
234 |
|
span-dependent instructions whose size is over estimated. |
235 |
|
|
236 |
|
Allen came up with the idea of letting the size of span |
237 |
|
dependent instructions be non-monotonic, for a maxIter |
238 |
|
number of times, after which the size must be monotonically |
239 |
|
increasing. |
240 |
|
|
241 |
|
This table shows the number of span-dependent instructions |
242 |
|
whose size was over-estimated as a function of maxIter, for the |
243 |
|
file Parse/parse/ml.grm.sml: |
244 |
|
|
245 |
|
maxIter # of instructions: |
246 |
|
10 687 |
247 |
|
20 438 |
248 |
|
30 198 |
249 |
|
40 0 |
250 |
|
|
251 |
|
In compiling the compiler, there is no significant difference in |
252 |
|
compilation speed between maxIter=10 and maxIter=40. Actually, |
253 |
|
my measurements showed that maxIter=40 was a tad faster than |
254 |
|
maxIter=10! Also 96% of the files in the compiler reach a fix |
255 |
|
point within 13 iterations, so fixing maxIter at 40, while high, |
256 |
|
is okay. |
257 |
|
|
258 |
|
---------------------------------------------------------------------- |
259 |
|
Name: Matthias Blume |
260 |
|
Date: 2001/10/31 15:25:00 EST |
261 |
|
Tag: blume-20011031-pgraph |
262 |
|
Description: |
263 |
|
|
264 |
|
CKIT: |
265 |
|
* Changed the "Function" constructor of type Ast.ctype to carry optional |
266 |
|
argument identifiers. |
267 |
|
* Changed the return type of TypeUtil.getFunction accordingly. |
268 |
|
* Type equality ignores the argument names. |
269 |
|
* TypeUtil.composite tries to preserve argument names but gives up quickly |
270 |
|
if there is a mismatch. |
271 |
|
|
272 |
|
installation script: |
273 |
|
* attempts to use "curl" if available (unless "wget" is available as well) |
274 |
|
|
275 |
|
CM: |
276 |
|
* has an experimental implementation of "portable graphs" which I will |
277 |
|
soon propose as an implementation-independent library format |
278 |
|
* there are also new libraries $/pgraph.cm and $/pgraph-util.cm |
279 |
|
|
280 |
|
NLFFI-LIB: |
281 |
|
* some cleanup (all cosmetic) |
282 |
|
|
283 |
|
NLFFIGEN: |
284 |
|
* temporarily disabled the mechanism that suppresses ML output for |
285 |
|
C definitions whose identifiers start with an underscore character |
286 |
|
* generate val bindings for enum constants |
287 |
|
* user can request that only one style (light or heavy) is being used; |
288 |
|
default is to use both (command-line arguments: -heavy and -light) |
289 |
|
* fixed bug in handling of function types involving incomplete pointers |
290 |
|
* generate ML entry points that take record arguments (i.e., using |
291 |
|
named arguments) for C functions that have a prototype with named |
292 |
|
arguments |
293 |
|
(see changes to CKIT) |
294 |
|
|
295 |
|
---------------------------------------------------------------------- |
296 |
|
Name: Allen Leung |
297 |
|
Date: 2001/10/27 20:34:00 EDT |
298 |
|
Tag: leunga-20011027-x86-fast-fp-call |
299 |
|
Description: |
300 |
|
|
301 |
|
Fixed the bug described in blume-20010920-slowfp. |
302 |
|
|
303 |
|
The fix involves |
304 |
|
1. generating FCOPYs in FSTP in ia32-svid |
305 |
|
2. marking a CALL with the appropriate annotation |
306 |
|
|
307 |
|
---------------------------------------------------------------------- |
308 |
|
Name: Matthias Blume |
309 |
|
Date: 2001/10/16 11:32:00 EDT |
310 |
|
Tag: blume-20011016-netbsd |
311 |
|
Description: |
312 |
|
|
313 |
|
Underscore patch from Chris Richards (fixing problem with compiling |
314 |
|
runtime system under recent NetBSD). |
315 |
|
|
316 |
|
---------------------------------------------------------------------- |
317 |
|
Name: Allen Leung |
318 |
|
Date: 2001/10/12 17:18:32 EDT 2001 |
319 |
|
Tag: leung-20011012-x86-printflowgraph |
320 |
|
Description: |
321 |
|
|
322 |
|
X86RA now uses a valid (instead of dummy) PrintFlowgraph module. |
323 |
|
|
324 |
|
---------------------------------------------------------------------- |
325 |
|
Name: Lal George |
326 |
|
Date: 2001/10/11 23:51:34 EDT |
327 |
|
Tag: george-20011011-too-many-instrs |
328 |
|
Description: |
329 |
|
|
330 |
|
The representation of a program point never expected to see more |
331 |
|
than 65536 instructions in a basic block! |
332 |
|
|
333 |
|
---------------------------------------------------------------------- |
334 |
|
Name: Lal George |
335 |
|
Date: 2001/10/09 09:41:37 EDT |
336 |
|
Tag: george-20011008-mlrisc-labels |
337 |
|
Description: |
338 |
|
|
339 |
|
Changed the machine description files to support printing of |
340 |
|
local and global labels in assembly code, based on host assembler |
341 |
|
conventions. |
342 |
|
|
343 |
|
---------------------------------------------------------------------- |
344 |
|
Name: Matthias Blume |
345 |
|
Date: 2001/09/25 15:25:00 EDT |
346 |
|
Tag: blume-20010925-exninfo |
347 |
|
Description: |
348 |
|
|
349 |
|
I provided a non-hook implementation of exnName (at the toplevel) and |
350 |
|
made the "dummy" implementation of exnMessage (at the toplevel) more |
351 |
|
useful: if nothing gets "hooked in", then at least you are going to |
352 |
|
see the exception name and a message indicating why you don't see more. |
353 |
|
|
354 |
|
[For the time being, programs that need exnMessage and want to use |
355 |
|
ml-build should either use General.exnMessage (strongly recommended) or |
356 |
|
refer to structure General at some other point so that CM sees a |
357 |
|
static dependency.] |
358 |
|
|
359 |
|
[Similar remarks go for "print" and "use": If you want to use their |
360 |
|
functionality in stand-alone programs generated by ml-build, then use |
361 |
|
TextIO.output and Backend.Interact.useFile (from $smlnj/compiler.cm).] |
362 |
|
|
363 |
|
---------------------------------------------------------------------- |
364 |
|
Name: Matthias Blume |
365 |
|
Date: 2001/09/20 17:28:00 EDT |
366 |
|
Tag: blume-20010920-slowfp |
367 |
|
Description: |
368 |
|
|
369 |
|
Allen says that x86-fast-fp is not safe yet, so I turned it off again... |
370 |
|
|
371 |
|
---------------------------------------------------------------------- |
372 |
|
Name: Matthias Blume |
373 |
|
Date: 2001/09/20 17:20:00 EDT |
374 |
|
Tag: blume-20010920-canonicalpaths |
375 |
|
Description: |
376 |
|
|
377 |
|
0. Updated the BOOT file (something that I forgot to do earlier). |
378 |
|
|
379 |
|
1. Small internal change to CM so that it avoids "/../" in filenames |
380 |
|
as much as possible (but only where it is safe). |
381 |
|
|
382 |
|
2. Changed config/_run-sml (resulting in a changed bin/.run-sml) so |
383 |
|
that arguments that contain delimiters are passed through correctly. |
384 |
|
This change also means that all "special" arguments of the form |
385 |
|
@SMLxxx... must come first. |
386 |
|
|
387 |
|
3. Changed install script to put relative anchor names for tool commands |
388 |
|
into pathconfig. |
389 |
|
|
390 |
|
---------------------------------------------------------------------- |
391 |
|
Name: Matthias Blume |
392 |
|
>>>>>>> 1.169 |
393 |
|
Date: 2001/09/18 15:35:00 EDT |
394 |
|
Tag: blume-20010918-readme11036 |
395 |
|
Description: |
396 |
|
|
397 |
|
Added README files. |
398 |
|
|
399 |
|
---------------------------------------------------------------------- |
400 |
|
Name: Matthias Blume |
401 |
|
Date: 2001/09/18 11:45:00 EDT |
402 |
|
Tag: Release_110_36 (retag) |
403 |
|
Description: |
404 |
|
|
405 |
|
Fixed mistake in config/preloads. Retagged as 110.36. |
406 |
|
|
407 |
|
---------------------------------------------------------------------- |
408 |
|
Name: Matthias Blume |
409 |
|
Date: 2001/09/18 09:40:00 EDT |
410 |
|
Tag: Release_110_36_orig (tag changed) |
411 |
|
Description: |
412 |
|
|
413 |
|
New version (110.36). New bootfiles. |
414 |
|
|
415 |
|
---------------------------------------------------------------------- |
416 |
|
Name: Matthias Blume |
417 |
|
Date: 2001/09/14 16:15:00 EDT |
418 |
|
Tag: blume-20010914-x86fastfp |
419 |
|
Description: |
420 |
|
|
421 |
|
John committed some changes that Allen made, in particular a (hopefully) |
422 |
|
correctly working version of the x86-fp module. |
423 |
|
|
424 |
|
I changed the default setting of the Control.MLRISC.getFlag "x86-fast-fp" |
425 |
|
flag to "true". Everything seems to compile to a fixpoint ok, and |
426 |
|
"mandelbrot" speeds up by about 15%. |
427 |
|
|
428 |
|
---------------------------------------------------------------------- |
429 |
|
Name: Matthias Blume |
430 |
|
Date: 2001/09/13 11:20:00 EDT |
431 |
|
Tag: blume-20010913-minimal |
432 |
|
Description: |
433 |
|
|
434 |
|
1. Stefan Monnier's patch to fix a miscompilation problem that |
435 |
|
was brought to light by John Reppy's work on Moby. |
436 |
|
|
437 |
|
2. Implemented a minimal "structure Compiler" that contains just |
438 |
|
"version" and "architecture". The minimal version will be |
439 |
|
available when the full version is not. This is for backward- |
440 |
|
compatibility with code that wants to test Compiler.version. |
441 |
|
|
442 |
|
---------------------------------------------------------------------- |
443 |
|
Name: Matthias Blume |
444 |
|
Date: 2001/08/28 14:03:00 EDT |
445 |
|
Tag: blume-20010828-ml-lex |
446 |
|
Description: |
447 |
|
|
448 |
|
Fix for bug 1581, received from Neophytos Michael. |
449 |
|
|
450 |
|
---------------------------------------------------------------------- |
451 |
|
Name: Matthias Blume |
452 |
|
Date: 2001/08/27 11:20:00 EDT |
453 |
|
Tag: blume-20010827-readme11035 |
454 |
|
Description: |
455 |
|
|
456 |
|
Fleshed out the README file for 110.35. |
457 |
|
|
458 |
|
---------------------------------------------------------------------- |
459 |
|
Name: Matthias Blume |
460 |
|
Date: 2001/08/24 17:10:00 EDT |
461 |
|
Tag: Release_110_35 |
462 |
|
Description: |
463 |
|
|
464 |
|
New version number (110.35). New bootfiles. |
465 |
|
|
466 |
|
---------------------------------------------------------------------- |
467 |
|
Name: Lal George |
468 |
|
Date: 2001/08/24 13:47:18 EDT 2001 |
469 |
|
Tag: george-20010824-MLRISC-graphs |
470 |
|
Description: |
471 |
|
|
472 |
|
removed clusters from MLRISC completely and replaced with graphs. |
473 |
|
|
474 |
|
---------------------------------------------------------------------- |
475 |
|
Name: Matthias Blume |
476 |
|
Date: 2001/08/23 17:50:00 EDT |
477 |
|
Tag: blume-20010823-toplevel |
478 |
|
Description: |
479 |
|
|
480 |
|
- some reorganization of the code that implements various kinds of |
481 |
|
environments in the compiler (static, dynamic, symbolic, combined) |
482 |
|
- re-implemented the EnvRef module so that evalStream works properly |
483 |
|
(if the stream contains references to "use", "CM.make", etc.) |
484 |
|
- cleaned up evalloop.sml and interact.sml (but they need more cleaning) |
485 |
|
|
486 |
|
---------------------------------------------------------------------- |
487 |
|
Name: Matthias Blume |
488 |
|
Date: 2001/08/20 15:50 EDT |
489 |
|
Tag: blume20010820-slipup |
490 |
|
Description: |
491 |
|
|
492 |
|
I forgot to commit a few files. Here they are... |
493 |
|
|
494 |
|
---------------------------------------------------------------------- |
495 |
|
Name: Matthias Blume |
496 |
|
Date: 2001/08/20 15:35:00 EDT |
497 |
|
Tag: blume-20010820-debugprof |
498 |
|
Description: |
499 |
|
|
500 |
|
!!!! NEW BOOTFILES !!!! |
501 |
|
|
502 |
|
This is another round of reorganizing the compiler sources. This |
503 |
|
time the main goal was to factor out all the "instrumentation" |
504 |
|
passes (for profiling and backtracing) into their own library. |
505 |
|
The difficulty was to do it in such a way that it does not depend |
506 |
|
on elaborate.cm but only on elabdata.cm. |
507 |
|
|
508 |
|
Therefore there have been further changes to both elaborate.cm and |
509 |
|
elabdata.cm -- more "generic" things have been moved from the former |
510 |
|
to the latter. As a result, I was forced to split the assignment |
511 |
|
of numbers indicating "primtyc"s into two portions: SML-generic and |
512 |
|
SML/NJ-specific. Since it would have been awkward to maintain, |
513 |
|
I bit the bullet and actually _changed_ the mapping between these |
514 |
|
numbers and primtycs. The bottom line of this is that you need |
515 |
|
a new set of bin- and bootfiles. |
516 |
|
|
517 |
|
I have built new bootfiles for all architectures, so doing a fresh |
518 |
|
checkout and config/install.sh should be all you need. |
519 |
|
|
520 |
|
The newly created library's name is |
521 |
|
|
522 |
|
$smlnj/viscomp/debugprof.cm |
523 |
|
|
524 |
|
and its sources live under |
525 |
|
|
526 |
|
src/compiler/DebugProf |
527 |
|
|
528 |
|
---------------------------------------------------------------------- |
529 |
|
Name: Matthias Blume |
530 |
|
Date: 2001/08/15 17:15:00 EDT |
531 |
|
Tag: blume-20010815-compreorg |
532 |
|
Description: |
533 |
|
|
534 |
|
This is a first cut at reorganizing the CM libraries that make up the |
535 |
|
core of the compiler. The idea is to separate out pieces that could |
536 |
|
be used independently by tools, e.g., the parser, the typechecker, etc. |
537 |
|
|
538 |
|
The current status is a step in this direction, but it is not quite |
539 |
|
satisfactory yet. Expect more changes in the future. |
540 |
|
|
541 |
|
Here is the current (new) organization... |
542 |
|
|
543 |
|
What used to be $smlnj/viscomp/core.cm is now divided into |
544 |
|
six CM libraries: |
545 |
|
|
546 |
|
$smlnj/viscomp/basics.cm |
547 |
|
/parser.cm |
548 |
|
/elabdata.cm |
549 |
|
/elaborate.cm |
550 |
|
/execute.cm |
551 |
|
/core.cm |
552 |
|
|
553 |
|
The CM files for these libraries live under src/system/smlnj/viscomp. |
554 |
|
All these libraries are proxy libraries that contain precisely |
555 |
|
one CM library component. Here are the locations of the components |
556 |
|
(all within the src/compiler tree): |
557 |
|
|
558 |
|
Basics/basics.cm |
559 |
|
Parse/parser.cm |
560 |
|
ElabData/elabdata.cm |
561 |
|
Elaborator/elaborate.cm |
562 |
|
Execution/execute.cm |
563 |
|
core.cm |
564 |
|
|
565 |
|
[This organization is the same that has been used already |
566 |
|
for a while for the architecture-specific parts of the visible |
567 |
|
compiler and for the old version of core.cm.] |
568 |
|
|
569 |
|
As you will notice, many source files have been moved from their |
570 |
|
respective original locations to a new home in one of the above |
571 |
|
subtrees. |
572 |
|
|
573 |
|
The division of labor between the new libraries is the following: |
574 |
|
|
575 |
|
basics.cm: |
576 |
|
- Simple, basic definitions that pertain to many (or all) of |
577 |
|
the other libraries. |
578 |
|
parser.cm: |
579 |
|
- The SML parser, producing output of type Ast.dec. |
580 |
|
- The type family for Ast is also defined and exported here. |
581 |
|
elabdata.cm: |
582 |
|
- The datatypes that describe input and output of the elaborator. |
583 |
|
This includes types, absyn, and static environments. |
584 |
|
elaborator.cm: |
585 |
|
- The SML/NJ type checker and elaborator. |
586 |
|
This maps an Ast.dec (with a given static environment) to |
587 |
|
an Absyn.dec (with a new static environment). |
588 |
|
- This libraries implements certain modules that used to be |
589 |
|
structures as functors (to remove dependencies on FLINT). |
590 |
|
execute.cm: |
591 |
|
- Everything having to do with executing binary code objects. |
592 |
|
- Dynamic environments. |
593 |
|
core.cm: |
594 |
|
- SML/NJ-specific instantiations of the elaborator and MLRISC. |
595 |
|
- Top-level modules. |
596 |
|
- FLINT (this should eventually become its own library) |
597 |
|
|
598 |
|
Notes: |
599 |
|
|
600 |
|
I am not 100% happy with the way I separated the elaborator (and its |
601 |
|
data structures) from FLINT. Two instances of the same problem: |
602 |
|
|
603 |
|
1. Data structures contain certain fields that carry FLINT-specific |
604 |
|
information. I hacked around this using exn and the property list |
605 |
|
module from smlnj-lib. But the fact that there are middle-end |
606 |
|
specific fields around at all is a bit annoying. |
607 |
|
|
608 |
|
2. The elaborator calculates certain FLINT-related information. I tried |
609 |
|
to make this as abstract as I could using functorization, but, again, |
610 |
|
the fact that the elaborator has to perform calculations on behalf |
611 |
|
of the middle-end at all is not nice. |
612 |
|
|
613 |
|
3. Having to used exn and property lists is unfortunate because it |
614 |
|
weakens type checking. The other alternative (parameterizing |
615 |
|
nearly *everything*) is not appealing, though. |
616 |
|
|
617 |
|
I removed the "rebinding =" warning hack because due to the new organization |
618 |
|
it was awkward to maintain it. As a result, the compiler now issues some of |
619 |
|
these warnings when compiling init.cmi during bootstrap compilation. On |
620 |
|
the plus side, you also get a warning when you do, for example: |
621 |
|
val op = = Int32.+ |
622 |
|
which was not the case up to now. |
623 |
|
|
624 |
|
I placed "assign" and "deref" into the _Core structure so that the |
625 |
|
code that deals with the "lazy" keyword can find them there. This |
626 |
|
removes the need for having access to the primitive environment |
627 |
|
during elaboration. |
628 |
|
|
629 |
|
---------------------------------------------------------------------- |
630 |
|
Name: Matthias Blume |
631 |
|
Date: 2001/08/13 |
632 |
|
Tag: blume-20010813-closures |
633 |
|
Description: |
634 |
|
|
635 |
|
This fix was sent to us by Zhong Shao. It is supposed to improve the |
636 |
|
performance of certain loops by avoiding needless closure allocation. |
637 |
|
|
638 |
|
---------------------------------------------------------------------- |
639 |
|
Name: Lal George |
640 |
|
Date: 2001/07/31 10:03:23 EDT 2001 |
641 |
|
Tag: george-20010731-x86-fmalloc |
642 |
|
Description: Fixed bug in x86 calls |
643 |
|
|
644 |
|
There was a bug where call instructions would mysteriously |
645 |
|
vanish. The call instruction had to be one that returned |
646 |
|
a floating point value. |
647 |
|
|
648 |
|
---------------------------------------------------------------------- |
649 |
|
Name: Lal George |
650 |
|
Date: 2001/07/19 16:36:29 EDT 2001 |
651 |
|
Tag: george-20010719-simple-cells |
652 |
|
Description: |
653 |
|
|
654 |
|
I have dramatically simplified the interface for CELLS in MLRISC. |
655 |
|
|
656 |
|
In summary, the cells interface is broken up into three parts: |
657 |
|
|
658 |
|
1. CellsBasis : CELLS_BASIS |
659 |
|
|
660 |
|
CellsBasis is a top level structure and common for all |
661 |
|
architectures. it contains the definitions of basic datatypes |
662 |
|
and utility functions over these types. |
663 |
|
|
664 |
|
2. functor Cells() : CELLS |
665 |
|
|
666 |
|
Cells generates an interface for CELLS that incorporates the |
667 |
|
specific resources on the target architecture, such as the |
668 |
|
presence of special register classes, their number and size, |
669 |
|
and various useful substructures. |
670 |
|
|
671 |
|
3. <ARCH>CELLS |
672 |
|
|
673 |
|
e.g. SparcCells: SPARCCELLS |
674 |
|
|
675 |
|
<ARCH>CELLS usually contains additional bindings for special |
676 |
|
registers on the architecture, such as: |
677 |
|
|
678 |
|
val r0 : cell (* register zero *) |
679 |
|
val y : cell (* Y register *) |
680 |
|
val psr : cell (* processor status register *) |
681 |
|
... |
682 |
|
|
683 |
|
The structure returned by applying the Cells functor is opened |
684 |
|
in this interface. |
685 |
|
|
686 |
|
The main implication of all this is that the datatypes for cells is |
687 |
|
split between CellsBasis and CELLS -- a fairly simple change for user |
688 |
|
code. |
689 |
|
|
690 |
|
In the old scheme the CELLS interface had a definitional binding of |
691 |
|
the form: |
692 |
|
|
693 |
|
signature CELLS = sig |
694 |
|
|
695 |
|
structure CellsBasis = CellsBasis |
696 |
|
|
697 |
|
... |
698 |
|
|
699 |
|
end |
700 |
|
|
701 |
|
With all the sharing constraints that goes on in MLRISC, this old |
702 |
|
design quickly leads to errors such as: |
703 |
|
|
704 |
|
"structure definition spec inside of sharing ... " |
705 |
|
|
706 |
|
|
707 |
|
and appears to require an unacceptable amount of sharing and where |
708 |
|
constraint hackery. |
709 |
|
|
710 |
|
I think this error message (the interaction of definitional specs and |
711 |
|
sharing) requires more explanation on our web page. |
712 |
|
|
713 |
|
---------------------------------------------------------------------- |
714 |
|
Name: Matthias Blume |
715 |
|
Date: 2001/07/19 15:00:00 EDT |
716 |
|
Tag: blume-20010719-libreorg |
717 |
|
Description: |
718 |
|
|
719 |
|
This update puts together a fairly extensive but straightforward change |
720 |
|
to the way the libraries that implement the interactive system are |
721 |
|
organized: |
722 |
|
|
723 |
|
The biggest change is the elimination of structure Compiler. As a |
724 |
|
replacement for this structure, there is now a CM library |
725 |
|
(known as $smlnj/compiler.cm or $smlnj/compiler/current.cm) |
726 |
|
that exports all the substructures of the original structure Compiler |
727 |
|
directly. So instead of saying Compiler.Foo.bar one now simply |
728 |
|
says Foo.bar. (The CM libraries actually export a collection of |
729 |
|
structures that is richer than the collection of substructures of |
730 |
|
structure Compiler.) |
731 |
|
|
732 |
|
To make the transition smooth, there is a separate library called |
733 |
|
$smlnj/compiler/compiler.cm which puts together and exports the |
734 |
|
original structure Compiler (or at least something very close to it). |
735 |
|
|
736 |
|
There are five members of the original structure Compiler |
737 |
|
that are not exported directly but which instead became members |
738 |
|
of a new structure Backend (described by signature BACKEND). These are: |
739 |
|
structure Profile (: PROFILE), structure Compile (: COMPILE), structure |
740 |
|
Interact (: INTERACT), structure Machine (: MACHINE), and val |
741 |
|
architecture (: string). |
742 |
|
|
743 |
|
Structure Compiler.Version has become structure CompilerVersion. |
744 |
|
|
745 |
|
Cross-compilers for alpha32, hppa, ppc, sparc, and x86 are provided |
746 |
|
by $smlnj/compiler/<arch>.cm where <arch> is alpha32, hppa, ppc, sparc, |
747 |
|
or x86, respectively. |
748 |
|
Each of these exports the same frontend structures that |
749 |
|
$smlnj/compiler.cm exports. But they do not have a structure Backend |
750 |
|
and instead export some structure <Arch>Backend where <Arch> is Alpha32, |
751 |
|
Hppa, PPC, Sparc, or X86, respectively. |
752 |
|
|
753 |
|
Library $smlnj/compiler/all.cm exports the union of the exports of |
754 |
|
$smlnj/compiler/<arch>.cm |
755 |
|
|
756 |
|
There are no structures <Arch>Compiler anymore, use |
757 |
|
$smlnj/compiler/<arch>.cm instead. |
758 |
|
|
759 |
|
Library host-compiler-0.cm is gone. Instead, the internal library |
760 |
|
that instantiates CM is now called cm0.cm. Selection of the host |
761 |
|
compiler (backend) is no longer done here but. (Responsibility for it |
762 |
|
now lies with $smlnj/compiler/current.cm. This seems to be more |
763 |
|
logical.) |
764 |
|
|
765 |
|
Many individual files have been moved or renamed. Some files have |
766 |
|
been split into multiple files, and some "dead" files have been deleted. |
767 |
|
|
768 |
|
Aside from these changes to library organization, there are also changes |
769 |
|
to the way the code itself is organized: |
770 |
|
|
771 |
|
Structure Binfile has been re-implemented in such a way that it no |
772 |
|
longer needs any knowledge of the compiler. It exclusively deals |
773 |
|
with the details of binfile layout. It no longer invokes the |
774 |
|
compiler (for the purpose of creating new prospective binfile |
775 |
|
content), and it no longer has any knowledge of how to interpret |
776 |
|
pickles. |
777 |
|
|
778 |
|
Structure Compile (: COMPILE) has been stripped down to the bare |
779 |
|
essentials of compilation. It no longer deals with linking/execution. |
780 |
|
The interface has been cleaned up considerably. |
781 |
|
|
782 |
|
Utility routines for dealing with linking and execution have been |
783 |
|
moved into their own substructures. |
784 |
|
|
785 |
|
(The ultimate goal of these changes is to provide a light-weight |
786 |
|
binfile loader/linker (at least for, e.g., stable libraries) that |
787 |
|
does not require CM or the compiler to be present.) |
788 |
|
|
789 |
|
CM documentation has been updated to reflect the changes to library |
790 |
|
organization. |
791 |
|
|
792 |
|
---------------------------------------------------------------------- |
793 |
|
Name: Matthias Blume |
794 |
|
Date: 2001/07/10 17:30:00 EDT |
795 |
|
Tag: Release_110_34 |
796 |
|
Description: |
797 |
|
|
798 |
|
Minor tweak to 110.34 (re-tagged): |
799 |
|
|
800 |
|
- README.html file added to CVS repository |
801 |
|
- runtime compiles properly under FreeBSD 3.X and 4.X |
802 |
|
|
803 |
|
---------------------------------------------------------------------- |
804 |
|
Name: Matthias Blume |
805 |
|
Date: 2001/07/10 17:30:00 EDT |
806 |
|
Tag: Release_110_34 |
807 |
|
Description: |
808 |
|
|
809 |
|
New version number (110.34). New bootfiles. |
810 |
|
|
811 |
|
---------------------------------------------------------------------- |
812 |
|
Name: Matthias Blume |
813 |
|
Date: 2001/07/09 16:00:00 EDT |
814 |
|
Tag: blume-20010709-more-varargs |
815 |
|
Description: |
816 |
|
|
817 |
|
I changed the handling of varargs in ml-nlffigen again: |
818 |
|
The ellipsis ... will now simply be ignored (with an accompanying warning). |
819 |
|
|
820 |
|
The immediate effect is that you can actually call a varargs function |
821 |
|
from ML -- but you can't actually supply any arguments beyond the ones |
822 |
|
specified explicitly. (For example, you can call printf with its format |
823 |
|
string, but you cannot pass additional arguments.) |
824 |
|
|
825 |
|
This behavior is only marginally more useful than the one before, but |
826 |
|
it has the advantage that a function or, more importantly, a function |
827 |
|
type never gets dropped on the floor, thus avoiding follow-up problems with |
828 |
|
other types that refer to the offending one. |
829 |
|
|
830 |
|
---------------------------------------------------------------------- |
831 |
|
Name: Matthias Blume |
832 |
|
Date: 2001/07/09 11:25:00 EDT |
833 |
|
Tag: blume-20010709-varargs |
834 |
|
Description: |
835 |
|
|
836 |
|
1. ckit-lib.cm now exports structure Error |
837 |
|
2. ml-nlffigen reports occurences of "..." (i.e., varargs function types) |
838 |
|
with a warning accompanied by a source location. Moreover, it |
839 |
|
merely skips the offending function or type and proceeds with the |
840 |
|
rest of its work.u As a result, one can safely feed C code containing |
841 |
|
"..." to ml-nlffigen. |
842 |
|
3. There are some internal improvements to CM, providing slightly |
843 |
|
more general string substitutions in the tools subsystem. |
844 |
|
|
845 |
|
---------------------------------------------------------------------- |
846 |
|
Name: Matthias Blume |
847 |
|
Date: 2001/06/27 15:10:00 EDT |
848 |
|
Tag: blume-20010627-concur |
849 |
|
Description: |
850 |
|
|
851 |
|
Fixed a small bug in CM's handling of parallel compilation. |
852 |
|
(You could observe the bug by Control-C-interrupting an ordinary |
853 |
|
CMB.make or CM.stabilize and then attaching some compile servers. |
854 |
|
The result was that all of a sudden the previously interrupted |
855 |
|
compilation would continue on its own. This was because of |
856 |
|
an over-optimization: CM did not bother to clean out certain queues |
857 |
|
when no servers were attached "anyway", resulting in the contents |
858 |
|
of these queues to grab control when new servers did get attached.) |
859 |
|
|
860 |
|
There is also another minor update to the CM manual. |
861 |
|
|
862 |
|
---------------------------------------------------------------------- |
863 |
|
Name: Matthias Blume |
864 |
|
Date: 2001/06/26 16:15:00 EDT |
865 |
|
Tag: blume-20010626-cmdoc |
866 |
|
Description: |
867 |
|
|
868 |
|
Minor typo fixed in CM manual (syntax diagram for libraries). |
869 |
|
|
870 |
|
---------------------------------------------------------------------- |
871 |
|
Name: Matthias Blume |
872 |
|
Date: 2001/06/25 22:55:00 EDT |
873 |
|
Tag: blume-20010625-x86pc |
874 |
|
Description: |
875 |
|
|
876 |
|
Fixed a nasty bug in the X86 assembly code that caused signal |
877 |
|
handlers to fail (crash) randomly. |
878 |
|
|
879 |
|
---------------------------------------------------------------------- |
880 |
|
Name: Matthias Blume |
881 |
|
Date: 2001/06/25 12:05:00 EDT |
882 |
|
Tag: blume-20010625-nlffigen |
883 |
|
Description: |
884 |
|
|
885 |
|
This update fixes a number of minor bugs in ml-nlffigen as reported by |
886 |
|
Nick Carter <nbc@andrew.cmu.edu>. |
887 |
|
|
888 |
|
1. Silly but ok typedefs of the form "typedef void myvoid;" are now accepted. |
889 |
|
2. Default names for generated files are now derived from the name of |
890 |
|
the C file *without its directory*. In particular, this causes generated |
891 |
|
files to be placed locally even if the C file is in some system directory. |
892 |
|
3. Default names for generated signatures and structures are also derived |
893 |
|
from the C file name without its directory. This avoids silly things |
894 |
|
like "structure GL/GL". |
895 |
|
(Other silly names are still possible because ml-nlffigen does not do |
896 |
|
a thorough check of whether generated names are legal ML identifiers. |
897 |
|
When in doubt, use command line arguments to force particular names.) |
898 |
|
|
899 |
|
---------------------------------------------------------------------- |
900 |
|
Name: Matthias Blume |
901 |
|
Date: 2001/06/21 12:25:00 EDT |
902 |
|
Tag: blume-20010621-eXene |
903 |
|
Description: |
904 |
|
|
905 |
|
eXene now compiles and (sort of) works again. |
906 |
|
|
907 |
|
The library name (for version > 110.33) is $/eXene.cm. |
908 |
|
|
909 |
|
I also added an new example in src/eXene/examples/nbody. See the |
910 |
|
README file there for details. |
911 |
|
|
912 |
|
---------------------------------------------------------------------- |
913 |
|
Name: Matthias Blume |
914 |
|
Date: 2001/06/20 16:40:00 EDT |
915 |
|
Tag: blume-20010620-cml |
916 |
|
Description: |
917 |
|
|
918 |
|
CML now compiles and works again. |
919 |
|
|
920 |
|
Libraries (for version > 110.33): |
921 |
|
|
922 |
|
$cml/cml.cm Main CML library. |
923 |
|
$cml/basis.cm CML's version of $/basis.cm. |
924 |
|
$cml/cml-internal.cm Internal helper library. |
925 |
|
$cml/core-cml.cm Internal helper library. |
926 |
|
$cml-lib/trace-cml.cm Tracing facility. |
927 |
|
$cml-lib/smlnj-lib.cm CML's version of $/smlnj-lib.cm |
928 |
|
|
929 |
|
The installer (config/install.sh) has been taught how to properly |
930 |
|
install this stuff. |
931 |
|
|
932 |
|
---------------------------------------------------------------------- |
933 |
|
Name: Matthias Blume |
934 |
|
Date: 2001/06/19 17:55:00 EDT |
935 |
|
Tag: blume-20010619-instantiate |
936 |
|
Description: |
937 |
|
|
938 |
|
This un-breaks the fix for bug 1432. |
939 |
|
(The bug was originally fixed in 110.9 but I broke it again some |
940 |
|
time after that.) |
941 |
|
|
942 |
---------------------------------------------------------------------- |
---------------------------------------------------------------------- |
943 |
Name: Matthias Blume |
Name: Matthias Blume |
3366 |
elaborator). There were a lot of changes during my "linkpath" trials |
elaborator). There were a lot of changes during my "linkpath" trials |
3367 |
that could have been reverted to their original state but weren't. |
that could have been reverted to their original state but weren't. |
3368 |
Please, don't be too harsh on me for messing with this code a bit more |
Please, don't be too harsh on me for messing with this code a bit more |
3369 |
than what was strictly necessary... (I _did_ resist the tempation |
than what was strictly necessary... (I _did_ resist the temptation |
3370 |
of doing any "global reformatting" to avoid an untimely death at |
of doing any "global reformatting" to avoid an untimely death at |
3371 |
Dave's hands. :) |
Dave's hands. :) |
3372 |
|
|