SCM Repository
Diff of /sml/trunk/HISTORY
Parent Directory
|
Revision Log
|
Patch
revision 595, Wed Apr 5 03:30:17 2000 UTC | revision 1334, Thu May 22 22:46:30 2003 UTC | |
---|---|---|
# | Line 8 | Line 8 |
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 | ---------------------------------------------------------------------- | |
16 | Name: Matthias Blume (blume@tti-c.org) | |
17 | Date: 2003/05/21 17:45:00 CDT | |
18 | Tag: blume-20030517-complete | |
19 | Description: | |
20 | ||
21 | Two changes: | |
22 | ||
23 | 1. Added a flag for controlling whether non-exhaustive bindings will | |
24 | be treated as errors (default is false). | |
25 | 2. Cleaned up the *entire* source tree so that CMB.make goes through | |
26 | without a single non-exhaustive match- or bind warning. | |
27 | ||
28 | ---------------------------------------------------------------------- | |
29 | Name: Matthias Blume (blume@tti-c.org) | |
30 | Date: 2003/05/17 10:20:00 CDT | |
31 | Tag: blume-20030517-absyn | |
32 | Description: | |
33 | ||
34 | 1. Added cases for IF, WHILE, ANDALSO, and ORELSE to Absyn. | |
35 | ||
36 | This mainly affects the quality of error messages. However, some | |
37 | of the code is now more straightforward than before. (Treatment of | |
38 | the above four constructs in translate.sml is much simpler than | |
39 | the "macro-expansion" that was going on before. Plus, the mach- | |
40 | compiler no longer gets invoked just to be able to compile an | |
41 | if-expression.) | |
42 | ||
43 | 2. The ErrorMsg.Error exception is now caught and absorbed by the | |
44 | interactive loop. | |
45 | ||
46 | ---------------------------------------------------------------------- | |
47 | Name: Allen Leung | |
48 | Date: 2003/05/16 13:05:00 CDT | |
49 | Tag: leunga-20030516-cygwin-runtime | |
50 | Description: | |
51 | ||
52 | Ported the runtime system to cygwin, which uses the unix | |
53 | x86-unix bin files. Missing/buggy features: | |
54 | ||
55 | o getnetbyname, getnetbyaddr: these functions seem to be missing in | |
56 | the Cygwin library. | |
57 | o Ctrl-C handling may be flaky. | |
58 | o Windows system calls and Windows I/O are not supported. | |
59 | ||
60 | A new set of binfiles is located at: | |
61 | ||
62 | http://www.dorsai.org/~leunga/boot.x86-unix.tgz | |
63 | ||
64 | This is only needed for bootstrapping the cygwin version of smlnj. | |
65 | Other x86 versions can use the existing binfiles. | |
66 | ||
67 | ---------------------------------------------------------------------- | |
68 | Name: Matthias Blume | |
69 | Date: 2003/04/08 15:42:00 CDT | |
70 | Tag: blume-20030408-listpair | |
71 | Description: | |
72 | ||
73 | 1. Added a target 'mlrisc' to installer. | |
74 | ||
75 | 2. Added missing elements to structure ListPair. | |
76 | ||
77 | ---------------------------------------------------------------------- | |
78 | Name: Allen Leung | |
79 | Date: 2003/01/07 10:40:00 EST | |
80 | Tag: leunga-20030107-int-rem | |
81 | Description: | |
82 | ||
83 | Fixed a bug in Int.rem(x,y) where y is a power of 2 on x86. | |
84 | The arguments to the SUBL instruction were swapped. | |
85 | ||
86 | ---------------------------------------------------------------------- | |
87 | Name: Matthias Blume | |
88 | Date: 2002/12/12 16:25:00 EST | |
89 | Tag: blume-20021212-risc-ra | |
90 | Description: | |
91 | ||
92 | Fixed a serious bug in the rewrite code for FP spilling/reloading that | |
93 | sent the RA into an infinite loop when floating point registers get | |
94 | spilled. (Because of this bug, e.g., nucleic stopped compiling between | |
95 | 110.37 and 110.38.) | |
96 | There was another set of potential problems related to the handling of | |
97 | MLRISC annotations (but those did not yet cause real problems, apparently). | |
98 | ||
99 | ---------------------------------------------------------------------- | |
100 | Name: Matthias Blume | |
101 | Date: 2002/12/06 22:40:00 EST | |
102 | Tag: blume-20021206-cm-fileid | |
103 | Description: | |
104 | ||
105 | Added a call of SrcPath.sync at the beginning of Parse.parse (in CM). | |
106 | This fixes the problem of CM getting confused by files that suddenly | |
107 | change their identity (e.g., by getting unlinked and recreated by some | |
108 | text editor such as vi). There might be a better/cheaper/cleaner way | |
109 | of doing this, but for now this will have to do. | |
110 | ||
111 | ---------------------------------------------------------------------- | |
112 | Name: Matthias Blume | |
113 | Date: 2002/10/28 09:50:00 EST | |
114 | Tag: blume-20021028-typecheck | |
115 | Description: | |
116 | ||
117 | Exported structure Typecheck from $smlnj/viscomp/core.cm. | |
118 | ||
119 | ---------------------------------------------------------------------- | |
120 | Name: Matthias Blume | |
121 | Date: 2002/10/17 09:10:00 EDT | |
122 | Tag: Release_110_42 | |
123 | Description: | |
124 | ||
125 | In good old tradition, there has been a slight hiccup so that we have | |
126 | to patch 110.42 after the fact. The old release tag has been replaced | |
127 | (see below). | |
128 | ||
129 | The change solves a problem with two competing approaches the | |
130 | configuration problem regarding MacOS 10.1 vs. MacOS 10.2 which got in | |
131 | each other's way. | |
132 | ||
133 | This change only affects the runtime system code and the installer script. | |
134 | (No new bootfiles.) | |
135 | ||
136 | ---------------------------------------------------------------------- | |
137 | Name: Matthias Blume | |
138 | Date: 2002/10/16 12:00:00 EDT | |
139 | Tag: Release_110_42_removed | |
140 | Description: | |
141 | ||
142 | New working release. New bootfiles. | |
143 | ||
144 | ---------------------------------------------------------------------- | |
145 | Name: Matthias Blume | |
146 | Date: 2002/10/10 13:10:00 EDT | |
147 | Tag: blume-20021010-ppc-divs | |
148 | Description: | |
149 | ||
150 | The mltree operator DIVS must be implemented with an overflow check on | |
151 | the PPC because the hardware indicates divide-by-zero using "overflow" as | |
152 | well. | |
153 | ||
154 | ---------------------------------------------------------------------- | |
155 | Name: Matthias Blume | |
156 | Date: 2002/07/23 11:45:00 | |
157 | Tag: blume-20020723-smlnj-home | |
158 | Description: | |
159 | ||
160 | Sml now senses the SMLNJ_HOME environment variable. If this is set, | |
161 | then the bin dir is assumed to be in $SMLNJ_HOME/bin and (unless | |
162 | CM_PATHCONFIG is also set), the path configuration file is assumed | |
163 | to be in $SMLNJ_HOME/lib/pathconfig. This way one can easily move | |
164 | the entire tree to some other place and everything will "just work". | |
165 | ||
166 | (Companion commands such as ml-build and ml-makedepend also sense this | |
167 | variable.) | |
168 | ||
169 | ---------------------------------------------------------------------- | |
170 | Name: Matthias Blume | |
171 | Date: 2002/07/12 21:19:00 EDT | |
172 | Tag: blume-20020712-liveness | |
173 | Description: | |
174 | ||
175 | Exported two useful "step" functions from liveness module (MLRISC). | |
176 | ||
177 | ---------------------------------------------------------------------- | |
178 | Name: Matthias Blume | |
179 | Date: 2002/07/05 16:00 EDT | |
180 | Tag: Release_110_41 | |
181 | Description: | |
182 | ||
183 | New working release. New bootfiles. | |
184 | ||
185 | ---------------------------------------------------------------------- | |
186 | Name: Matthias Blume | |
187 | Date: 2002/07/05 10:25:00 EDT | |
188 | Tag: blume-20020705-btimp | |
189 | Description: | |
190 | ||
191 | Exported structure BTImp from $smlnj/viscomp/debugprof.cm so that | |
192 | other clients can set up backtracing support. | |
193 | ||
194 | ---------------------------------------------------------------------- | |
195 | Name: Matthias Blume | |
196 | Date: 2002/06/25 17:23:00 EDT | |
197 | Tag: blume-20020625-fpmax | |
198 | Description: | |
199 | ||
200 | Fixed a bug in translation of INLMAX (and INLMIN) for the floating-point | |
201 | case. (The sense of the isNaN test was reversed -- which made min and | |
202 | max always return their first argument.) | |
203 | ||
204 | ---------------------------------------------------------------------- | |
205 | Name: Matthias Blume | |
206 | Date: 2002/06/11 | |
207 | Tag: blume-20020611-unixpath | |
208 | Description: | |
209 | ||
210 | Back-ported OS.Path.{from,to}UnixPath from idlbasis-devel branch. | |
211 | ||
212 | ---------------------------------------------------------------------- | |
213 | Name: Matthias Blume | |
214 | Date: 2002/06/10 16:35:00 EDT | |
215 | Tag: blume-20020610-ieeereal | |
216 | Description: | |
217 | ||
218 | I back-ported my implementation of IEEEReal.fromString from the | |
219 | idlbasis-devel branch so that we can test it. | |
220 | ||
221 | Another small change is that ppDec tries to give more information | |
222 | than just "<sig>" in the case of functors. However, this code is | |
223 | broken in some mysterious way if the functor's body's signature | |
224 | has not been declared by ascription but gets inferred from the | |
225 | implementation. This needs fixing... | |
226 | ||
227 | ---------------------------------------------------------------------- | |
228 | Name: Matthias Blume | |
229 | Date: 2002/05/31 | |
230 | Tag: blume-20020531-btrace-mode | |
231 | Description: | |
232 | ||
233 | Resurrected SMLofNJ.Internals.BTrace.mode. (It accidentally fell by | |
234 | the wayside when I switched over to using Controls everywhere.) | |
235 | ||
236 | ---------------------------------------------------------------------- | |
237 | Name: Lal George | |
238 | Date: 2002/05/23 12:21:40 EDT | |
239 | Tag: george-20020523-visual-labels | |
240 | Description: | |
241 | ||
242 | Labels are now displayed in the graphical output to make | |
243 | the fall-through and target blocks obvious. | |
244 | ||
245 | ---------------------------------------------------------------------- | |
246 | Name: Matthias Blume | |
247 | Date: 2002/05/22 11:03:00 EDT | |
248 | Tag: blume-20020522-shrink | |
249 | Description: | |
250 | ||
251 | John tweaked yesterday's fix for 1131 to handle an out-of-memory | |
252 | situation that comes up when allocating huge arrays. | |
253 | ||
254 | ---------------------------------------------------------------------- | |
255 | Name: Matthias Blume | |
256 | Date: 2002/05/21 16:00:00 EDT | |
257 | Tag: Release_110_40 | |
258 | Description: | |
259 | ||
260 | New working release (110.40). New bootfiles. | |
261 | ||
262 | [Also: John Reppy fixed GC bug 1131.] | |
263 | ||
264 | ---------------------------------------------------------------------- | |
265 | Name: Matthias Blume | |
266 | Date: 2002/05/21 12:35:00 EDT | |
267 | Tag: blume-20020521-cmdoc | |
268 | Description: | |
269 | ||
270 | CM documentation update. | |
271 | ||
272 | ---------------------------------------------------------------------- | |
273 | Name: Matthias Blume | |
274 | Date: 2002/05/21 10:55:00 EDT | |
275 | Tag: blume-20020521-misc | |
276 | Description: | |
277 | ||
278 | - John tweaked runtime to be silent on heap export (except when | |
279 | GC messages are on). | |
280 | - I added a few more things (cross-compiling versions of CMB) to | |
281 | config/preloads (as suggestions). | |
282 | ||
283 | ---------------------------------------------------------------------- | |
284 | Name: Matthias Blume | |
285 | Date: 2002/05/20 22:25:00 EDT | |
286 | Tag: blume-20020520-controls | |
287 | Description: | |
288 | ||
289 | - Added ControlUtil structure to control-lib.cm. | |
290 | - Use it throughout. | |
291 | - Used Controls facility to define MLRISC controls (as opposed to | |
292 | registering MLRISC control ref cells with Controls after the fact) | |
293 | - Fixed messed-up controls priorities. | |
294 | ||
295 | * Removed again all the stuff from config/preloads that one wouldn't | |
296 | be able to preload at the time the initial heap image is built. | |
297 | (Many libraries, e.g., CML, do not exist yet at this time. The | |
298 | only libraries that can be preloaded via config/preloads are those | |
299 | that come bundled with the bootfiles.) | |
300 | ||
301 | ---------------------------------------------------------------------- | |
302 | Name: Matthias Blume | |
303 | Date: 2002/05/20 10:59:00 EDT | |
304 | Tag: blume-20020520-preloads | |
305 | Description: | |
306 | ||
307 | Added a lot of commented-out suggestions for things to be included | |
308 | in config/preloads. | |
309 | ||
310 | ---------------------------------------------------------------------- | |
311 | Name: Allen Leung | |
312 | Date: 2002/05/18 14:20:00 EDT | |
313 | Tag: leunga-20020518-mdl | |
314 | Description: | |
315 | ||
316 | o Made the mdl tool stuff compile and run again. | |
317 | o I've disabled all the stuff that depends on RTL specifications; they | |
318 | are all badly broken anyway. | |
319 | ||
320 | ---------------------------------------------------------------------- | |
321 | Name: Matthias Blume | |
322 | Date: 2002/05/17 16:49:00 EDT | |
323 | Tag: blume-20020517-controls | |
324 | Description: | |
325 | ||
326 | 0. John Reppy made several modifications to the SML/NJ library. | |
327 | In particular, there is a shiny new controls-lib.cm. | |
328 | ||
329 | 1. Pushed new controls interface through compiler so that everything | |
330 | compiles again. | |
331 | ||
332 | 2. Added FormatComb and FORMAT_COMB to the CML version of the | |
333 | SML/NJ library (so that CML compiles again). | |
334 | ||
335 | 3. Modified init scripts because XXX_DEFAULT environment variables | |
336 | are no longer with us. (Boot-time initialization is now done | |
337 | using the same environment variables that are also used for | |
338 | startup-time initialization of controls.) | |
339 | ||
340 | ---------------------------------------------------------------------- | |
341 | Name: Lal George | |
342 | Date: 2002/05/15 09:20:10 EDT | |
343 | Tag: george-20020515-pseudo-op-decls | |
344 | Description: | |
345 | ||
346 | All pseudo-ops emitted before the first segment declaration | |
347 | such as TEXT, DATA, and BSS directives are assumed to be global | |
348 | declarations and are emitted first in the assembly file. This is | |
349 | useful in a number of situations where one has pseudo-ops that are not | |
350 | specific to any segment, and also works around the constraint that one | |
351 | cannot have client pseudo-ops in the TEXT segment. | |
352 | ||
353 | Because no segment is associated with these declarations it is | |
354 | an error to allocate any space or objects before the first segment | |
355 | directive and an exception will be raised. However, we cannot make | |
356 | this check for client pseudo-ops. | |
357 | ||
358 | These top level declarations are a field in the CFG graph_info. | |
359 | In theory you can continue to add to this field after the CFG has been | |
360 | built -- provided you know what you are doing;-) | |
361 | ||
362 | ---------------------------------------------------------------------- | |
363 | Name: Matthias Blume | |
364 | Date: 2002/05/13 16:40:00 EDT | |
365 | Tag: blume-20020513-pp-etc | |
366 | Description: | |
367 | ||
368 | A few minor bugfixes: | |
369 | ||
370 | - Stopgap measure for bug recently reported by Elsa Gunter (ppDec). | |
371 | (Bogus printouts for redefined bindings still occur. Compiler | |
372 | bug should no longer occur now. We need to redo the prettyprinter | |
373 | from scratch.) | |
374 | ||
375 | - CM pathname printer now also adds escape sequences for ( and ) | |
376 | ||
377 | - commend and docu fixes for ml-nlffi | |
378 | ||
379 | ---------------------------------------------------------------------- | |
380 | Name: Matthias Blume | |
381 | Date: 2002/05/10 16:40:00 EDT | |
382 | Tag: blume-20020510-erg-textio | |
383 | Description: | |
384 | ||
385 | Applied the following bugfix provided by Emden Gansner: | |
386 | ||
387 | Output is corrupted when outputSubstr is used rather than output. | |
388 | ||
389 | The problem occurs when a substring | |
390 | ||
391 | ss = (s, dataStart, dataLen) | |
392 | ||
393 | where dataStart > 0, fills a stream buffer with avail bytes left. | |
394 | avail bytes of s, starting at index dataStart, are copied into the | |
395 | buffer, the buffer is flushed, and then the remaining dataLen-avail | |
396 | bytes of ss are copied into the beginning of the buffer. Instead of | |
397 | starting this copy at index dataStart+avail in s, the current code | |
398 | starts the copy at index avail. | |
399 | ||
400 | Fix: | |
401 | In text-io-fn.sml, change line 695 from | |
402 | val needsFlush = copyVec(v, avail, dataLen-avail, buf, 0) | |
403 | to | |
404 | val needsFlush = copyVec(v, dataStart+avail, dataLen-avail, buf, 0) | |
405 | ||
406 | ---------------------------------------------------------------------- | |
407 | Name: Matthias Blume | |
408 | Date: 2002/04/12 13:55:00 EDT | |
409 | Tag: blume-20020412-assyntax | |
410 | Description: | |
411 | ||
412 | 1. Grabbed newer assyntax.h from the XFree86 project. | |
413 | 2. Fiddled with how to compile X86.prim.asm without warnings. | |
414 | 3. (Very) Minor cleanup in CM. | |
415 | ||
416 | ---------------------------------------------------------------------- | |
417 | Name: Matthias Blume | |
418 | Date: 2002/04/01 (no joke!) 17:07:00 EST | |
419 | Tag: blume-20020401-x86div | |
420 | Description: | |
421 | ||
422 | Added full support for div/mod/rem/quot on the x86, using the machine | |
423 | instruction's two results (without clumsily recomputing the remainder) | |
424 | directly where appropriate. | |
425 | ||
426 | Some more extensive power-of-two support was added to the x86 instruction | |
427 | selector (avoiding expensive divs, mods, and muls where they can be | |
428 | replaced with cheaper shifts and masks). However, this sort of thing | |
429 | ought to be done earlier, e.g., within the CPS optimizer so that | |
430 | all architectures benefit from it. | |
431 | ||
432 | The compiler compiles to a fixed point, but changes might be somewhat | |
433 | fragile nevertheless. Please, report any strange things that you might | |
434 | see wrt. div/mod/quot/rem... | |
435 | ||
436 | ---------------------------------------------------------------------- | |
437 | Name: Matthias Blume | |
438 | Date: 2002/03/29 17:22:00 | |
439 | Tag: blume-20020329-div | |
440 | Description: | |
441 | ||
442 | Fixed my broken div/mod logic. Unfortunately, this means that the | |
443 | inline code for div/mod now has one more comparison than before. | |
444 | Fast paths (quotient > 0 or remainder = 0) are not affected, though. | |
445 | The problem was with quotient = 0, because that alone does not tell | |
446 | us which way the rounding went. One then has to look at whether | |
447 | remainder and divisor have the same sign... :( | |
448 | ||
449 | Anyway, I replaced the bootfiles with fresh ones... | |
450 | ||
451 | ---------------------------------------------------------------------- | |
452 | Name: Matthias Blume | |
453 | Date: 2002/03/29 14:10:00 EST | |
454 | Tag: blume-20020329-inlprims | |
455 | Description: | |
456 | ||
457 | NEW BOOTFILES!!! Version number bumped to 110.39.3. | |
458 | ||
459 | Primops have changed. This means that the bin/boot-file formats have | |
460 | changed as well. | |
461 | ||
462 | To make sure that there is no confusion, I made a new version. | |
463 | ||
464 | ||
465 | CHANGES: | |
466 | ||
467 | * removed REMT from mltree (remainder should never overflow). | |
468 | ||
469 | * added primops to deal with divisions of all flavors to the frontend | |
470 | ||
471 | * handled these primops all the way through so they map to their respective | |
472 | MLRISC support | |
473 | ||
474 | * used these primops in the implementation of Int, Int32, Word, Word32 | |
475 | ||
476 | * removed INLDIV, INLMOD, and INLREM as they are no longer necessary | |
477 | ||
478 | * parameterized INLMIN, INLMAX, and INLABS by a numkind | |
479 | ||
480 | * translate.sml now deals with all flavors of INL{MIN,MAX,ABS}, including | |
481 | floating point | |
482 | ||
483 | * used INL{MIN,MAX,ABS} in the implementation of Int, Int32, Word, Word32, | |
484 | and Real (but Real.abs maps to a separate floating-point-only primop) | |
485 | ||
486 | ||
487 | TODO items: | |
488 | ||
489 | * Hacked Alpha32 instruction selection, disabling the selection of REMx | |
490 | instructions because the machine instruction encoder cannot handle | |
491 | them. (Hppa, PPC, and Sparc instruction selection did not handle | |
492 | REM in the first place, and REM is supported by the x86 machine coder.) | |
493 | ||
494 | * Handle DIV and MOD with DIV_TO_NEGINF directly in the x86 instruction | |
495 | selection phase. (The two can be streamlined because the hardware | |
496 | delivers both quotient and remainder at the same time anyway.) | |
497 | ||
498 | * Think about what to do with "valOf(Int32.minInt) div ~1" and friends. | |
499 | (Currently the behavior is inconsistent both across architectures and | |
500 | wrt. the draft Basis spec.) | |
501 | ||
502 | * Word8 should eventually be handled natively, too. | |
503 | ||
504 | * There seems to be one serious bug in mltree-gen.sml. It appears, though, | |
505 | as if there currently is no execution path that could trigger it in | |
506 | SML/NJ. (The assumptions underlying functions arith and promotable do not | |
507 | hold for things like multiplication and division.) | |
508 | ||
509 | ---------------------------------------------------------------------- | |
510 | Name: Matthias Blume | |
511 | Date: 2002/03/27 16:27:00 EST | |
512 | Tag: blume-20020327-mlrisc-divisions | |
513 | Description: | |
514 | ||
515 | Added support for all four division operations (ML's div, mod, quot, | |
516 | and rem) to MLRISC. In the course of doing so, I also rationalized | |
517 | the naming (no more annoying switch-around of DIV and QUOT), by | |
518 | parameterizing the operation by div_rounding_mode (which can be either | |
519 | DIV_TO_ZERO or DIV_TO_NEGINF). | |
520 | ||
521 | The generic MLTreeGen functor takes care of compiling all four | |
522 | operations down to only round-to-zero div. | |
523 | ||
524 | Missing pieces: | |
525 | ||
526 | * Doing something smarter than relying on MLTreeGen on architectures | |
527 | like, e.g., the x86 where hardware division delivers both quotient and | |
528 | remainder at the same time. With this, the implementation of the | |
529 | round-to-neginf operations could be further streamlined. | |
530 | ||
531 | * Remove inlining support for div/mod/rem from the frontend and replace it | |
532 | with primops that get carried through to the backend. Do this for all | |
533 | int and word types. | |
534 | ||
535 | ---------------------------------------------------------------------- | |
536 | Name: Matthias Blume | |
537 | Date: 2002/03/25 17:25:00 EST | |
538 | Tag: blume-20020325-divmod | |
539 | Description: | |
540 | ||
541 | I improved (hopefully without breaking them) the implementation of Int.div, | |
542 | Int.mod, and Int.rem. For this, the code in translate.sml now takes | |
543 | advantage of the following observations: | |
544 | ||
545 | Let q = x quot y r = x rem y | |
546 | d = x div y m = x mod y | |
547 | ||
548 | where "quot" is the round-to-zero version of integer division that | |
549 | hardware usually provides. Then we have: | |
550 | ||
551 | r = x - q * y where neither the * nor the - will overflow | |
552 | d = if q >= 0 orelse x = q * y then q else q - 1 | |
553 | where neither the * nor the - will overflow | |
554 | m = if q >= 0 orelse r = 0 then r else r + y | |
555 | where the + will not overflow | |
556 | ||
557 | This results in substantial simplification of the generated code. | |
558 | The following table shows the number of CFG nodes and edges generated | |
559 | for | |
560 | fun f (x, y) = x OPER y | |
561 | (* with OPER \in div, mod, quot, rem *) | |
562 | ||
563 | ||
564 | OPER | nodes(old) | edges(old) | nodes(new) | edges(new) | |
565 | -------------------------------------------------------- | |
566 | div | 24 | 39 | 12 | 16 | |
567 | mod | 41 | 71 | 12 | 16 | |
568 | quot | 8 | 10 | 8 | 10 | |
569 | rem | 10 | 14 | 8 | 10 | |
570 | ||
571 | ||
572 | ---------------------------------------------------------------------- | |
573 | Name: Matthias Blume | |
574 | Date: 2002/03/25 22:06:00 EST | |
575 | Tag: blume-20020325-cprotobug | |
576 | Description: | |
577 | ||
578 | Fixed a bug in cproto (c prototype decoder). | |
579 | ||
580 | ---------------------------------------------------------------------- | |
581 | Name: Matthias Blume | |
582 | Date: 2002/03/25 16:00:00 EST | |
583 | Tag: blume-20020325-raw-primops | |
584 | Description: | |
585 | ||
586 | I did some cleanup to Allen's new primop code and | |
587 | replaced yesterday's bootfiles with new ones. | |
588 | (But they are stored in the same place.) | |
589 | ||
590 | ---------------------------------------------------------------------- | |
591 | Name: Matthias Blume | |
592 | Date: 2002/03/24 22:40:00 EST | |
593 | Tag: blume-20020324-bootfiles | |
594 | Description: | |
595 | ||
596 | Made the bootfiles that Allen asked for. | |
597 | ||
598 | ---------------------------------------------------------------------- | |
599 | Name: Allen Leung | |
600 | Date: 2002/03/23 15:50:00 EST | |
601 | Tag: leunga-20020323-flint-cps-rcc-primops | |
602 | Description: | |
603 | ||
604 | 1. Changes to FLINT primops: | |
605 | ||
606 | (* make a call to a C-function; | |
607 | * The primop carries C function prototype information and specifies | |
608 | * which of its (ML-) arguments are floating point. C prototype | |
609 | * information is for use by the backend, ML information is for | |
610 | * use by the CPS converter. *) | |
611 | | RAW_CCALL of { c_proto: CTypes.c_proto, | |
612 | ml_args: ccall_type list, | |
613 | ml_res_opt: ccall_type option, | |
614 | reentrant : bool | |
615 | } option | |
616 | (* Allocate uninitialized storage on the heap. | |
617 | * The record is meant to hold short-lived C objects, i.e., they | |
618 | * are not ML pointers. With the tag, the representation is | |
619 | * the same as RECORD with tag tag_raw32 (sz=4), or tag_fblock (sz=8) | |
620 | *) | |
621 | | RAW_RECORD of {tag:bool,sz:int} | |
622 | and ccall_type = CCALL_INT32 | CCALL_REAL64 | CCALL_ML_PTR | |
623 | ||
624 | 2. These CPS primops are now overloaded: | |
625 | ||
626 | rawload of {kind:numkind} | |
627 | rawstore of {kind:numkind} | |
628 | ||
629 | The one argument form is: | |
630 | ||
631 | rawload {kind} address | |
632 | ||
633 | The two argument form is: | |
634 | ||
635 | rawload {kind} [ml object, byte-offset] | |
636 | ||
637 | 3. RAW_CCALL/RCC now takes two extra arguments: | |
638 | ||
639 | a. The first is whether the C call is reentrant, i.e., whether | |
640 | ML state should be saved and restored. | |
641 | b. The second argument is a string argument specifying the name of | |
642 | library and the C function. | |
643 | ||
644 | These things are currently not handled in the code generator, yet. | |
645 | ||
646 | 4. In CProto, | |
647 | ||
648 | An encoding type of "bool" means "ml object" and is mapped into | |
649 | C prototype of PTR. Note that "bool" is different than "string", | |
650 | even though "string" is also mapped into PTR, because "bool" | |
651 | is assigned an CPS type of BOGt, while "string" is assigned INT32t. | |
652 | ||
653 | 5. Pickler/unpicker | |
654 | ||
655 | Changed to handle RAW_RECORD and newest RAW_CCALL | |
656 | ||
657 | 6. MLRiscGen, | |
658 | ||
659 | 1. Changed to handle the new rawload/rawstore/rawrecord operators. | |
660 | 2. Code for handling C Calls has been moved to a new module CPSCCalls, | |
661 | in the file CodeGen/cpscompile/cps-c-calls.sml | |
662 | ||
663 | 7. Added the conditional move operator | |
664 | ||
665 | condmove of branch | |
666 | ||
667 | to cps. Generation of this is still buggy so it is currently | |
668 | disabled. | |
669 | ||
670 | ---------------------------------------------------------------------- | |
671 | Name: Lal George | |
672 | Date: 2002/03/22 14:18:25 EST | |
673 | Tag: george-20020322-cps-branch-prob | |
674 | Description: | |
675 | ||
676 | Implemented the Ball-Larus branch prediction-heuristics, and | |
677 | incorporated graphical viewers for control flow graphs. | |
678 | ||
679 | Ball-Larus Heuristics: | |
680 | --------------------- | |
681 | See the file compiler/CodeGen/cpscompile/cpsBranchProb.sml. | |
682 | ||
683 | By design it uses the Dempster-Shafer theory for combining | |
684 | probabilities. For example, in the function: | |
685 | ||
686 | fun f(n,acc) = if n = 0 then acc else f(n-1, n*acc) | |
687 | ||
688 | the ball-larus heuristics predicts that the n=0 is unlikely | |
689 | (OH-heuristic), and the 'then' branch is unlikely because of the | |
690 | RH-heuristic -- giving the 'then' branch an even lower combined | |
691 | probability using the Dempster-Shafer theory. | |
692 | ||
693 | Finally, John Reppy's loop analysis in MLRISC, further lowers the | |
694 | probability of the 'then' branch because of the loop in the else | |
695 | branch. | |
696 | ||
697 | ||
698 | Graphical Viewing: | |
699 | ------------------ | |
700 | I merely plugged in Allen's graphical viewers into the compiler. The | |
701 | additional code is not much. At the top level, saying: | |
702 | ||
703 | Control.MLRISC.getFlag "cfg-graphical-view" := true; | |
704 | ||
705 | will display the graphical view of the control flow graph just before | |
706 | back-patching. daVinci must be in your path for this to work. If | |
707 | daVinci is not available, then the default viewer can be changed | |
708 | using: | |
709 | ||
710 | Control.MLRISC.getString "viewer" | |
711 | ||
712 | which can be set to "dot" or "vcg" for the corresponding viewers. Of | |
713 | course, these viewers must be in your path. | |
714 | ||
715 | The above will display the compilation unit at the level of clusters, | |
716 | many of which are small, boring, and un-interesting. Also setting: | |
717 | ||
718 | Control.MLRISC.getInt "cfg-graphical-view_size" | |
719 | ||
720 | will display clusters that are larger than the value set by the above. | |
721 | ||
722 | ||
723 | ---------------------------------------------------------------------- | |
724 | Name: Matthias Blume | |
725 | Date: 2002/03/21 22:20:00 EST | |
726 | Tag: blume-20020321-kmp-bugfix | |
727 | Description: | |
728 | ||
729 | Changed the interface to the KMP routine in PreString and fixed | |
730 | a minor bug in one place where it was used. | |
731 | ||
732 | ---------------------------------------------------------------------- | |
733 | Name: Allen Leung | |
734 | Date: 2002/03/21 20:30:00 EST | |
735 | Tag: leunga-20020321-cfg | |
736 | Description: | |
737 | ||
738 | Fixed a potential problem in cfg edge splitting. | |
739 | ||
740 | ---------------------------------------------------------------------- | |
741 | Name: Allen Leung | |
742 | Date: 2002/03/21 17:15:00 EST | |
743 | Tag: leunga-20020321-x86-fp-cfg | |
744 | Description: | |
745 | ||
746 | 1. Recoded the buggy parts of x86-fp. | |
747 | ||
748 | a. All the block reordering code has been removed. | |
749 | We now depend on the block placement phases to do this work. | |
750 | ||
751 | b. Critical edge splitting code has been simplified and moved into the | |
752 | CFG modules, as where they belong. | |
753 | ||
754 | Both of these were quite buggy and complex. The code is now much, much | |
755 | simpler. | |
756 | ||
757 | 2. X86 backend. | |
758 | ||
759 | a. Added instructions for 64-bit support. Instruction selection for | |
760 | 64-bit has not been committed, however, since that | |
761 | requires changes to MLTREE which haven't been approved by | |
762 | Lal and John. | |
763 | ||
764 | b. Added support for FUCOMI and FUCOMIP when generating code for | |
765 | PentiumPro and above. We only generate these instructions in | |
766 | the fast-fp mode. | |
767 | ||
768 | c. Added cases for JP and JNP in X86FreqProps. | |
769 | ||
770 | 3. CFG | |
771 | ||
772 | CFG now has a bunch of methods for edge splitting and merging. | |
773 | ||
774 | 4. Machine description. | |
775 | ||
776 | John's simplification of MLTREE_BASIS.fcond broke a few machine | |
777 | description things: | |
778 | ||
779 | rtl-build.{sig,sml} and hppa.mdl fixed. | |
780 | ||
781 | NOTE: the machine description stuff in the repository is still broken. | |
782 | Again, I can't put my fixes in because that involves | |
783 | changes to MLTREE. | |
784 | ||
785 | ---------------------------------------------------------------------- | |
786 | Name: Matthias Blume | |
787 | Date: 2002/03/20 15:55:00 EST | |
788 | Tag: blume-20020320-kmp | |
789 | Description: | |
790 | ||
791 | Implemented Knuth-Morris-Pratt string matching in PreString and used | |
792 | it for String.isSubstring, Substring.isSubstring, and | |
793 | Substring.position. | |
794 | ||
795 | (Might need some stress-testing. Simple examples worked fine.) | |
796 | ||
797 | ---------------------------------------------------------------------- | |
798 | Name: Matthias Blume | |
799 | Date: 2002/03/19 16:37:00 EST | |
800 | Tag: blume-20020319-witnesses | |
801 | Description: | |
802 | ||
803 | Added a structure C.W and functions convert/Ptr.convert to ml-nlffi-lib. | |
804 | ||
805 | This implements a generic mechanism for changing constness qualifiers | |
806 | anywhere within big C types without resorting to outright "casts". | |
807 | (So far, functions such as C.rw/C.ro or C.Ptr.rw/C.Ptr.ro only let you | |
808 | modify the constness at the outermost level.) | |
809 | The implementation of "convert" is based on the idea of "witness" | |
810 | values -- values that are not used by the operation but whose types | |
811 | "testify" to their applicability. On the implementation side, "convert" | |
812 | is simply a projection (returning its second curried argument). With | |
813 | cross-module inlining, it should not result in any machine code being | |
814 | generated. | |
815 | ||
816 | ---------------------------------------------------------------------- | |
817 | Name: Matthias Blume | |
818 | Date: 2002/03/15 16:40:00 EST | |
819 | Tag: blume-20020315-basis | |
820 | Description: | |
821 | ||
822 | Provided (preliminary?) implementations for | |
823 | ||
824 | {String,Substring}.{concatWith,isSuffix,isSubstring} | |
825 | ||
826 | and | |
827 | ||
828 | Substring.full | |
829 | ||
830 | Those are in the Basis spec but they were missing in SML/NJ. | |
831 | ||
832 | ---------------------------------------------------------------------- | |
833 | Name: Matthias Blume | |
834 | Date: 2002/03/14 21:30:00 EST | |
835 | Tag: blume-20020314-controls | |
836 | Description: | |
837 | ||
838 | Controls: | |
839 | --------- | |
840 | ||
841 | 1. Factored out the recently-added Controls : CONTROLS stuff and put | |
842 | it into its own library $/controls-lib.cm. The source tree for | |
843 | this is under src/smlnj-lib/Controls. | |
844 | ||
845 | 2. Changed the names of types and functions in this interface, so they | |
846 | make a bit more "sense": | |
847 | ||
848 | module -> registry | |
849 | 'a registry -> 'a group | |
850 | ||
851 | 3. The interface now deals in ref cells only. The getter/setter interface | |
852 | is (mostly) gone. | |
853 | ||
854 | 4. Added a function that lets one register an already-existing ref cell. | |
855 | ||
856 | 5. Made the corresponding modifications to the rest of the code so that | |
857 | everything compiles again. | |
858 | ||
859 | 6. Changed the implementation of Controls.MLRISC back to something closer | |
860 | to the original. In particular, this module (and therefore MLRISC) | |
861 | does not depend on Controls. There now is some link-time code in | |
862 | int-sys.sml that registers the MLRISC controls with the Controls | |
863 | module. | |
864 | ||
865 | CM: | |
866 | --- | |
867 | ||
868 | * One can now specify the lambda-split aggressiveness in init.cmi. | |
869 | ||
870 | ---------------------------------------------------------------------- | |
871 | Name: Allen Leung | |
872 | Date: 2002/03/13 17:30:00 EST | |
873 | Tag: leunga-20020313-x86-fp-unary | |
874 | Description: | |
875 | ||
876 | Bug fix for: | |
877 | ||
878 | > leunga@weaselbane:~/Yale/tmp/sml-dist{21} bin/sml | |
879 | > Standard ML of New Jersey v110.39.1 [FLINT v1.5], March 08, 2002 | |
880 | > - fun f(x,(y,z)) = Real.~ y; | |
881 | > [autoloading] | |
882 | > [autoloading done] | |
883 | > fchsl (%eax), 184(%esp) | |
884 | > Error: MLRisc bug: X86MCEmitter.emitInstr | |
885 | > | |
886 | > uncaught exception Error | |
887 | > raised at: ../MLRISC/control/mlriscErrormsg.sml:16.14-16.19 | |
888 | ||
889 | The problem was that the code generator did not generate any fp registers | |
890 | in this case, and the ra didn't know that it needed to run the X86FP phase to | |
891 | translate the pseudo fp instruction. This only happened with unary fp | |
892 | operators in certain situations. | |
893 | ||
894 | ---------------------------------------------------------------------- | |
895 | Name: Matthias Blume | |
896 | Date: 2002/03/13 14:00:00 EST | |
897 | Tag: blume-20020313-overload-etc | |
898 | Description: | |
899 | ||
900 | 1. Added _overload as a synonym for overload for backward compatibility. | |
901 | (Control.overloadKW must be true for either version to be accepted.) | |
902 | ||
903 | 2. Fixed bug in install script that caused more things to be installed | |
904 | than what was requested in config/targets. | |
905 | ||
906 | 3. Made CM aware of the (_)overload construct so that autoloading | |
907 | works. | |
908 | ||
909 | ---------------------------------------------------------------------- | |
910 | Name: Matthias Blume | |
911 | Date: 2002/03/12 22:03:00 EST | |
912 | Tag: blume-20020312-url | |
913 | Description: | |
914 | ||
915 | Forgot to update BOOT and srcarchiveurl. | |
916 | ||
917 | ---------------------------------------------------------------------- | |
918 | Name: Matthias Blume | |
919 | Date: 2002/03/12 17:30:00 EST | |
920 | Tag: blume-20020312-version110392 | |
921 | Description: | |
922 | ||
923 | Yet another version number bump (because of small changes to the | |
924 | binfile format). Version number is now 110.39.2. NEW BOOTFILES! | |
925 | ||
926 | Changes: | |
927 | ||
928 | The new pid generation scheme described a few weeks ago was overly | |
929 | complicated. I implemented a new mechanism that is simpler and | |
930 | provides a bit more "stability": Once CM has seen a compilation | |
931 | unit, it keeps its identity constant (as long as you do not delete | |
932 | those crucial CM/GUID/* files). This means that when you change | |
933 | an interface, compile, then go back to the old interface, and | |
934 | compile again, you arrive at the original pid. | |
935 | ||
936 | There now also is a mechanism that instructs CM to use the plain | |
937 | environment hash as a module's pid (effectively making its GUID | |
938 | the empty string). For this, "noguid" must be specified as an | |
939 | option to the .sml file in question within its .cm file. | |
940 | This is most useful for code that is being generated by tools such | |
941 | as ml-nlffigen (because during development programmers tend to | |
942 | erase the tool's entire output directory tree including CM's cached | |
943 | GUIDs). "noguid" is somewhat dangerous (since it can be used to locally | |
944 | revert to the old, broken behavior of SML/NJ, but in specific cases | |
945 | where there is no danger of interface confusion, its use is ok | |
946 | (I think). | |
947 | ||
948 | ml-nlffigen by default generates "noguid" annotations. They can be | |
949 | turned off by specifying -guid in its command line. | |
950 | ||
951 | ---------------------------------------------------------------------- | |
952 | Name: Lal George | |
953 | Date: 2002/03/12 12 14:42:36 EST | |
954 | Tag: george-20020312-frequency-computation | |
955 | Description: | |
956 | ||
957 | Integrated jump chaining and static block frequency into the | |
958 | compiler. More details and numbers later. | |
959 | ||
960 | ---------------------------------------------------------------------- | |
961 | Name: Lal George | |
962 | Date: 2002/03/11 11 22:38:53 EST | |
963 | Tag: george-20020311-jump-chain-elim | |
964 | Description: | |
965 | ||
966 | Tested the jump chain elimination on all architectures (except the | |
967 | hppa). This is on by default right now and is profitable for the | |
968 | alpha and x86, however, it may not be profitable for the sparc and ppc | |
969 | when compiling the compiler. | |
970 | ||
971 | The gc test will typically jump to a label at the end of the cluster, | |
972 | where there is another jump to an external cluster containing the actual | |
973 | code to invoke gc. This is to allow factoring of common gc invocation | |
974 | sequences. That is to say, we generate: | |
975 | ||
976 | f: | |
977 | testgc | |
978 | ja L1 % jump if above to L1 | |
979 | ||
980 | L1: | |
981 | jmp L2 | |
982 | ||
983 | ||
984 | After jump chain elimination the 'ja L1' instructions is converted to | |
985 | 'ja L2'. On the sparc and ppc, many of the 'ja L2' instructions may end | |
986 | up being implemented in their long form (if L2 is far away) using: | |
987 | ||
988 | jbe L3 % jump if below or equal to L3 | |
989 | jmp L2 | |
990 | L3: | |
991 | ... | |
992 | ||
993 | ||
994 | For large compilation units L2 may be far away. | |
995 | ||
996 | ||
997 | ---------------------------------------------------------------------- | |
998 | Name: Matthias Blume | |
999 | Date: 2002/03/11 13:30:00 EST | |
1000 | Tag: blume-20020311-mltreeeval | |
1001 | Description: | |
1002 | ||
1003 | A functor parameter was missing. | |
1004 | ||
1005 | ---------------------------------------------------------------------- | |
1006 | Name: Allen Leung | |
1007 | Date: 2002/03/11 10:30:00 EST | |
1008 | Tag: leunga-20020311-runtime-string0 | |
1009 | Description: | |
1010 | ||
1011 | The representation of the empty string now points to a | |
1012 | legal null terminated C string instead of unit. It is now possible | |
1013 | to convert an ML string into C string with InlineT.CharVector.getData. | |
1014 | This compiles into one single machine instruction. | |
1015 | ||
1016 | ---------------------------------------------------------------------- | |
1017 | Name: Allen Leung | |
1018 | Date: 2002/03/10 23:55:00 EST | |
1019 | Tag: leunga-20020310-x86-call | |
1020 | Description: | |
1021 | ||
1022 | Added machine generation for CALL instruction (relative displacement mode) | |
1023 | ||
1024 | ---------------------------------------------------------------------- | |
1025 | Name: Matthias Blume | |
1026 | Date: 2002/03/08 16:05:00 | |
1027 | Tag: blume-20020308-entrypoints | |
1028 | Description: | |
1029 | ||
1030 | Version number bumped to 110.39.1. NEW BOOTFILES! | |
1031 | ||
1032 | Entrypoints: non-zero offset into a code object where execution should begin. | |
1033 | ||
1034 | - Added the notion of an entrypoint to CodeObj. | |
1035 | - Added reading/writing of entrypoint info to Binfile. | |
1036 | - Made runtime system bootloader aware of entrypoints. | |
1037 | - Use the address of the label of the first function given to mlriscGen | |
1038 | as the entrypoint. This address is currently always 0, but it will | |
1039 | not be 0 once we turn on block placement. | |
1040 | - Removed the linkage cluster code (which was The Other Way(tm) of dealing | |
1041 | with entry points) from mlriscGen. | |
1042 | ||
1043 | ---------------------------------------------------------------------- | |
1044 | Name: Allen Leung | |
1045 | Date: 2002/03/07 20:45:00 EST | |
1046 | Tag: leunga-20020307-x86-cmov | |
1047 | Description: | |
1048 | ||
1049 | Bug fixes for CMOVcc on x86. | |
1050 | ||
1051 | 1. Added machine code generation for CMOVcc | |
1052 | 2. CMOVcc is now generated in preference over SETcc on PentiumPro or above. | |
1053 | 3. CMOVcc cannot have an immediate operand as argument. | |
1054 | ||
1055 | ---------------------------------------------------------------------- | |
1056 | Name: Matthias Blume | |
1057 | Date: 2002/03/07 16:15:00 EST | |
1058 | Tag: blume-20020307-controls | |
1059 | Description: | |
1060 | ||
1061 | This is a very large but mostly boring patch which makes (almost) | |
1062 | every tuneable compiler knob (i.e., pretty much everything under | |
1063 | Control.* plus a few other things) configurable via both the command | |
1064 | line and environment variables in the style CM did its configuration | |
1065 | until now. | |
1066 | ||
1067 | Try starting sml with '-h' (or, if you are brave, '-H') | |
1068 | ||
1069 | To this end, I added a structure Controls : CONTROLS to smlnj-lib.cm which | |
1070 | implements the underlying generic mechanism. | |
1071 | ||
1072 | The interface to some of the existing such facilities has changed somewhat. | |
1073 | For example, the MLRiscControl module now provides mkFoo instead of getFoo. | |
1074 | (The getFoo interface is still there for backward-compatibility, but its | |
1075 | use is deprecated.) | |
1076 | ||
1077 | The ml-build script passes -Cxxx=yyy command-line arguments through so | |
1078 | that one can now twiddle the compiler settings when using this "batch" | |
1079 | compiler. | |
1080 | ||
1081 | TODO items: | |
1082 | ||
1083 | We should go through and throw out all controls that are no longer | |
1084 | connected to anything. Moreover, we should go through and provide | |
1085 | meaningful (and correct!) documentation strings for those controls | |
1086 | that still are connected. | |
1087 | ||
1088 | Currently, multiple calls to Controls.new are accepted (only the first | |
1089 | has any effect). Eventually we should make sure that every control | |
1090 | is being made (via Controls.new) exactly once. Future access can then | |
1091 | be done using Controls.acc. | |
1092 | ||
1093 | Finally, it would probably be a good idea to use the getter-setter | |
1094 | interface to controls rather than ref cells. For the time being, both | |
1095 | styles are provided by the Controls module, but getter-setter pairs are | |
1096 | better if thread-safety is of any concern because they can be wrapped. | |
1097 | ||
1098 | ***************************************** | |
1099 | ||
1100 | One bug fix: The function blockPlacement in three of the MLRISC | |
1101 | backpatch files used to be hard-wired to one of two possibilities at | |
1102 | link time (according to the value of the placementFlag). But (I | |
1103 | think) it should rather sense the flag every time. | |
1104 | ||
1105 | ***************************************** | |
1106 | ||
1107 | Other assorted changes (by other people who did not supply a HISTORY entry): | |
1108 | ||
1109 | 1. the cross-module inliner now works much better (Monnier) | |
1110 | 2. representation of weights, frequencies, and probabilities in MLRISC | |
1111 | changed in preparation of using those for weighted block placement | |
1112 | (Reppy, George) | |
1113 | ||
1114 | ---------------------------------------------------------------------- | |
1115 | Name: Lal George | |
1116 | Date: 2002/03/07 14:44:24 EST 2002 | |
1117 | Tag: george-20020307-weighted-block-placement | |
1118 | ||
1119 | Tested the weighted block placement optimization on all architectures | |
1120 | (except the hppa) using AMPL to generate the block and edge frequencies. | |
1121 | Changes were required in the machine properties to correctly | |
1122 | categorize trap instructions. There is an MLRISC flag | |
1123 | "weighted-block-placement" that can be used to enable weighted block | |
1124 | placement, but this will be ineffective without block/edge | |
1125 | frequencies (coming soon). | |
1126 | ||
1127 | ||
1128 | ---------------------------------------------------------------------- | |
1129 | Name: Lal George | |
1130 | Date: 2002/03/05 17:24:48 EST | |
1131 | Tag: george-20020305-linkage-cluster | |
1132 | ||
1133 | In order to support the block placement optimization, a new cluster | |
1134 | is generated as the very first cluster (called the linkage cluster). | |
1135 | It contains a single jump to the 'real' entry point for the compilation | |
1136 | unit. Block placement has no effect on the linkage cluster itself, but | |
1137 | all the other clusters have full freedom in the manner in which they | |
1138 | reorder blocks or functions. | |
1139 | ||
1140 | On the x86 the typical linkage code that is generated is: | |
1141 | ---------------------- | |
1142 | .align 2 | |
1143 | L0: | |
1144 | addl $L1-L0, 72(%esp) | |
1145 | jmp L1 | |
1146 | ||
1147 | ||
1148 | .align 2 | |
1149 | L1: | |
1150 | ---------------------- | |
1151 | ||
1152 | 72(%esp) is the memory location for the stdlink register. This | |
1153 | must contain the address of the CPS function being called. In the | |
1154 | above example, it contains the address of L0; before | |
1155 | calling L1 (the real entry point for the compilation unit), it | |
1156 | must contain the address for L1, and hence | |
1157 | ||
1158 | addl $L1-L0, 72(%esp) | |
1159 | ||
1160 | I have tested this on all architectures except the hppa.The increase | |
1161 | in code size is of course negligible | |
1162 | ||
1163 | ---------------------------------------------------------------------- | |
1164 | Name: Allen Leung | |
1165 | Date: 2002/03/03 13:20:00 EST | |
1166 | Tag: leunga-20020303-mlrisc-tools | |
1167 | ||
1168 | Added #[ ... ] expressions to mlrisc tools | |
1169 | ||
1170 | ---------------------------------------------------------------------- | |
1171 | Name: Matthias Blume | |
1172 | Date: 2002/02/27 12:29:00 EST | |
1173 | Tag: blume-20020227-cdebug | |
1174 | Description: | |
1175 | ||
1176 | - made types in structure C and C_Debug to be equal | |
1177 | - got rid of code duplication (c-int.sml vs. c-int-debug.sml) | |
1178 | - there no longer is a C_Int_Debug (C_Debug is directly derived from C) | |
1179 | ||
1180 | ---------------------------------------------------------------------- | |
1181 | Name: Matthias Blume | |
1182 | Date: 2002/02/26 12:00:00 EST | |
1183 | Tag: blume-20020226-ffi | |
1184 | Description: | |
1185 | ||
1186 | 1. Fixed a minor bug in CM's "noweb" tool: | |
1187 | If numbering is turned off, then truly don't number (i.e., do not | |
1188 | supply the -L option to noweb). The previous behavior was to supply | |
1189 | -L'' -- which caused noweb to use the "default" line numbering scheme. | |
1190 | Thanks to Chris Richards for pointing this out (and supplying the fix). | |
1191 | ||
1192 | 2. Once again, I reworked some aspects of the FFI: | |
1193 | ||
1194 | A. The incomplete/complete type business: | |
1195 | ||
1196 | - Signatures POINTER_TO_INCOMPLETE_TYPE and accompanying functors are | |
1197 | gone! | |
1198 | - ML types representing an incomplete type are now *equal* to | |
1199 | ML types representing their corresponding complete types (just like | |
1200 | in C). This is still safe because ml-nlffigen will not generate | |
1201 | RTTI for incomplete types, nor will it generate functions that | |
1202 | require access to such RTTI. But when ML code generated from both | |
1203 | incomplete and complete versions of the C type meet, the ML types | |
1204 | are trivially interoperable. | |
1205 | ||
1206 | NOTE: These changes restore the full generality of the translation | |
1207 | (which was previously lost when I eliminated functorization)! | |
1208 | ||
1209 | B. Enum types: | |
1210 | ||
1211 | - Structure C now has a type constructor "enum" that is similar to | |
1212 | how the "su" constructor works. However, "enum" is not a phantom | |
1213 | type because each "T enum" has values (and is isomorphic to | |
1214 | MLRep.Signed.int). | |
1215 | - There are generic access operations for enum objects (using | |
1216 | MLRep.Signed.int). | |
1217 | - ml-nlffigen will generate a structure E_foo for each "enum foo". | |
1218 | * The structure contains the definition of type "mlrep" (the ML-side | |
1219 | representation type of the enum). Normally, mlrep is the same | |
1220 | as "MLRep.Signed.int", but if ml-nlffigen was invoked with "-ec", | |
1221 | then mlrep will be defined as a datatype -- thus facilitating | |
1222 | pattern matching on mlrep values. | |
1223 | ("-ec" will be suppressed if there are duplicate values in an | |
1224 | enumeration.) | |
1225 | * Constructors ("-ec") or values (no "-ec") e_xxx of type mlrep | |
1226 | will be generated for each C enum constant xxx. | |
1227 | * Conversion functions m2i and i2m convert between mlrep and | |
1228 | MLRep.Signed.int. (Without "-ec", these functions are identities.) | |
1229 | * Coversion functions c and ml convert between mlrep and "tag enum". | |
1230 | * Access functions (get/set) fetch and store mlrep values. | |
1231 | - By default (unless ml-nlffigen was invoked with "-nocollect"), unnamed | |
1232 | enumerations are merged into one single enumeration represented by | |
1233 | structure E_'. | |
1234 | ||
1235 | ---------------------------------------------------------------------- | |
1236 | Name: Allen Leung | |
1237 | Date: 2002/02/25 04:45:00 EST | |
1238 | Tag: leunga-20020225-cps-spill | |
1239 | ||
1240 | This is a new implementation of the CPS spill phase. | |
1241 | The new phase is in the new file compiler/CodeGen/cpscompile/spill-new.sml | |
1242 | In case of problems, replace it with the old file spill.sml | |
1243 | ||
1244 | The current compiler runs into some serious performance problems when | |
1245 | constructing a large record. This can happen when we try to compile a | |
1246 | structure with many items. Even a very simple structure like the following | |
1247 | makes the compiler slow down. | |
1248 | ||
1249 | structure Foo = struct | |
1250 | val x_1 = 0w1 : Word32.int | |
1251 | val x_2 = 0w2 : Word32.int | |
1252 | val x_3 = 0w3 : Word32.int | |
1253 | ... | |
1254 | val x_N = 0wN : Word32.int | |
1255 | end | |
1256 | ||
1257 | The following table shows the compile time, from N=1000 to N=4000, | |
1258 | with the old compiler: | |
1259 | ||
1260 | N | |
1261 | 1000 CPS 100 spill 0.04u 0.00s 0.00g | |
1262 | MLRISC ra 0.06u 0.00s 0.05g | |
1263 | (spills = 0 reloads = 0) | |
1264 | TOTAL 0.63u 0.07s 0.21g | |
1265 | ||
1266 | 1100 CPS 100 spill 8.25u 0.32s 0.64g | |
1267 | MLRISC ra 5.68u 0.59s 3.93g | |
1268 | (spills = 0 reloads = 0) | |
1269 | TOTAL 14.71u 0.99s 4.81g | |
1270 | ||
1271 | 1500 CPS 100 spill 58.55u 2.34s 1.74g | |
1272 | MLRISC ra 5.54u 0.65s 3.91g | |
1273 | (spills = 543 reloads = 1082) | |
1274 | TOTAL 65.40u 3.13s 6.00g | |
1275 | ||
1276 | 2000 CPS 100 spill 126.69u 4.84s 3.08g | |
1277 | MLRISC ra 0.80u 0.10s 0.55g | |
1278 | (spills = 42 reloads = 84) | |
1279 | TOTAL 129.42u 5.10s 4.13g | |
1280 | ||
1281 | 3000 CPS 100 spill 675.59u 19.03s 11.64g | |
1282 | MLRISC ra 2.69u 0.27s 1.38g | |
1283 | (spills = 62 reloads = 124) | |
1284 | TOTAL 682.48u 19.61s 13.99g | |
1285 | ||
1286 | 4000 CPS 100 spill 2362.82u 56.28s 43.60g | |
1287 | MLRISC ra 4.96u 0.27s 2.72g | |
1288 | (spills = 85 reloads = 170) | |
1289 | TOTAL 2375.26u 57.21s 48.00g | |
1290 | ||
1291 | As you can see the old cps spill module suffers from some serious | |
1292 | performance problem. But since I cannot decipher the old code fully, | |
1293 | instead of patching the problems up, I'm reimplementing it | |
1294 | with a different algorithm. The new code is more modular, | |
1295 | smaller when compiled, and substantially faster | |
1296 | (O(n log n) time and O(n) space). Timing of the new spill module: | |
1297 | ||
1298 | 4000 CPS 100 spill 0.02u 0.00s 0.00g | |
1299 | MLRISC ra 0.25u 0.02s 0.15g | |
1300 | (spills=1 reloads=3) | |
1301 | TOTAL 7.74u 0.34s 1.62g | |
1302 | ||
1303 | Implementation details: | |
1304 | ||
1305 | As far as I can tell, the purpose of the CPS spill module is to make sure the | |
1306 | number of live variables at any program point (the bandwidth) | |
1307 | does not exceed a certain limit, which is determined by the | |
1308 | size of the spill area. | |
1309 | ||
1310 | When the bandwidth is too large, we decrease the register pressure by | |
1311 | packing live variables into spill records. How we achieve this is | |
1312 | completely different than what we did in the old code. | |
1313 | ||
1314 | First, there is something about the MLRiscGen code generator | |
1315 | that we should be aware of: | |
1316 | ||
1317 | o MLRiscGen performs code motion! | |
1318 | ||
1319 | In particular, it will move floating point computations and | |
1320 | address computations involving only the heap pointer to | |
1321 | their use sites (if there is only a single use). | |
1322 | What this means is that if we have a CPS record construction | |
1323 | statement | |
1324 | ||
1325 | RECORD(k,vl,w,e) | |
1326 | ||
1327 | we should never count the new record address w as live if w | |
1328 | has only one use (which is often the case). | |
1329 | ||
1330 | We should do something similar to floating point, but the transformation | |
1331 | there is much more complex, so I won't deal with that. | |
1332 | ||
1333 | Secondly, there are now two new cps primops at our disposal: | |
1334 | ||
1335 | 1. rawrecord of record_kind option | |
1336 | This pure operator allocates some uninitialized storage from the heap. | |
1337 | There are two forms: | |
1338 | ||
1339 | rawrecord NONE [INT n] allocates a tagless record of length n | |
1340 | rawrecord (SOME rk) [INT n] allocates a tagged record of length n | |
1341 | and initializes the tag. | |
1342 | ||
1343 | 2. rawupdate of cty | |
1344 | rawupdate cty (v,i,x) | |
1345 | Assigns to x to the ith component of record v. | |
1346 | The storelist is not updated. | |
1347 | ||
1348 | We use these new primops for both spilling and increment record construction. | |
1349 | ||
1350 | 1. Spilling. | |
1351 | ||
1352 | This is implemented with a linear scan algorithm (but generalized | |
1353 | to trees). The algorithm will create a single spill record at the | |
1354 | beginning of the cps function and use rawupdate to spill to it, | |
1355 | and SELECT or SELp to reload from it. So both spills and reloads | |
1356 | are fine-grain operations. In contrast, in the old algorithm | |
1357 | "spills" have to be bundled together in records. | |
1358 | ||
1359 | Ideally, we should sink the spill record construction to where | |
1360 | it is needed. We can even split the spill record into multiple ones | |
1361 | at the places where they are needed. But CPS is not a good | |
1362 | representation for global code motion, so I'll keep it simple and | |
1363 | am not attempting this. | |
1364 | ||
1365 | 2. Incremental record construction (aka record splitting). | |
1366 | ||
1367 | Long records with many component values which are simulatenously live | |
1368 | (recall that single use record addresses are not considered to | |
1369 | be live) are constructed with rawrecord and rawupdate. | |
1370 | We allocate space on the heap with rawrecord first, then gradually | |
1371 | fill it in with rawupdate. This is the technique suggested to me | |
1372 | by Matthias. | |
1373 | ||
1374 | Some restrictions on when this is applicable: | |
1375 | 1. It is not a VECTOR record. The code generator currently does not handle | |
1376 | this case. VECTOR record uses double indirection like arrays. | |
1377 | 2. All the record component values are defined in the same "basic block" | |
1378 | as the record constructor. This is to prevent speculative | |
1379 | record construction. | |
1380 | ||
1381 | ---------------------------------------------------------------------- | |
1382 | Name: Allen Leung | |
1383 | Date: 2002/02/22 01:02:00 EST | |
1384 | Tag: leunga-20020222-mlrisc-tools | |
1385 | ||
1386 | Minor bug fixes in the parser and rewriter | |
1387 | ||
1388 | ---------------------------------------------------------------------- | |
1389 | Name: Allen Leung | |
1390 | Date: 2002/02/21 20:20:00 EST | |
1391 | Tag: leunga-20020221-peephole | |
1392 | ||
1393 | Regenerated the peephole files. Some contained typos in the specification | |
1394 | and some didn't compile because of pretty printing bugs in the old version | |
1395 | of 'nowhere'. | |
1396 | ||
1397 | ---------------------------------------------------------------------- | |
1398 | Name: Allen Leung | |
1399 | Date: 2002/02/19 20:20:00 EST | |
1400 | Tag: leunga-20020219-mlrisc-tools | |
1401 | Description: | |
1402 | ||
1403 | Minor bug fixes to the mlrisc-tools library: | |
1404 | ||
1405 | 1. Fixed up parsing colon suffixed keywords | |
1406 | 2. Added the ability to shut the error messages up | |
1407 | 3. Reimplemented the pretty printer and fixed up/improved | |
1408 | the pretty printing of handle and -> types. | |
1409 | 4. Fixed up generation of literal symbols in the nowhere tool. | |
1410 | 5. Added some SML keywords to to sml.sty | |
1411 | ||
1412 | ---------------------------------------------------------------------- | |
1413 | Name: Matthias Blume | |
1414 | Date: 2002/02/19 16:20:00 EST | |
1415 | Tag: blume-20020219-cmffi | |
1416 | Description: | |
1417 | ||
1418 | A wild mix of changes, some minor, some major: | |
1419 | ||
1420 | * All C FFI-related libraries are now anchored under $c: | |
1421 | $/c.cm --> $c/c.cm | |
1422 | $/c-int.cm --> $c/internals/c-int.cm | |
1423 | $/memory.cm --> $c/memory/memory.cm | |
1424 | ||
1425 | * "make" tool (in CM) now treats its argument pathname slightly | |
1426 | differently: | |
1427 | 1. If the native expansion is an absolute name, then before invoking | |
1428 | the "make" command on it, CM will apply OS.Path.mkRelative | |
1429 | (with relativeTo = OS.FileSys.getDir()) to it. | |
1430 | 2. The argument will be passed through to subsequent phases of CM | |
1431 | processing without "going native". In particular, if the argument | |
1432 | was an anchored path, then "make" will not lose track of that anchor. | |
1433 | ||
1434 | * Compiler backends now "know" their respective C calling conventions | |
1435 | instead of having to be told about it by ml-nlffigen. This relieves | |
1436 | ml-nlffigen from one of its burdens. | |
1437 | ||
1438 | * The X86Backend has been split into X86CCallBackend and X86StdCallBackend. | |
1439 | ||
1440 | * Export C_DEBUG and C_Debug from $c/c.cm. | |
1441 | ||
1442 | * C type encoding in ml-nlffi-lib has been improved to model the conceptual | |
1443 | subtyping relationship between incomplete pointers and their complete | |
1444 | counterparts. For this, ('t, 'c) ptr has been changed to 'o ptr -- | |
1445 | with the convention of instantiating 'o with ('t, 'c) obj whenever | |
1446 | the pointer target type is complete. In the incomplete case, 'o | |
1447 | will be instantiated with some "'c iobj" -- a type obtained by | |
1448 | using one of the functors PointerToIncompleteType or PointerToCompleteType. | |
1449 | ||
1450 | Operations that work on both incomplete and complete pointer types are | |
1451 | typed as taking an 'o ptr while operations that require the target to | |
1452 | be known are typed as taking some ('t, 'c) obj ptr. | |
1453 | ||
1454 | voidptr is now a bit "more concrete", namely "type voidptr = void ptr'" | |
1455 | where void is an eqtype without any values. This makes it possible | |
1456 | to work on voidptr values using functions meant to operate on light | |
1457 | incomplete pointers. | |
1458 | ||
1459 | * As a result of the above, signature POINTER_TO_INCOMPLETE_TYPE has | |
1460 | been vastly simplified. | |
1461 | ||
1462 | ---------------------------------------------------------------------- | |
1463 | Name: Matthias Blume | |
1464 | Date: 2002/02/19 10:48:00 EST | |
1465 | Tag: blume-20020219-pqfix | |
1466 | Description: | |
1467 | ||
1468 | Applied Chris Okasaki's bug fix for priority queues. | |
1469 | ||
1470 | ---------------------------------------------------------------------- | |
1471 | Name: Matthias Blume | |
1472 | Date: 2002/02/15 17:05:00 | |
1473 | Tag: Release_110_39 | |
1474 | Description: | |
1475 | ||
1476 | Last-minute retagging is becoming a tradition... :-( | |
1477 | ||
1478 | This is the working release 110.39. | |
1479 | ||
1480 | ---------------------------------------------------------------------- | |
1481 | Name: Matthias Blume | |
1482 | Date: 2002/02/15 16:00:00 EST | |
1483 | Tag: Release_110_39-orig | |
1484 | Description: | |
1485 | ||
1486 | Working release 110.39. New bootfiles. | |
1487 | ||
1488 | (Update: There was a small bug in the installer so it wouldn't work | |
1489 | with all shells. So I retagged. -Matthias) | |
1490 | ||
1491 | ---------------------------------------------------------------------- | |
1492 | Name: Matthias Blume | |
1493 | Date: 2002/02/15 14:17:00 EST | |
1494 | Tag: blume-20020215-showbindings | |
1495 | Description: | |
1496 | ||
1497 | Added EnvRef.listBoundSymbols and CM.State.showBindings. Especially | |
1498 | the latter can be useful for exploring what bindings are available at | |
1499 | the interactive prompt. (The first function returns only the list | |
1500 | of symbols that are really bound, the second prints those but also the | |
1501 | ones that CM's autoloading mechanism knows about.) | |
1502 | ||
1503 | ---------------------------------------------------------------------- | |
1504 | Name: Matthias Blume | |
1505 | Date: 2002/02/15 12:08:00 EST | |
1506 | Tag: blume-20020215-iptrs | |
1507 | Description: | |
1508 | ||
1509 | Two improvements to ml-nlffigen: | |
1510 | ||
1511 | 1. Write files only if they do not exist or if their current contents | |
1512 | do not coincide with what's being written. (That is, avoid messing | |
1513 | with the time stamps unless absolutely necessary.) | |
1514 | ||
1515 | 2. Implement a "repository" mechanism for generated files related | |
1516 | to "incomplete pointer types". See the README file for details. | |
1517 | ||
1518 | ---------------------------------------------------------------------- | |
1519 | Name: Matthias Blume | |
1520 | Date: 2002/02/14 11:50:00 EST | |
1521 | Tag: blume-20020214-quote | |
1522 | Description: | |
1523 | ||
1524 | Added a type 't t_' to tag.sml (in ml-nlffi-lib.cm). This is required | |
1525 | because of the new and improved tag generation scheme. (Thanks to Allen | |
1526 | Leung for pointing it out.) | |
1527 | ||
1528 | ---------------------------------------------------------------------- | |
1529 | Name: Lal George | |
1530 | Date: 2002/02/14 09:55:27 EST 2002 | |
1531 | Tag: george-20020214-isabelle-bug | |
1532 | Description: | |
1533 | ||
1534 | Fixed the MLRISC bug sent by Markus Wenzel regarding the compilation | |
1535 | of Isabelle on the x86. | |
1536 | ||
1537 | From Allen: | |
1538 | ----------- | |
1539 | I've found the problem: | |
1540 | ||
1541 | in ra-core.sml, I use the counter "blocked" to keep track of the | |
1542 | true number of elements in the freeze queue. When the counter goes | |
1543 | to zero, I skip examining the queue. But I've messed up the | |
1544 | bookkeeping in combine(): | |
1545 | ||
1546 | else (); | |
1547 | case !ucol of | |
1548 | PSEUDO => (if !cntv > 0 then | |
1549 | (if !cntu > 0 then blocked := !blocked - 1 else (); | |
1550 | ^^^^^^^^^^^^^^^^^^^^^^^ | |
1551 | moveu := mergeMoveList(!movev, !moveu) | |
1552 | ) | |
1553 | else (); | |
1554 | ||
1555 | combine() is called to coalesce two nodes u and v. | |
1556 | I think I was thinking that if the move counts of u and v are both | |
1557 | greater than zero then after they are coalesced then one node is | |
1558 | removed from the freeze queue. Apparently I was thinking that | |
1559 | both u and v are of low degree, but that's clearly not necessarily true. | |
1560 | ||
1561 | ||
1562 | 02/12/2002: | |
1563 | Here's the patch. HOL now compiles. | |
1564 | ||
1565 | I don't know how this impact on performance (compile | |
1566 | time or runtime). This bug caused the RA (especially on the x86) | |
1567 | to go thru the potential spill phase when there are still nodes on the | |
1568 | freeze queue. | |
1569 | ||
1570 | ||
1571 | ||
1572 | ||
1573 | ---------------------------------------------------------------------- | |
1574 | Name: Matthias Blume | |
1575 | Date: 2002/02/13 22:40:00 EST | |
1576 | Tag: blume-20020213-fptr-rtti | |
1577 | Description: | |
1578 | ||
1579 | Fixed a bug in ml-nlffigen that was introduced with one of the previous | |
1580 | updates. | |
1581 | ||
1582 | ---------------------------------------------------------------------- | |
1583 | Name: Matthias Blume | |
1584 | Date: 2002/02/13 16:41:00 EST | |
1585 | Tag: blume-20020213-cmlpq | |
1586 | Description: | |
1587 | ||
1588 | Added new priority queue export symbols (which have just been added to | |
1589 | smlnj-lib.cm) to CML's version of smlnj-lib.cm. (Otherwise CML would | |
1590 | not compile and the installer would choke.) | |
1591 | ||
1592 | ---------------------------------------------------------------------- | |
1593 | Name: Matthias Blume | |
1594 | Date: 2002/02/13 16:15:00 EST | |
1595 | Tag: blume-20020213-various | |
1596 | Description: | |
1597 | ||
1598 | 1. More tweaks to ml-nlffigen: | |
1599 | ||
1600 | - better internal datastructures (resulting in slight speedup) | |
1601 | - "-match" option requires exact match | |
1602 | - "localized" gensym counters (untagged structs/unions nested within | |
1603 | other structs/unions or within typedefs get a fresh counter; their | |
1604 | tag will be prefixed by a concatenation of their parents' tags) | |
1605 | - bug fixes (related to calculation of transitive closure of types | |
1606 | to be included in the output) | |
1607 | ||
1608 | 2. Minor Basis updates: | |
1609 | ||
1610 | - added implementations for List.collate and Option.app | |
1611 | ||
1612 | ---------------------------------------------------------------------- | |
1613 | Name: Matthias Blume | |
1614 | Date: 2002/02/11 15:55:00 EST | |
1615 | Tag: blume-20020211-gensym | |
1616 | Description: | |
1617 | ||
1618 | Added a "-gensym" option to command line of ml-nlffigen. This can be | |
1619 | used to specify a "stem" -- a string that is inserted in all "gensym'd" | |
1620 | names (ML structure names that correspond to unnamed C structs, unions, | |
1621 | and enums), so that separate runs of ml-nlffigen do not clash. | |
1622 | ||
1623 | ---------------------------------------------------------------------- | |
1624 | Name: Matthias Blume | |
1625 | Date: 2002/02/11 12:05:00 EST | |
1626 | Tag: blume-20020211-gensml | |
1627 | Description: | |
1628 | ||
1629 | A quick fix for a problem with GenSML (in the pgraph-util library): | |
1630 | Make generation of toplevel "local" optional. (Strictly speaking, | |
1631 | signature definitions within "local" are not legal SML.) | |
1632 | ||
1633 | Other than that: updates to INSTALL and cm/TODO. | |
1634 | ||
1635 | ---------------------------------------------------------------------- | |
1636 | Name: Matthias Blume | |
1637 | Date: 2002/02/08 15:00:00 EST | |
1638 | Tag: blume-20020208-uniquepid | |
1639 | Description: | |
1640 | ||
1641 | 0. Version number has been bumped to 110.38.1. NEW BOOTFILES!!! | |
1642 | ||
1643 | 1. The installer (config/install.sh) has gotten smarter: | |
1644 | ||
1645 | - Configuration options are a bit easier to specify now | |
1646 | (in config/targets). | |
1647 | - Bug in recognizing .tar.bz2 files fixed. | |
1648 | - Installer automatically resolves dependencies between | |
1649 | configuration options (e.g., if you ask for eXene, you will | |
1650 | also get cml -- regardless whether you asked for it or not). | |
1651 | - Installer can run in "quieter mode" by setting the environment | |
1652 | variable INSTALL_QUIETLY to "true". "Quieter" does not mean | |
1653 | "completely silent", though. | |
1654 | - Build HashCons library as part of smlnj-lib. | |
1655 | ||
1656 | 2. A new scheme for assigning persistent identifiers to compilation | |
1657 | units (and, by extension, to types etc.) has been put into place. | |
1658 | This fixes a long-standing bug where types and even dynamic values | |
1659 | can get internally confused, thereby compromising type safety | |
1660 | (abstraction) and dynamic correctness. See | |
1661 | ||
1662 | http://cm.bell-labs.com/cm/cs/who/blume/pid-confusion.tgz | |
1663 | ||
1664 | for an example of how things could go wrong until now. | |
1665 | ||
1666 | The downside of the new scheme is that pids are not quite as | |
1667 | persistent as they used to be: CM will generate a fresh pid | |
1668 | for every compilation unit that it thinks it sees for the first | |
1669 | time. That means that if you compile starting from a clean, fresh | |
1670 | source tree at two different times, you end up with different | |
1671 | binaries. | |
1672 | ||
1673 | Cutoff recompilation, however, has not been compromised because | |
1674 | CM keeps pid information in special caches between runs. | |
1675 | ||
1676 | ---------------------------------------------------------------------- | |
1677 | Name: Lal George | |
1678 | Date: 2002/02/07 15:34:13 EST 2002 | |
1679 | Tag: <none> | |
1680 | Description: | |
1681 | ||
1682 | Compilers that generate assembly code may produce global labels | |
1683 | whose value is resolved at link time. The various peephole optimization | |
1684 | modules did not take this in account. | |
1685 | ||
1686 | TODO. The Labels.addrOf function should really return an option | |
1687 | type so that clients are forced to deal with this issue, rather | |
1688 | than an exception being raised. | |
1689 | ||
1690 | ---------------------------------------------------------------------- | |
1691 | Name: Lal George | |
1692 | Date: 2002/02/06 13:55:02 EST | |
1693 | Tag: george-20020206-ra-breakup | |
1694 | Description: | |
1695 | ||
1696 | 1. A bug fix from Allen. | |
1697 | ||
1698 | A typo causes extra fstp %st(0)'s to be generated at compensation | |
1699 | edges, which might cause stack underflow traps at runtime. This | |
1700 | occurs in fft where there are extraneous fstps right before the 'into' | |
1701 | trap instruction (in this case they are harmless since none of the | |
1702 | integers overflow.) | |
1703 | ||
1704 | 2. Pulled out various utility modules that were embedded in the modules | |
1705 | of the register allocator. I need these modules for other purposes, but | |
1706 | they are not complete enough to put into a library (just yet). | |
1707 | ---------------------------------------------------------------------- | |
1708 | Name: Matthias Blume | |
1709 | Date: 2002/01/31 16:05:00 EST | |
1710 | Tag: blume-20020131-sparc-ccalls | |
1711 | Description: | |
1712 | ||
1713 | 1. C-calls on Sparc needlessly allocated a huge chunk (96 bytes) | |
1714 | of extra stack space by mistake. Fixed. | |
1715 | ||
1716 | 2. Bug in logic of handling of command-line options in ml-nlffigen fixed. | |
1717 | ||
1718 | ---------------------------------------------------------------------- | |
1719 | Name: Allen Leung | |
1720 | Date: 2002/01/30 | |
1721 | Tag: leunga-20020130-nowhere-bug-fix | |
1722 | Description: | |
1723 | ||
1724 | MLRISC bug fixes: | |
1725 | 1. Fixed a bindings computation bug in the 'nowhere' program generator tool. | |
1726 | 2. MachineInt.fromString was negating its value. | |
1727 | ||
1728 | ---------------------------------------------------------------------- | |
1729 | Name: Matthias Blume | |
1730 | Date: 2002/01/29 | |
1731 | Tag: blume-20020129-INSTALL | |
1732 | Description: | |
1733 | ||
1734 | - Added somewhat detailed installation instructions (file INSTALL). | |
1735 | - Fixed curl-detection bug in config/install.sh. | |
1736 | - It is now possible to select the URL getter using the URLGETTER | |
1737 | environment variable: | |
1738 | ||
1739 | not set / "unknown" --> automatic detection (script tries wget, | |
1740 | curl, and lynx) | |
1741 | "wget" / "curl" / "lynx" --> use the specified program (script "knows" | |
1742 | how to properly invoke them) | |
1743 | other --> use $URLGETTER directly, it must take | |
1744 | precisely two command-line arguments | |
1745 | (source URL and destination file name) | |
1746 | ||
1747 | ---------------------------------------------------------------------- | |
1748 | Name: Matthias Blume | |
1749 | Date: 2002/01/28 | |
1750 | Tag: blume-20020128-sparc-ccalls | |
1751 | Description: | |
1752 | ||
1753 | - Fixed problem with calculation of "used" registers in sparc-c-calls. | |
1754 | - Make use of the allocParam argument in sparc-c-calls. | |
1755 | ||
1756 | ---------------------------------------------------------------------- | |
1757 | Name: Matthias Blume | |
1758 | Date: 2002/01/28 | |
1759 | Tag: blume-20020128-allocParam | |
1760 | Description: | |
1761 | ||
1762 | John Reppy: Changes c-calls API to accept client-callback for | |
1763 | allocating extra stack space. | |
1764 | me: Corresponding changes to mlriscGen (using a dummy argument that | |
1765 | does not change the current behavior). | |
1766 | ||
1767 | ---------------------------------------------------------------------- | |
1768 | Name: Matthias Blume | |
1769 | Date: 2002/01/28 12:00:00 | |
1770 | Tag: Release_110_38 | |
1771 | Description: | |
1772 | ||
1773 | This time for real!!! | |
1774 | ||
1775 | ---------------------------------------------------------------------- | |
1776 | Name: Matthias Blume | |
1777 | Date: 2002/01/28 10:56:00 EST | |
1778 | Tag: blume-20020128-retraction | |
1779 | Description: | |
1780 | ||
1781 | 0. Retracted earlier 110.38. (The Release_110_38 tag has been replaced | |
1782 | with blume-Release_110_38-retracted.) | |
1783 | ||
1784 | 1. Fixed a problem with incorrect rounding modes in real64.sml. | |
1785 | (Thanks to Andrew Mccreight <andrew.mccreight@yale.edu>.) | |
1786 | ||
1787 | 2. A bug in ml-nlffigen related to the handling of unnamed structs, unions, | |
1788 | and enums fixed. The naming of corresponding ML identifiers should | |
1789 | now be consistent again. | |
1790 | ||
1791 | ---------------------------------------------------------------------- | |
1792 | Name: Allen Leung | |
1793 | Date: 2002/01/27 | |
1794 | Tag: leunga-20020127-nowhere | |
1795 | Description: | |
1796 | ||
1797 | Added a target called nowhere in the configuration scripts. | |
1798 | Enabling this will build the MLRISC 'nowhere' tool (for translating | |
1799 | programs with where-clauses into legal SML code) during installation. | |
1800 | ||
1801 | ---------------------------------------------------------------------- | |
1802 | Name: Matthias Blume | |
1803 | Date: 2002/01/25 21:27:00 EST | |
1804 | Tag: blume-Release_110_38-retracted | |
1805 | Description: | |
1806 | ||
1807 | Call it a (working) release! Version is 110.38. Bootfiles are ready. | |
1808 | ||
1809 | README will be added later. | |
1810 | ||
1811 | !!! NOTE: Re-tagged as blume-Release_110_38-retracted. Original tag | |
1812 | (Release_110_38) removed. Reason: Last-minute bug fixes. | |
1813 | ||
1814 | ---------------------------------------------------------------------- | |
1815 | Name: Matthias Blume | |
1816 | Date: 2002/01/25 | |
1817 | Tag: blume-20020125-ffi | |
1818 | Description: | |
1819 | ||
1820 | A large number of tweaks and improvements to ml-nlffi-lib and | |
1821 | ml-nlffigen: | |
1822 | ||
1823 | - ML represenation types have been streamlined | |
1824 | - getter and setter functions work with concrete values, not abstract | |
1825 | ones where possible | |
1826 | - ml-nlffigen command line more flexible (see README file there) | |
1827 | - some bugs have been fixed (hopefully) | |
1828 | ||
1829 | ---------------------------------------------------------------------- | |
1830 | Name: Lal George | |
1831 | Date: 2002/01/24 | |
1832 | Tag: george-20020124-risc-ra-interface | |
1833 | Description: | |
1834 | ||
1835 | There is a dramatic simplification in the interface to the | |
1836 | register allocator for RISC architectures as a result of making | |
1837 | parallel copy instructions explicit. | |
1838 | ||
1839 | ---------------------------------------------------------------------- | |
1840 | Name: Matthias Blume | |
1841 | Date: 2002/01/22 | |
1842 | Tag: blume-20020122-x86-ccalls | |
1843 | Description: | |
1844 | ||
1845 | Bug fix for c-calls on x86 (having to do with how char- and | |
1846 | short-arguments are being handled). | |
1847 | ||
1848 | ---------------------------------------------------------------------- | |
1849 | Name: Matthias Blume | |
1850 | Date: 2002/01/21 | |
1851 | Tag: blume-20020121-ff | |
1852 | Description: | |
1853 | ||
1854 | Another day of fiddling with the FFI... | |
1855 | ||
1856 | 1. Bug fix/workaround: CKIT does not complain about negative array | |
1857 | dimensions, so ml-nlffigen has to guard itself against this possibility. | |
1858 | (Otherwise a negative dimension would send it into an infinite loop.) | |
1859 | ||
1860 | 2. Some of the abstract types (light objects, light pointers, most "base" | |
1861 | types) in structure C are now eqtypes. | |
1862 | ||
1863 | 3. Added constructors and test functions for NULL function pointers. | |
1864 | ||
1865 | ---------------------------------------------------------------------- | |
1866 | Name: Matthias Blume | |
1867 | Date: 2002/01/18 | |
1868 | Tag: blume-20020118-ready-for-new-release | |
1869 | Description: | |
1870 | ||
1871 | Made config/srcarchiveurl point to a new place. (Will provide boot | |
1872 | files shortly.) | |
1873 | ||
1874 | Maybe we christen this to be 110.38? | |
1875 | ||
1876 | ---------------------------------------------------------------------- | |
1877 | Name: Matthias Blume | |
1878 | Date: 2002/01/18 | |
1879 | Tag: blume-20020118-more-ffifiddle | |
1880 | Description: | |
1881 | ||
1882 | Today's FFI fiddling: | |
1883 | ||
1884 | - Provided a structure CGetSet with "convenient" versions of C.Get.* and | |
1885 | C.Set.* that use concrete (MLRep.*) arguments and results instead | |
1886 | of abstract ones. | |
1887 | ||
1888 | - Provided word-style bit operations etc. for "int" representation | |
1889 | types in MLRep.S<Foo>Bitops where <Foo> ranges over Char, Int, Short, | |
1890 | and Long. | |
1891 | ||
1892 | ---------------------------------------------------------------------- | |
1893 | Name: Matthias Blume | |
1894 | Date: 2002/01/18 | |
1895 | Tag: blume-20020118-use-x86-fp | |
1896 | Description: | |
1897 | ||
1898 | Now that x86-fast-fp seems to be working, I turned it back on again | |
1899 | by default. (Seems to work fine now, even with the FFI.) | |
1900 | ||
1901 | Other than that, I added some documentation about the FFI to | |
1902 | src/ml-nlffigen/README and updated the FFI test examples in | |
1903 | src/ml-nlffi-lib/Tests/*. | |
1904 | ||
1905 | ---------------------------------------------------------------------- | |
1906 | Name: Allen Leung | |
1907 | Date: 2002/01/17 | |
1908 | Tag: leunga-20020117-x86-fast-fp-call | |
1909 | Description: | |
1910 | ||
1911 | 1. Fixed a problem with handling return fp values when x86's fast fp | |
1912 | mode is turned on. | |
1913 | ||
1914 | 2. Minor pretty printing fix for cellset. Print %st(0) as %st(0) instead | |
1915 | of %f32. | |
1916 | ||
1917 | 3. Added a constructor INT32lit to the ast of MLRISC tools. | |
1918 | ||
1919 | ---------------------------------------------------------------------- | |
1920 | Name: Matthias Blume | |
1921 | Date: 2002/01/16 | |
1922 | Tag: blume-20020116-ffifiddle | |
1923 | Description: | |
1924 | ||
1925 | More fiddling with the FFI interface: | |
1926 | ||
1927 | - Make constness 'c instead of rw wherever possible. This eliminates | |
1928 | the need for certain explicit coercions. (However, due to ML's | |
1929 | value polymorphism, there will still be many cases where explicit | |
1930 | coercions are necessary. Phantom types are not the whole answer | |
1931 | to modeling a subtyping relationship in ML.) | |
1932 | ||
1933 | - ro/rw coersions for pointers added. (Avoids the detour through */&.) | |
1934 | ||
1935 | - "printf" test example added to src/ml-nlffi-lib/Tests. (Demonstrates | |
1936 | clumsy workaround for varargs problem.) | |
1937 | ||
1938 | ---------------------------------------------------------------------- | |
1939 | Name: Lal George | |
1940 | Date: 2002/01/15 | |
1941 | Tag: <none> | |
1942 | Description: | |
1943 | ||
1944 | 1. Since COPY instructions are no longer native to the architecture, | |
1945 | a generic functor can be used to implement the expandCopies function. | |
1946 | ||
1947 | 2. Allowed EXPORT and IMPORT pseudo-op declarations to appear inside a | |
1948 | TEXT segment. | |
1949 | ||
1950 | ---------------------------------------------------------------------- | |
1951 | Name: Matthias Blume | |
1952 | Date: 2002/01/15 | |
1953 | Tag: blume-20020115-ffiupdates | |
1954 | Description: | |
1955 | ||
1956 | 1. Fix for bug resulting in single-precision float values being returned | |
1957 | incorrectly from FFI calls. | |
1958 | ||
1959 | 2. Small modifications to C FFI API: | |
1960 | ||
1961 | - memory-allocation routines return straight objects (no options) | |
1962 | and raise an exception in out-of-memory situations | |
1963 | - unsafe extensions to cast between function pointers and pointers | |
1964 | from/to ints | |
1965 | - added structure C_Debug as an alternative to structure C where | |
1966 | pointer-dereferencing (|*| and |*!) always check for null-pointers | |
1967 | - added open_lib' to DynLinkage; open_lib' works like open_lib | |
1968 | but also takes a (possibly empty) list of existing library handles | |
1969 | that the current library depends on | |
1970 | ||
1971 | ---------------------------------------------------------------------- | |
1972 | Name: Matthias Blume | |
1973 | Date: 2002/01/10 | |
1974 | Tag: blume-20020110-newffigen | |
1975 | Description: | |
1976 | ||
1977 | 1. Updates to portable graph code. | |
1978 | ||
1979 | 2. Major update to ml-nlffigen and ml-nlffi-lib. Things are much | |
1980 | more scalable now so that even huge interfaces such as the one | |
1981 | for GTK compile in finite time and space. :-) | |
1982 | See src/ml-nlffigen/README for details on what's new. | |
1983 | ||
1984 | ---------------------------------------------------------------------- | |
1985 | Name: Lal George | |
1986 | Date: 2001/01/09 14:31:35 EST 2002 | |
1987 | Tag: george-20011206-rm-native-copy | |
1988 | Description: | |
1989 | ||
1990 | Removed the native COPY and FCOPY instructions | |
1991 | from all the architectures and replaced it with the | |
1992 | explicit COPY instruction from the previous commit. | |
1993 | ||
1994 | It is now possible to simplify many of the optimizations | |
1995 | modules that manipulate copies. This has not been | |
1996 | done in this change. | |
1997 | ||
1998 | ---------------------------------------------------------------------- | |
1999 | Name: Lal George | |
2000 | Date: 2001/12/06 16:50:13 EST 2001 | |
2001 | Tag: george-20011206-mlrisc-instruction | |
2002 | Description: | |
2003 | ||
2004 | Changed the representation of instructions from being fully abstract | |
2005 | to being partially concrete. That is to say: | |
2006 | ||
2007 | from | |
2008 | type instruction | |
2009 | ||
2010 | to | |
2011 | type instr (* machine instruction *) | |
2012 | ||
2013 | datatype instruction = | |
2014 | LIVE of {regs: C.cellset, spilled: C.cellset} | |
2015 | | KILL of {regs: C.cellset, spilled: C.cellset} | |
2016 | | COPYXXX of {k: CB.cellkind, dst: CB.cell list, src: CB.cell list} | |
2017 | | ANNOTATION of {i: instruction, a: Annotations.annotation} | |
2018 | | INSTR of instr | |
2019 | ||
2020 | This makes the handling of certain special instructions that appear on | |
2021 | all architectures easier and uniform. | |
2022 | ||
2023 | LIVE and KILL say that a list of registers are live or killed at the | |
2024 | program point where they appear. No spill code is generated when an | |
2025 | element of the 'regs' field is spilled, but the register is moved to | |
2026 | the 'spilled' (which is present, more for debugging than anything else). | |
2027 | ||
2028 | LIVE replaces the (now deprecated) DEFFREG instruction on the alpha. | |
2029 | We used to generate: | |
2030 | ||
2031 | DEFFREG f1 | |
2032 | f1 := f2 + f3 | |
2033 | trapb | |
2034 | ||
2035 | but now generate: | |
2036 | ||
2037 | f1 := f2 + f3 | |
2038 | trapb | |
2039 | LIVE {regs=[f1,f2,f3], spilled=[]} | |
2040 | ||
2041 | Furthermore, the DEFFREG (hack) required that all floating point instruction | |
2042 | use all registers mentioned in the instruction. Therefore f1 := f2 + f3, | |
2043 | defines f1 and uses [f1,f2,f3]! This hack is no longer required resulting | |
2044 | in a cleaner alpha implementation. (Hopefully, intel will not get rid of | |
2045 | this architecture). | |
2046 | ||
2047 | COPYXXX is intended to replace the parallel COPY and FCOPY available on | |
2048 | all the architectures. This will result in further simplification of the | |
2049 | register allocator that must be aware of them for coalescing purposes, and | |
2050 | will also simplify certain aspects of the machine description that provides | |
2051 | callbacks related to parallel copies. | |
2052 | ||
2053 | ANNOTATION should be obvious, and now INSTR represents the honest to God | |
2054 | machine instruction set! | |
2055 | ||
2056 | The <arch>/instructions/<arch>Instr.sml files define certain utility | |
2057 | functions for making porting easier -- essentially converting upper case | |
2058 | to lower case. All machine instructions (of type instr) are in upper case, | |
2059 | and the lower case form generates an MLRISC instruction. For example on | |
2060 | the alpha we have: | |
2061 | ||
2062 | datatype instr = | |
2063 | LDA of {r:cell, b:cell, d:operand} | |
2064 | | ... | |
2065 | ||
2066 | val lda : {r:cell, b:cell, d:operand} -> instruction | |
2067 | ... | |
2068 | ||
2069 | where lda is just (INSTR o LDA), etc. | |
2070 | ||
2071 | ---------------------------------------------------------------------- | |
2072 | Name: Matthias Blume | |
2073 | Date: 2001/11/22 21:40:00 EST | |
2074 | Tag: Release_110_37 | |
2075 | Description: | |
2076 | ||
2077 | Release 110.37. This time for real. | |
2078 | ||
2079 | ---------------------------------------------------------------------- | |
2080 | Name: Matthias Blume | |
2081 | Date: 2001/11/21 16:35:00 EST | |
2082 | Tag: blume-20011121-foot-in-mouth | |
2083 | Description: | |
2084 | ||
2085 | Removed the "Release_110_37" tag because of a serious bug. | |
2086 | This will be re-tagged once the bug is fixed. | |
2087 | ||
2088 | ---------------------------------------------------------------------- | |
2089 | Name: Matthias Blume | |
2090 | Date: 2001/11/21 16:14:00 EST | |
2091 | Tag: blume-20011121-forgottenfile | |
2092 | Description: | |
2093 | ||
2094 | Forgot to add a file. (Just a .tex-file -- part of | |
2095 | the CM manual source.) | |
2096 | ||
2097 | ---------------------------------------------------------------------- | |
2098 | Name: Matthias Blume | |
2099 | Date: 2001/11/21 16:10:00 EST | |
2100 | Tag: blume-20011121-invalid_110_37 | |
2101 | Description: | |
2102 | ||
2103 | Note: I removed the original tag "Release_110_37" from this commit | |
2104 | because we found a serious bug in all non-x86 backends. | |
2105 | - Matthias | |
2106 | ||
2107 | 1. Modifications to the SML/NJ code generator and to the runtime system | |
2108 | so that code object name strings are directly inserted into code | |
2109 | objects at code generation time. The only business the runtime system | |
2110 | has with this is now to read the name strings on occasions. | |
2111 | (The encoding of the name string has also changed somewhat.) | |
2112 | ||
2113 | 2. CM now implements a simple "set calculus" for specifying export lists. | |
2114 | In particular, it is now possible to refer to the export lists of | |
2115 | other libraries/groups/sources and form unions as well as differences. | |
2116 | See the latest CM manual for details. | |
2117 | ||
2118 | 3. An separate notion of "proxy" libraries has again be eliminated from | |
2119 | CM's model. (Proxy libraries are now simply a special case of using | |
2120 | the export list calculus.) | |
2121 | ||
2122 | 4. Some of the existing libraries now take advantage of the new set | |
2123 | calculus. | |
2124 | (Notice that not all libraries have been converted because some | |
2125 | of the existing .cm-files are supposed to be backward compatible | |
2126 | with 110.0.x.) | |
2127 | ||
2128 | 5. Some cleanup in stand-alone programs. (Don't use "exnMessage" -- use | |
2129 | "General.exnMessage"! The former relies on a certain hook to be | |
2130 | initialized, and that often does not happen in the stand-alone case.) | |
2131 | ||
2132 | ---------------------------------------------------------------------- | |
2133 | Name: Lal George | |
2134 | Date: 2001/11/21 13:56:18 EST | |
2135 | Tag: george-2001121-pseudo-ops | |
2136 | Description: | |
2137 | ||
2138 | Implemented a complete redesign of MLRISC pseudo-ops. Now there | |
2139 | ought to never be any question of incompatabilities with | |
2140 | pseudo-op syntax expected by host assemblers. | |
2141 | ||
2142 | For now, only modules supporting GAS syntax are implemented | |
2143 | but more should follow, such as MASM, and vendor assembler | |
2144 | syntax, e.g. IBM as, Sun as, etc. | |
2145 | ||
2146 | ---------------------------------------------------------------------- | |
2147 | Name: Matthias Blume | |
2148 | Date: 2001/11/14 11:52:00 EST | |
2149 | Tag: blume-20011114-srcname | |
2150 | Description: | |
2151 | ||
2152 | 1. Routed the name of the current source file to mlriscgen where it | |
2153 | should be directly emitted into the code object. (This last part | |
2154 | is yet to be done.) | |
2155 | ||
2156 | 2. Some cleanup of the pgraph code to make it match the proposal that | |
2157 | I put out the other day. (The proposal notwithstanding, things are | |
2158 | still in flux here.) | |
2159 | ||
2160 | ---------------------------------------------------------------------- | |
2161 | Name: Lal George | |
2162 | Date: 2001/11/14 09:44:04 EST | |
2163 | Tag: | |
2164 | Description: | |
2165 | ||
2166 | Fix for a backpatching bug reported by Allen. | |
2167 | ||
2168 | Because the boundary between short and long span-dependent | |
2169 | instructions is +/- 128, there are an astounding number of | |
2170 | span-dependent instructions whose size is over estimated. | |
2171 | ||
2172 | Allen came up with the idea of letting the size of span | |
2173 | dependent instructions be non-monotonic, for a maxIter | |
2174 | number of times, after which the size must be monotonically | |
2175 | increasing. | |
2176 | ||
2177 | This table shows the number of span-dependent instructions | |
2178 | whose size was over-estimated as a function of maxIter, for the | |
2179 | file Parse/parse/ml.grm.sml: | |
2180 | ||
2181 | maxIter # of instructions: | |
2182 | 10 687 | |
2183 | 20 438 | |
2184 | 30 198 | |
2185 | 40 0 | |
2186 | ||
2187 | In compiling the compiler, there is no significant difference in | |
2188 | compilation speed between maxIter=10 and maxIter=40. Actually, | |
2189 | my measurements showed that maxIter=40 was a tad faster than | |
2190 | maxIter=10! Also 96% of the files in the compiler reach a fix | |
2191 | point within 13 iterations, so fixing maxIter at 40, while high, | |
2192 | is okay. | |
2193 | ||
2194 | ---------------------------------------------------------------------- | |
2195 | Name: Matthias Blume | |
2196 | Date: 2001/10/31 15:25:00 EST | |
2197 | Tag: blume-20011031-pgraph | |
2198 | Description: | |
2199 | ||
2200 | CKIT: | |
2201 | * Changed the "Function" constructor of type Ast.ctype to carry optional | |
2202 | argument identifiers. | |
2203 | * Changed the return type of TypeUtil.getFunction accordingly. | |
2204 | * Type equality ignores the argument names. | |
2205 | * TypeUtil.composite tries to preserve argument names but gives up quickly | |
2206 | if there is a mismatch. | |
2207 | ||
2208 | installation script: | |
2209 | * attempts to use "curl" if available (unless "wget" is available as well) | |
2210 | ||
2211 | CM: | |
2212 | * has an experimental implementation of "portable graphs" which I will | |
2213 | soon propose as an implementation-independent library format | |
2214 | * there are also new libraries $/pgraph.cm and $/pgraph-util.cm | |
2215 | ||
2216 | NLFFI-LIB: | |
2217 | * some cleanup (all cosmetic) | |
2218 | ||
2219 | NLFFIGEN: | |
2220 | * temporarily disabled the mechanism that suppresses ML output for | |
2221 | C definitions whose identifiers start with an underscore character | |
2222 | * generate val bindings for enum constants | |
2223 | * user can request that only one style (light or heavy) is being used; | |
2224 | default is to use both (command-line arguments: -heavy and -light) | |
2225 | * fixed bug in handling of function types involving incomplete pointers | |
2226 | * generate ML entry points that take record arguments (i.e., using | |
2227 | named arguments) for C functions that have a prototype with named | |
2228 | arguments | |
2229 | (see changes to CKIT) | |
2230 | ||
2231 | ---------------------------------------------------------------------- | |
2232 | Name: Allen Leung | |
2233 | Date: 2001/10/27 20:34:00 EDT | |
2234 | Tag: leunga-20011027-x86-fast-fp-call | |
2235 | Description: | |
2236 | ||
2237 | Fixed the bug described in blume-20010920-slowfp. | |
2238 | ||
2239 | The fix involves | |
2240 | 1. generating FCOPYs in FSTP in ia32-svid | |
2241 | 2. marking a CALL with the appropriate annotation | |
2242 | ||
2243 | ---------------------------------------------------------------------- | |
2244 | Name: Matthias Blume | |
2245 | Date: 2001/10/16 11:32:00 EDT | |
2246 | Tag: blume-20011016-netbsd | |
2247 | Description: | |
2248 | ||
2249 | Underscore patch from Chris Richards (fixing problem with compiling | |
2250 | runtime system under recent NetBSD). | |
2251 | ||
2252 | ---------------------------------------------------------------------- | |
2253 | Name: Allen Leung | |
2254 | Date: 2001/10/12 17:18:32 EDT 2001 | |
2255 | Tag: leung-20011012-x86-printflowgraph | |
2256 | Description: | |
2257 | ||
2258 | X86RA now uses a valid (instead of dummy) PrintFlowgraph module. | |
2259 | ||
2260 | ---------------------------------------------------------------------- | |
2261 | Name: Lal George | |
2262 | Date: 2001/10/11 23:51:34 EDT | |
2263 | Tag: george-20011011-too-many-instrs | |
2264 | Description: | |
2265 | ||
2266 | The representation of a program point never expected to see more | |
2267 | than 65536 instructions in a basic block! | |
2268 | ||
2269 | ---------------------------------------------------------------------- | |
2270 | Name: Lal George | |
2271 | Date: 2001/10/09 09:41:37 EDT | |
2272 | Tag: george-20011008-mlrisc-labels | |
2273 | Description: | |
2274 | ||
2275 | Changed the machine description files to support printing of | |
2276 | local and global labels in assembly code, based on host assembler | |
2277 | conventions. | |
2278 | ||
2279 | ---------------------------------------------------------------------- | |
2280 | Name: Matthias Blume | |
2281 | Date: 2001/09/25 15:25:00 EDT | |
2282 | Tag: blume-20010925-exninfo | |
2283 | Description: | |
2284 | ||
2285 | I provided a non-hook implementation of exnName (at the toplevel) and | |
2286 | made the "dummy" implementation of exnMessage (at the toplevel) more | |
2287 | useful: if nothing gets "hooked in", then at least you are going to | |
2288 | see the exception name and a message indicating why you don't see more. | |
2289 | ||
2290 | [For the time being, programs that need exnMessage and want to use | |
2291 | ml-build should either use General.exnMessage (strongly recommended) or | |
2292 | refer to structure General at some other point so that CM sees a | |
2293 | static dependency.] | |
2294 | ||
2295 | [Similar remarks go for "print" and "use": If you want to use their | |
2296 | functionality in stand-alone programs generated by ml-build, then use | |
2297 | TextIO.output and Backend.Interact.useFile (from $smlnj/compiler.cm).] | |
2298 | ||
2299 | ---------------------------------------------------------------------- | |
2300 | Name: Matthias Blume | |
2301 | Date: 2001/09/20 17:28:00 EDT | |
2302 | Tag: blume-20010920-slowfp | |
2303 | Description: | |
2304 | ||
2305 | Allen says that x86-fast-fp is not safe yet, so I turned it off again... | |
2306 | ||
2307 | ---------------------------------------------------------------------- | |
2308 | Name: Matthias Blume | |
2309 | Date: 2001/09/20 17:20:00 EDT | |
2310 | Tag: blume-20010920-canonicalpaths | |
2311 | Description: | |
2312 | ||
2313 | 0. Updated the BOOT file (something that I forgot to do earlier). | |
2314 | ||
2315 | 1. Small internal change to CM so that it avoids "/../" in filenames | |
2316 | as much as possible (but only where it is safe). | |
2317 | ||
2318 | 2. Changed config/_run-sml (resulting in a changed bin/.run-sml) so | |
2319 | that arguments that contain delimiters are passed through correctly. | |
2320 | This change also means that all "special" arguments of the form | |
2321 | @SMLxxx... must come first. | |
2322 | ||
2323 | 3. Changed install script to put relative anchor names for tool commands | |
2324 | into pathconfig. | |
2325 | ||
2326 | ---------------------------------------------------------------------- | |
2327 | Name: Matthias Blume | |
2328 | Date: 2001/09/18 15:35:00 EDT | |
2329 | Tag: blume-20010918-readme11036 | |
2330 | Description: | |
2331 | ||
2332 | Added README files. | |
2333 | ||
2334 | ---------------------------------------------------------------------- | |
2335 | Name: Matthias Blume | |
2336 | Date: 2001/09/18 11:45:00 EDT | |
2337 | Tag: Release_110_36 (retag) | |
2338 | Description: | |
2339 | ||
2340 | Fixed mistake in config/preloads. Retagged as 110.36. | |
2341 | ||
2342 | ---------------------------------------------------------------------- | |
2343 | Name: Matthias Blume | |
2344 | Date: 2001/09/18 09:40:00 EDT | |
2345 | Tag: Release_110_36_orig (tag changed) | |
2346 | Description: | |
2347 | ||
2348 | New version (110.36). New bootfiles. | |
2349 | ||
2350 | ---------------------------------------------------------------------- | |
2351 | Name: Matthias Blume | |
2352 | Date: 2001/09/14 16:15:00 EDT | |
2353 | Tag: blume-20010914-x86fastfp | |
2354 | Description: | |
2355 | ||
2356 | John committed some changes that Allen made, in particular a (hopefully) | |
2357 | correctly working version of the x86-fp module. | |
2358 | ||
2359 | I changed the default setting of the Control.MLRISC.getFlag "x86-fast-fp" | |
2360 | flag to "true". Everything seems to compile to a fixpoint ok, and | |
2361 | "mandelbrot" speeds up by about 15%. | |
2362 | ||
2363 | ---------------------------------------------------------------------- | |
2364 | Name: Matthias Blume | |
2365 | Date: 2001/09/13 11:20:00 EDT | |
2366 | Tag: blume-20010913-minimal | |
2367 | Description: | |
2368 | ||
2369 | 1. Stefan Monnier's patch to fix a miscompilation problem that | |
2370 | was brought to light by John Reppy's work on Moby. | |
2371 | ||
2372 | 2. Implemented a minimal "structure Compiler" that contains just | |
2373 | "version" and "architecture". The minimal version will be | |
2374 | available when the full version is not. This is for backward- | |
2375 | compatibility with code that wants to test Compiler.version. | |
2376 | ||
2377 | ---------------------------------------------------------------------- | |
2378 | Name: Matthias Blume | |
2379 | Date: 2001/08/28 14:03:00 EDT | |
2380 | Tag: blume-20010828-ml-lex | |
2381 | Description: | |
2382 | ||
2383 | Fix for bug 1581, received from Neophytos Michael. | |
2384 | ||
2385 | ---------------------------------------------------------------------- | |
2386 | Name: Matthias Blume | |
2387 | Date: 2001/08/27 11:20:00 EDT | |
2388 | Tag: blume-20010827-readme11035 | |
2389 | Description: | |
2390 | ||
2391 | Fleshed out the README file for 110.35. | |
2392 | ||
2393 | ---------------------------------------------------------------------- | |
2394 | Name: Matthias Blume | |
2395 | Date: 2001/08/24 17:10:00 EDT | |
2396 | Tag: Release_110_35 | |
2397 | Description: | |
2398 | ||
2399 | New version number (110.35). New bootfiles. | |
2400 | ||
2401 | ---------------------------------------------------------------------- | |
2402 | Name: Lal George | |
2403 | Date: 2001/08/24 13:47:18 EDT 2001 | |
2404 | Tag: george-20010824-MLRISC-graphs | |
2405 | Description: | |
2406 | ||
2407 | removed clusters from MLRISC completely and replaced with graphs. | |
2408 | ||
2409 | ---------------------------------------------------------------------- | |
2410 | Name: Matthias Blume | |
2411 | Date: 2001/08/23 17:50:00 EDT | |
2412 | Tag: blume-20010823-toplevel | |
2413 | Description: | |
2414 | ||
2415 | - some reorganization of the code that implements various kinds of | |
2416 | environments in the compiler (static, dynamic, symbolic, combined) | |
2417 | - re-implemented the EnvRef module so that evalStream works properly | |
2418 | (if the stream contains references to "use", "CM.make", etc.) | |
2419 | - cleaned up evalloop.sml and interact.sml (but they need more cleaning) | |
2420 | ||
2421 | ---------------------------------------------------------------------- | |
2422 | Name: Matthias Blume | |
2423 | Date: 2001/08/20 15:50 EDT | |
2424 | Tag: blume20010820-slipup | |
2425 | Description: | |
2426 | ||
2427 | I forgot to commit a few files. Here they are... | |
2428 | ||
2429 | ---------------------------------------------------------------------- | |
2430 | Name: Matthias Blume | |
2431 | Date: 2001/08/20 15:35:00 EDT | |
2432 | Tag: blume-20010820-debugprof | |
2433 | Description: | |
2434 | ||
2435 | !!!! NEW BOOTFILES !!!! | |
2436 | ||
2437 | This is another round of reorganizing the compiler sources. This | |
2438 | time the main goal was to factor out all the "instrumentation" | |
2439 | passes (for profiling and backtracing) into their own library. | |
2440 | The difficulty was to do it in such a way that it does not depend | |
2441 | on elaborate.cm but only on elabdata.cm. | |
2442 | ||
2443 | Therefore there have been further changes to both elaborate.cm and | |
2444 | elabdata.cm -- more "generic" things have been moved from the former | |
2445 | to the latter. As a result, I was forced to split the assignment | |
2446 | of numbers indicating "primtyc"s into two portions: SML-generic and | |
2447 | SML/NJ-specific. Since it would have been awkward to maintain, | |
2448 | I bit the bullet and actually _changed_ the mapping between these | |
2449 | numbers and primtycs. The bottom line of this is that you need | |
2450 | a new set of bin- and bootfiles. | |
2451 | ||
2452 | I have built new bootfiles for all architectures, so doing a fresh | |
2453 | checkout and config/install.sh should be all you need. | |
2454 | ||
2455 | The newly created library's name is | |
2456 | ||
2457 | $smlnj/viscomp/debugprof.cm | |
2458 | ||
2459 | and its sources live under | |
2460 | ||
2461 | src/compiler/DebugProf | |
2462 | ||
2463 | ---------------------------------------------------------------------- | |
2464 | Name: Matthias Blume | |
2465 | Date: 2001/08/15 17:15:00 EDT | |
2466 | Tag: blume-20010815-compreorg | |
2467 | Description: | |
2468 | ||
2469 | This is a first cut at reorganizing the CM libraries that make up the | |
2470 | core of the compiler. The idea is to separate out pieces that could | |
2471 | be used independently by tools, e.g., the parser, the typechecker, etc. | |
2472 | ||
2473 | The current status is a step in this direction, but it is not quite | |
2474 | satisfactory yet. Expect more changes in the future. | |
2475 | ||
2476 | Here is the current (new) organization... | |
2477 | ||
2478 | What used to be $smlnj/viscomp/core.cm is now divided into | |
2479 | six CM libraries: | |
2480 | ||
2481 | $smlnj/viscomp/basics.cm | |
2482 | /parser.cm | |
2483 | /elabdata.cm | |
2484 | /elaborate.cm | |
2485 | /execute.cm | |
2486 | /core.cm | |
2487 | ||
2488 | The CM files for these libraries live under src/system/smlnj/viscomp. | |
2489 | All these libraries are proxy libraries that contain precisely | |
2490 | one CM library component. Here are the locations of the components | |
2491 | (all within the src/compiler tree): | |
2492 | ||
2493 | Basics/basics.cm | |
2494 | Parse/parser.cm | |
2495 | ElabData/elabdata.cm | |
2496 | Elaborator/elaborate.cm | |
2497 | Execution/execute.cm | |
2498 | core.cm | |
2499 | ||
2500 | [This organization is the same that has been used already | |
2501 | for a while for the architecture-specific parts of the visible | |
2502 | compiler and for the old version of core.cm.] | |
2503 | ||
2504 | As you will notice, many source files have been moved from their | |
2505 | respective original locations to a new home in one of the above | |
2506 | subtrees. | |
2507 | ||
2508 | The division of labor between the new libraries is the following: | |
2509 | ||
2510 | basics.cm: | |
2511 | - Simple, basic definitions that pertain to many (or all) of | |
2512 | the other libraries. | |
2513 | parser.cm: | |
2514 | - The SML parser, producing output of type Ast.dec. | |
2515 | - The type family for Ast is also defined and exported here. | |
2516 | elabdata.cm: | |
2517 | - The datatypes that describe input and output of the elaborator. | |
2518 | This includes types, absyn, and static environments. | |
2519 | elaborator.cm: | |
2520 | - The SML/NJ type checker and elaborator. | |
2521 | This maps an Ast.dec (with a given static environment) to | |
2522 | an Absyn.dec (with a new static environment). | |
2523 | - This libraries implements certain modules that used to be | |
2524 | structures as functors (to remove dependencies on FLINT). | |
2525 | execute.cm: | |
2526 | - Everything having to do with executing binary code objects. | |
2527 | - Dynamic environments. | |
2528 | core.cm: | |
2529 | - SML/NJ-specific instantiations of the elaborator and MLRISC. | |
2530 | - Top-level modules. | |
2531 | - FLINT (this should eventually become its own library) | |
2532 | ||
2533 | Notes: | |
2534 | ||
2535 | I am not 100% happy with the way I separated the elaborator (and its | |
2536 | data structures) from FLINT. Two instances of the same problem: | |
2537 | ||
2538 | 1. Data structures contain certain fields that carry FLINT-specific | |
2539 | information. I hacked around this using exn and the property list | |
2540 | module from smlnj-lib. But the fact that there are middle-end | |
2541 | specific fields around at all is a bit annoying. | |
2542 | ||
2543 | 2. The elaborator calculates certain FLINT-related information. I tried | |
2544 | to make this as abstract as I could using functorization, but, again, | |
2545 | the fact that the elaborator has to perform calculations on behalf | |
2546 | of the middle-end at all is not nice. | |
2547 | ||
2548 | 3. Having to used exn and property lists is unfortunate because it | |
2549 | weakens type checking. The other alternative (parameterizing | |
2550 | nearly *everything*) is not appealing, though. | |
2551 | ||
2552 | I removed the "rebinding =" warning hack because due to the new organization | |
2553 | it was awkward to maintain it. As a result, the compiler now issues some of | |
2554 | these warnings when compiling init.cmi during bootstrap compilation. On | |
2555 | the plus side, you also get a warning when you do, for example: | |
2556 | val op = = Int32.+ | |
2557 | which was not the case up to now. | |
2558 | ||
2559 | I placed "assign" and "deref" into the _Core structure so that the | |
2560 | code that deals with the "lazy" keyword can find them there. This | |
2561 | removes the need for having access to the primitive environment | |
2562 | during elaboration. | |
2563 | ||
2564 | ---------------------------------------------------------------------- | |
2565 | Name: Matthias Blume | |
2566 | Date: 2001/08/13 | |
2567 | Tag: blume-20010813-closures | |
2568 | Description: | |
2569 | ||
2570 | This fix was sent to us by Zhong Shao. It is supposed to improve the | |
2571 | performance of certain loops by avoiding needless closure allocation. | |
2572 | ||
2573 | ---------------------------------------------------------------------- | |
2574 | Name: Lal George | |
2575 | Date: 2001/07/31 10:03:23 EDT 2001 | |
2576 | Tag: george-20010731-x86-fmalloc | |
2577 | Description: Fixed bug in x86 calls | |
2578 | ||
2579 | There was a bug where call instructions would mysteriously | |
2580 | vanish. The call instruction had to be one that returned | |
2581 | a floating point value. | |
2582 | ||
2583 | ---------------------------------------------------------------------- | |
2584 | Name: Lal George | |
2585 | Date: 2001/07/19 16:36:29 EDT 2001 | |
2586 | Tag: george-20010719-simple-cells | |
2587 | Description: | |
2588 | ||
2589 | I have dramatically simplified the interface for CELLS in MLRISC. | |
2590 | ||
2591 | In summary, the cells interface is broken up into three parts: | |
2592 | ||
2593 | 1. CellsBasis : CELLS_BASIS | |
2594 | ||
2595 | CellsBasis is a top level structure and common for all | |
2596 | architectures. it contains the definitions of basic datatypes | |
2597 | and utility functions over these types. | |
2598 | ||
2599 | 2. functor Cells() : CELLS | |
2600 | ||
2601 | Cells generates an interface for CELLS that incorporates the | |
2602 | specific resources on the target architecture, such as the | |
2603 | presence of special register classes, their number and size, | |
2604 | and various useful substructures. | |
2605 | ||
2606 | 3. <ARCH>CELLS | |
2607 | ||
2608 | e.g. SparcCells: SPARCCELLS | |
2609 | ||
2610 | <ARCH>CELLS usually contains additional bindings for special | |
2611 | registers on the architecture, such as: | |
2612 | ||
2613 | val r0 : cell (* register zero *) | |
2614 | val y : cell (* Y register *) | |
2615 | val psr : cell (* processor status register *) | |
2616 | ... | |
2617 | ||
2618 | The structure returned by applying the Cells functor is opened | |
2619 | in this interface. | |
2620 | ||
2621 | The main implication of all this is that the datatypes for cells is | |
2622 | split between CellsBasis and CELLS -- a fairly simple change for user | |
2623 | code. | |
2624 | ||
2625 | In the old scheme the CELLS interface had a definitional binding of | |
2626 | the form: | |
2627 | ||
2628 | signature CELLS = sig | |
2629 | ||
2630 | structure CellsBasis = CellsBasis | |
2631 | ||
2632 | ... | |
2633 | ||
2634 | end | |
2635 | ||
2636 | With all the sharing constraints that goes on in MLRISC, this old | |
2637 | design quickly leads to errors such as: | |
2638 | ||
2639 | "structure definition spec inside of sharing ... " | |
2640 | ||
2641 | ||
2642 | and appears to require an unacceptable amount of sharing and where | |
2643 | constraint hackery. | |
2644 | ||
2645 | I think this error message (the interaction of definitional specs and | |
2646 | sharing) requires more explanation on our web page. | |
2647 | ||
2648 | ---------------------------------------------------------------------- | |
2649 | Name: Matthias Blume | |
2650 | Date: 2001/07/19 15:00:00 EDT | |
2651 | Tag: blume-20010719-libreorg | |
2652 | Description: | |
2653 | ||
2654 | This update puts together a fairly extensive but straightforward change | |
2655 | to the way the libraries that implement the interactive system are | |
2656 | organized: | |
2657 | ||
2658 | The biggest change is the elimination of structure Compiler. As a | |
2659 | replacement for this structure, there is now a CM library | |
2660 | (known as $smlnj/compiler.cm or $smlnj/compiler/current.cm) | |
2661 | that exports all the substructures of the original structure Compiler | |
2662 | directly. So instead of saying Compiler.Foo.bar one now simply | |
2663 | says Foo.bar. (The CM libraries actually export a collection of | |
2664 | structures that is richer than the collection of substructures of | |
2665 | structure Compiler.) | |
2666 | ||
2667 | To make the transition smooth, there is a separate library called | |
2668 | $smlnj/compiler/compiler.cm which puts together and exports the | |
2669 | original structure Compiler (or at least something very close to it). | |
2670 | ||
2671 | There are five members of the original structure Compiler | |
2672 | that are not exported directly but which instead became members | |
2673 | of a new structure Backend (described by signature BACKEND). These are: | |
2674 | structure Profile (: PROFILE), structure Compile (: COMPILE), structure | |
2675 | Interact (: INTERACT), structure Machine (: MACHINE), and val | |
2676 | architecture (: string). | |
2677 | ||
2678 | Structure Compiler.Version has become structure CompilerVersion. | |
2679 | ||
2680 | Cross-compilers for alpha32, hppa, ppc, sparc, and x86 are provided | |
2681 | by $smlnj/compiler/<arch>.cm where <arch> is alpha32, hppa, ppc, sparc, | |
2682 | or x86, respectively. | |
2683 | Each of these exports the same frontend structures that | |
2684 | $smlnj/compiler.cm exports. But they do not have a structure Backend | |
2685 | and instead export some structure <Arch>Backend where <Arch> is Alpha32, | |
2686 | Hppa, PPC, Sparc, or X86, respectively. | |
2687 | ||
2688 | Library $smlnj/compiler/all.cm exports the union of the exports of | |
2689 | $smlnj/compiler/<arch>.cm | |
2690 | ||
2691 | There are no structures <Arch>Compiler anymore, use | |
2692 | $smlnj/compiler/<arch>.cm instead. | |
2693 | ||
2694 | Library host-compiler-0.cm is gone. Instead, the internal library | |
2695 | that instantiates CM is now called cm0.cm. Selection of the host | |
2696 | compiler (backend) is no longer done here but. (Responsibility for it | |
2697 | now lies with $smlnj/compiler/current.cm. This seems to be more | |
2698 | logical.) | |
2699 | ||
2700 | Many individual files have been moved or renamed. Some files have | |
2701 | been split into multiple files, and some "dead" files have been deleted. | |
2702 | ||
2703 | Aside from these changes to library organization, there are also changes | |
2704 | to the way the code itself is organized: | |
2705 | ||
2706 | Structure Binfile has been re-implemented in such a way that it no | |
2707 | longer needs any knowledge of the compiler. It exclusively deals | |
2708 | with the details of binfile layout. It no longer invokes the | |
2709 | compiler (for the purpose of creating new prospective binfile | |
2710 | content), and it no longer has any knowledge of how to interpret | |
2711 | pickles. | |
2712 | ||
2713 | Structure Compile (: COMPILE) has been stripped down to the bare | |
2714 | essentials of compilation. It no longer deals with linking/execution. | |
2715 | The interface has been cleaned up considerably. | |
2716 | ||
2717 | Utility routines for dealing with linking and execution have been | |
2718 | moved into their own substructures. | |
2719 | ||
2720 | (The ultimate goal of these changes is to provide a light-weight | |
2721 | binfile loader/linker (at least for, e.g., stable libraries) that | |
2722 | does not require CM or the compiler to be present.) | |
2723 | ||
2724 | CM documentation has been updated to reflect the changes to library | |
2725 | organization. | |
2726 | ||
2727 | ---------------------------------------------------------------------- | |
2728 | Name: Matthias Blume | |
2729 | Date: 2001/07/10 17:30:00 EDT | |
2730 | Tag: Release_110_34 | |
2731 | Description: | |
2732 | ||
2733 | Minor tweak to 110.34 (re-tagged): | |
2734 | ||
2735 | - README.html file added to CVS repository | |
2736 | - runtime compiles properly under FreeBSD 3.X and 4.X | |
2737 | ||
2738 | ---------------------------------------------------------------------- | |
2739 | Name: Matthias Blume | |
2740 | Date: 2001/07/10 17:30:00 EDT | |
2741 | Tag: Release_110_34 | |
2742 | Description: | |
2743 | ||
2744 | New version number (110.34). New bootfiles. | |
2745 | ||
2746 | ---------------------------------------------------------------------- | |
2747 | Name: Matthias Blume | |
2748 | Date: 2001/07/09 16:00:00 EDT | |
2749 | Tag: blume-20010709-more-varargs | |
2750 | Description: | |
2751 | ||
2752 | I changed the handling of varargs in ml-nlffigen again: | |
2753 | The ellipsis ... will now simply be ignored (with an accompanying warning). | |
2754 | ||
2755 | The immediate effect is that you can actually call a varargs function | |
2756 | from ML -- but you can't actually supply any arguments beyond the ones | |
2757 | specified explicitly. (For example, you can call printf with its format | |
2758 | string, but you cannot pass additional arguments.) | |
2759 | ||
2760 | This behavior is only marginally more useful than the one before, but | |
2761 | it has the advantage that a function or, more importantly, a function | |
2762 | type never gets dropped on the floor, thus avoiding follow-up problems with | |
2763 | other types that refer to the offending one. | |
2764 | ||
2765 | ---------------------------------------------------------------------- | |
2766 | Name: Matthias Blume | |
2767 | Date: 2001/07/09 11:25:00 EDT | |
2768 | Tag: blume-20010709-varargs | |
2769 | Description: | |
2770 | ||
2771 | 1. ckit-lib.cm now exports structure Error | |
2772 | 2. ml-nlffigen reports occurences of "..." (i.e., varargs function types) | |
2773 | with a warning accompanied by a source location. Moreover, it | |
2774 | merely skips the offending function or type and proceeds with the | |
2775 | rest of its work.u As a result, one can safely feed C code containing | |
2776 | "..." to ml-nlffigen. | |
2777 | 3. There are some internal improvements to CM, providing slightly | |
2778 | more general string substitutions in the tools subsystem. | |
2779 | ||
2780 | ---------------------------------------------------------------------- | |
2781 | Name: Matthias Blume | |
2782 | Date: 2001/06/27 15:10:00 EDT | |
2783 | Tag: blume-20010627-concur | |
2784 | Description: | |
2785 | ||
2786 | Fixed a small bug in CM's handling of parallel compilation. | |
2787 | (You could observe the bug by Control-C-interrupting an ordinary | |
2788 | CMB.make or CM.stabilize and then attaching some compile servers. | |
2789 | The result was that all of a sudden the previously interrupted | |
2790 | compilation would continue on its own. This was because of | |
2791 | an over-optimization: CM did not bother to clean out certain queues | |
2792 | when no servers were attached "anyway", resulting in the contents | |
2793 | of these queues to grab control when new servers did get attached.) | |
2794 | ||
2795 | There is also another minor update to the CM manual. | |
2796 | ||
2797 | ---------------------------------------------------------------------- | |
2798 | Name: Matthias Blume | |
2799 | Date: 2001/06/26 16:15:00 EDT | |
2800 | Tag: blume-20010626-cmdoc | |
2801 | Description: | |
2802 | ||
2803 | Minor typo fixed in CM manual (syntax diagram for libraries). | |
2804 | ||
2805 | ---------------------------------------------------------------------- | |
2806 | Name: Matthias Blume | |
2807 | Date: 2001/06/25 22:55:00 EDT | |
2808 | Tag: blume-20010625-x86pc | |
2809 | Description: | |
2810 | ||
2811 | Fixed a nasty bug in the X86 assembly code that caused signal | |
2812 | handlers to fail (crash) randomly. | |
2813 | ||
2814 | ---------------------------------------------------------------------- | |
2815 | Name: Matthias Blume | |
2816 | Date: 2001/06/25 12:05:00 EDT | |
2817 | Tag: blume-20010625-nlffigen | |
2818 | Description: | |
2819 | ||
2820 | This update fixes a number of minor bugs in ml-nlffigen as reported by | |
2821 | Nick Carter <nbc@andrew.cmu.edu>. | |
2822 | ||
2823 | 1. Silly but ok typedefs of the form "typedef void myvoid;" are now accepted. | |
2824 | 2. Default names for generated files are now derived from the name of | |
2825 | the C file *without its directory*. In particular, this causes generated | |
2826 | files to be placed locally even if the C file is in some system directory. | |
2827 | 3. Default names for generated signatures and structures are also derived | |
2828 | from the C file name without its directory. This avoids silly things | |
2829 | like "structure GL/GL". | |
2830 | (Other silly names are still possible because ml-nlffigen does not do | |
2831 | a thorough check of whether generated names are legal ML identifiers. | |
2832 | When in doubt, use command line arguments to force particular names.) | |
2833 | ||
2834 | ---------------------------------------------------------------------- | |
2835 | Name: Matthias Blume | |
2836 | Date: 2001/06/21 12:25:00 EDT | |
2837 | Tag: blume-20010621-eXene | |
2838 | Description: | |
2839 | ||
2840 | eXene now compiles and (sort of) works again. | |
2841 | ||
2842 | The library name (for version > 110.33) is $/eXene.cm. | |
2843 | ||
2844 | I also added an new example in src/eXene/examples/nbody. See the | |
2845 | README file there for details. | |
2846 | ||
2847 | ---------------------------------------------------------------------- | |
2848 | Name: Matthias Blume | |
2849 | Date: 2001/06/20 16:40:00 EDT | |
2850 | Tag: blume-20010620-cml | |
2851 | Description: | |
2852 | ||
2853 | CML now compiles and works again. | |
2854 | ||
2855 | Libraries (for version > 110.33): | |
2856 | ||
2857 | $cml/cml.cm Main CML library. | |
2858 | $cml/basis.cm CML's version of $/basis.cm. | |
2859 | $cml/cml-internal.cm Internal helper library. | |
2860 | $cml/core-cml.cm Internal helper library. | |
2861 | $cml-lib/trace-cml.cm Tracing facility. | |
2862 | $cml-lib/smlnj-lib.cm CML's version of $/smlnj-lib.cm | |
2863 | ||
2864 | The installer (config/install.sh) has been taught how to properly | |
2865 | install this stuff. | |
2866 | ||
2867 | ---------------------------------------------------------------------- | |
2868 | Name: Matthias Blume | |
2869 | Date: 2001/06/19 17:55:00 EDT | |
2870 | Tag: blume-20010619-instantiate | |
2871 | Description: | |
2872 | ||
2873 | This un-breaks the fix for bug 1432. | |
2874 | (The bug was originally fixed in 110.9 but I broke it again some | |
2875 | time after that.) | |
2876 | ||
2877 | ---------------------------------------------------------------------- | |
2878 | Name: Matthias Blume | |
2879 | Date: 2001/06/19 17:25:00 EDT | |
2880 | Tag: blume-20010619-signals | |
2881 | Description: | |
2882 | ||
2883 | This should (hopefully) fix the long-standing signal handling bug. | |
2884 | (The runtime system was constructing a continuation record with an | |
2885 | incorrect descriptor which would cause the GC to drop data on the floor...) | |
2886 | ||
2887 | ---------------------------------------------------------------------- | |
2888 | Name: Matthias Blume | |
2889 | Date: 2001/06/15 15:05:00 EDT | |
2890 | Tag: blume-20010615-moresparc | |
2891 | Description: | |
2892 | ||
2893 | Here is a short late-hour update related to Sparc c-calls: | |
2894 | ||
2895 | -- made handling of double-word arguments a bit smarter | |
2896 | ||
2897 | -- instruction selection phase tries to collapse certain clumsily | |
2898 | constructed ML-Trees; typical example: | |
2899 | ||
2900 | ADD(ty,ADD(_,e,LI d1),LI d2) -> ADD(ty,e,LI(d1+d2)) | |
2901 | ||
2902 | This currently has no further impact on SML/NJ since mlriscGen does | |
2903 | not seem to generate such patterns in the first place, and c-calls | |
2904 | (which did generate them in the beginning) has meanwhile been fixed | |
2905 | so as to avoid them as well. | |
2906 | ||
2907 | ---------------------------------------------------------------------- | |
2908 | Name: Matthias Blume | |
2909 | Date: 2001/06/15 15:05:00 EDT | |
2910 | Tag: blume-20010615-sparc | |
2911 | Description: | |
2912 | ||
2913 | The purpose of this update is to provide an implementation of NLFFI | |
2914 | on Sparc machines. | |
2915 | ||
2916 | Here are the changes in detail: | |
2917 | ||
2918 | * src/MLRISC/sparc/c-calls/sparc-c-calls.sml is a new file containing | |
2919 | the Sparc implementation of the c-calls API. | |
2920 | * The Sparc backend of SML/NJ has been modified to uniformely use %fp | |
2921 | for accessing the ML frame. Thus, we have a real frame pointer and | |
2922 | can freely modify %sp without need for an omit-frame-ptr phase. | |
2923 | The vfp logic in src/compiler/CodeGen/* has been changed to accomodate | |
2924 | this case. | |
2925 | * ml-nlffigen has been taught to produce code for different architectures | |
2926 | and calling conventions. | |
2927 | * In a way similar to what was done in the x86 case, the Sparc | |
2928 | backend uses its own specific extension to mltree. (For example, | |
2929 | it needs to be able to generate UNIMP instructions which are part | |
2930 | of the calling convention.) | |
2931 | * ml-nlffi-lib was reorganized to make it more modular (in particular, | |
2932 | to make it easier to plug in new machine- and os-dependent parts). | |
2933 | ||
2934 | There are some other fairly unrelated bug fixes and cleanups as well: | |
2935 | ||
2936 | * I further hacked the .cm files for MLRISC tools (like MDLGen) so | |
2937 | that they properly share their libraries with existing SML/NJ libraries. | |
2938 | * I fixed a minor cosmetic bug in CM, supressing certain spurious | |
2939 | follow-up error messages. | |
2940 | * Updates to CM/CMB documentation. | |
2941 | ||
2942 | TODO items: | |
2943 | ||
2944 | * MLRISC should use a different register as its asmTemp on the Sparc. | |
2945 | (The current %o2 is a really bad choice because it is part of the | |
2946 | calling conventions, so things might interfere in unexpected ways.) | |
2947 | ||
2948 | ---------------------------------------------------------------------- | |
2949 | Name: Matthias Blume | |
2950 | Date: 2001/06/07 | |
2951 | Tag: blume-20010607-calls | |
2952 | Description: | |
2953 | ||
2954 | A number of internal changes related to C calls and calling conventions: | |
2955 | ||
2956 | 1. ML-Tree CALL statements now carry a "pops" field. It indicates the | |
2957 | number of bytes popped implicitly (by the callee). In most cases | |
2958 | this field is 0 but on x86/win32 it is some non-zero value. This | |
2959 | is information provided for the benefit of the "omit-frameptr" pass. | |
2960 | 2. The CALL instruction on the x86 carries a similar "pops" field. | |
2961 | The instruction selection phase copies its value from the ML-Tree | |
2962 | CALL statement. | |
2963 | 3. On all other architectures, the instruction selection phase checks | |
2964 | whether "pops=0" and complains if not. | |
2965 | 4. The c-calls implementation for x86 now accepts two calling conventions: | |
2966 | "ccall" and "stdcall". When "ccall" is selected, the caller cleans | |
2967 | up after the call and pops is set to 0. For "stdcall", the caller | |
2968 | does nothing, leaving the cleanup to the callee; pops is set to | |
2969 | the number of bytes that were pushed onto the stack. | |
2970 | 5. The cproto decoder (compiler/Semant/types/cproto.sml) now can | |
2971 | distinguish between "ccall" and "stdcall". | |
2972 | 6. The UNIMP instruction has been added to the supported Sparc instruction | |
2973 | set. (This is needed for implementing the official C calling convention | |
2974 | on this architecture.) | |
2975 | 7. I fixed some of the .cm files under src/MLRISC/Tools to make them | |
2976 | work with the latest CM. | |
2977 | ||
2978 | ---------------------------------------------------------------------- | |
2979 | Name: Matthias Blume | |
2980 | Date: 2001/06/05 15:10:00 EDT | |
2981 | Tag: blume-20010605-cm-index | |
2982 | Description: | |
2983 | ||
2984 | 0. The "lambdasplit" parameter for class "sml" in CM has been documented. | |
2985 | ||
2986 | 1. CM can now generate "index files". These are human-readable files | |
2987 | that list on a per-.cm-file basis each toplevel symbol defined or | |
2988 | imported. The location of the index file for | |
2989 | <p>/<d>.cm is <p>/CM/INDEX/<d>.cm. | |
2990 | To enable index-file generation, set CM.Control.generate_index to true | |
2991 | or export an environment-symbol: export CM_GENERATE_INDEX=true. | |
2992 | ||
2993 | The CM manual has been updated accordingly. | |
2994 | ||
2995 | 2. I made some slight modifications to the c-calls API in MLRISC. | |
2996 | ||
2997 | a) There is now a callback to support saving/restoring of | |
2998 | dedicated but caller-save registers around the actual call | |
2999 | instruction. | |
3000 | b) One can optionally specify a comment-annotation for the | |
3001 | call instruction. | |
3002 | ||
3003 | 3. SML/NJ (mlriscGen.sml) uses this new API for the rawccall primop. | |
3004 | (For example, the comment annotation shows the C prototype of | |
3005 | the function being called.) | |
3006 | ||
3007 | ---------------------------------------------------------------------- | |
3008 | Name: Matthias Blume | |
3009 | Date: 2001/06/01 13:30:00 EDT | |
3010 | Tag: blume-20010601-nlffi-cleanup | |
3011 | Description: | |
3012 | ||
3013 | This is mostly a cleanup of MLFFI stuff: | |
3014 | ||
3015 | - some signature files have been put into a more exposed place | |
3016 | - the ugly 'f type parameter is gone (simplifies types tremendously!) | |
3017 | - ml-nlffigen changed accordingly | |
3018 | - tutorial updated | |
3019 | ||
3020 | Other changes: | |
3021 | ||
3022 | - author's affiliation in CM manual(s) updated | |
3023 | - some more recognized keywords added to Allen's sml.sty | |
3024 | ||
3025 | ---------------------------------------------------------------------- | |
3026 | Name: Matthias Blume | |
3027 | Date: 2001/05/25 15:30:00 EDT | |
3028 | Tag: blume-20010525-iptr | |
3029 | Description: | |
3030 | ||
3031 | - put the official 110.33-README (as it appears on the ftp server) under | |
3032 | CVS | |
3033 | - fixed a small bug related to incomplete pointer types in | |
3034 | ml-nlffigen | |
3035 | - small cosmetic change to the ml-nlffi-lib's "arr" type constructor | |
3036 | (it does not need the 'f type parameter) | |
3037 | ||
3038 | ---------------------------------------------------------------------- | |
3039 | Name: Matthias Blume | |
3040 | Date: 2001/05/23 14:30:00 EDT | |
3041 | Tag: Release_110_33 | |
3042 | Description: | |
3043 | ||
3044 | New version number (110.33). New bootfiles. | |
3045 | ||
3046 | ---------------------------------------------------------------------- | |
3047 | Name: Matthias Blume | |
3048 | Date: 2001/05/22 18:06:00 EDT | |
3049 | Tag: blume-20010522-targets | |
3050 | Description: | |
3051 | ||
3052 | Made install.sh use file config/targets.customized if it exists, falling | |
3053 | back to config/targets if it doesn't. This way one can have a customized | |
3054 | version of the targets file without touching the "real thing", thus | |
3055 | eliminating the constant fear of accidentally checking something bogus | |
3056 | back into the CVS repository... (File config/targets.customized must | |
3057 | not be added to the repository!) | |
3058 | ||
3059 | ---------------------------------------------------------------------- | |
3060 | Name: Matthias Blume | |
3061 | Date: 2001/05/22 16:30:00 EDT | |
3062 | Tag: blume-20010522-minitut | |
3063 | Description: | |
3064 | ||
3065 | 1. Bug fix in ml-nlffigen; now (hopefully) correctly handling | |
3066 | struct returns. | |
3067 | 2. Added src/ml-nlffi-lib/Doc/mini-tutorial.txt. This is some very | |
3068 | incomplete, preliminary documentation for NLFFI. | |
3069 | ||
3070 | ---------------------------------------------------------------------- | |
3071 | Name: Matthias Blume | |
3072 | Date: 2001/05/14 11:30:00 EDT | |
3073 | Tag: blume-20010514-script | |
3074 | Description: | |
3075 | ||
3076 | Some bugs in install script fixed. | |
3077 | ||
3078 | In addition to that I also made a slight change to the NLFFI API: | |
3079 | Functors generated by ml-nlffigen now take the dynamic library as a | |
3080 | straight functor argument, not as a suspended one. (The original | |
3081 | functor code used to force the suspension right away anyway, so there | |
3082 | was nothing gained by this complication of the interface.) | |
3083 | ||
3084 | ---------------------------------------------------------------------- | |
3085 | Name: Matthias Blume | |
3086 | Date: 2001/05/11 14:35:00 EDT | |
3087 | Tag: blume-20010511-ml-nlffi | |
3088 | Description: | |
3089 | ||
3090 | I finally took the plunge and added my new FFI code to the main | |
3091 | repository. For x86-linux it is now ready for prime-time. | |
3092 | ||
3093 | There are two new subdirectories of "src": | |
3094 | ||
3095 | - ml-nlffi-lib: | |
3096 | The utility library for programs using the FFI interface. | |
3097 | Here is the implementation of $/c.cm and its associated low-level | |
3098 | partners $/c-int.cm and $/memory.cm. | |
3099 | - ml-nlffigen: | |
3100 | A stand-alone program for generating ML glue code from C source | |
3101 | code. | |
3102 | ||
3103 | Building ml-nlffigen requires $/ckit-lib.cm. | |
3104 | ||
3105 | The config/install.sh script has been updates to do the Right Thing | |
3106 | (hopefully). | |
3107 | ||
3108 | Notice that the source tree for the C-Kit will not be put under "src" | |
3109 | but directly under the installation root directory. (This is the | |
3110 | structure that currently exists on the CVS server when you check out | |
3111 | module "sml".) Fortunately, config/install.sh knows about this oddity. | |
3112 | ||
3113 | Bugs: No documentation yet. | |
3114 | ||
3115 | ---------------------------------------------------------------------- | |
3116 | Name: Matthias Blume | |
3117 | Date: 2001/05/09 16:35:00 EDT | |
3118 | Tag: blume-20010509-cpscontract | |
3119 | Description: | |
3120 | ||
3121 | Fixed a bug in the accounting code in cpsopt/contract.sml. (The | |
3122 | wrapper/unwrapper elimination did not decrement usage counts and some | |
3123 | dead variables got overlooked by the dead-up logic.) | |
3124 | ||
3125 | ---------------------------------------------------------------------- | |
3126 | Name: Lal George | |
3127 | Date: 2001/05/08 17:26:09 EDT | |
3128 | Tag: george-20010508-omit-frameptr | |
3129 | Description: | |
3130 | ||
3131 | Changes to implement the omit-frame-pointer optimization to support | |
3132 | raw C calls. For now, there is only support on the Intel x86, but | |
3133 | other architectures will follow as more experience is gained with this. | |
3134 | ||
3135 | ||
3136 | ---------------------------------------------------------------------- | |
3137 | Name: Matthias Blume | |
3138 | Date: 2001/05/07 14:40:00 EDT | |
3139 | Tag: blume-20010507-proxies | |
3140 | Description: | |
3141 | ||
3142 | I made into "proxy libraries" all libraries that qualify for such a | |
3143 | change. (A qualifying library is a library that has another library or | |
3144 | groups as its sole member and repeats that member's export list | |
3145 | verbatim. A proxy library avoids this repetition by omitting its export | |
3146 | list, effectively inheriting the list that its (only) member exports. | |
3147 | See the CM manual for more explanation.) | |
3148 | The main effect is that explicit export lists for these libraries | |
3149 | do not have to be kepts in sync, making maintenance a bit easier. | |
3150 | ||
3151 | I also added copyright notices to many .cm-files. | |
3152 | ||
3153 | Last but not least, I made a new set of bootfiles. | |
3154 | ||
3155 | ---------------------------------------------------------------------- | |
3156 | Name: Matthias Blume | |
3157 | Date: 2001/05/04 17:00:00 EDT | |
3158 | Tag: blume-20010504-cm-lsplit | |
3159 | Description: | |
3160 | ||
3161 | 0. John merged pending changes to $/smlnj-lib.cm | |
3162 | ||
3163 | 1. Allen's previous change accidentally backed out of one of Lal's | |
3164 | earlier changes. I undid this mistake (re-introducing Lal's change). | |
3165 | ||
3166 | 2. I used the new topOrder' function from graph-scc.sml (from $/smlnj-lib.cm) | |
3167 | within the compiler where applicable. There is some code simplification | |
3168 | because of that. | |
3169 | ||
3170 | 3. The "split" phase (in FLINT) is now part of the default list of phases. | |
3171 | Compiler.Control.LambdaSplitting.* can be used to globally control the | |
3172 | lambda-splitting (cross-module-inlining) engine. In addition to that, | |
3173 | it can now also be controlled on a per-source basis: CM has been taught | |
3174 | a new tool parameter applicable to ML source files. | |
3175 | ||
3176 | - To turn lambda-splitting off completely: | |
3177 | local open Compiler.Control.LambdaSplitting in | |
3178 | val _ = set Off | |
3179 | end | |
3180 | - To make "no lambda-splitting" the global default (but allow per-source | |
3181 | overriding); this is the initial setting: | |
3182 | local open Compiler.Control.LambdaSplitting in | |
3183 | val _ = set (Default NONE) | |
3184 | end | |
3185 | - To make "lambda-splitting with aggressiveness a" the global default | |
3186 | (and allow per-source overriding): | |
3187 | local open Compiler.Control.LambdaSplitting in | |
3188 | val _ = set (Default (SOME a)) | |
3189 | end | |
3190 | ||
3191 | - To turn lambda-splitting off for a given ML souce file (say: a.sml) | |
3192 | write (in the respective .cm-file): | |
3193 | a.sml (lambdasplitting:off) | |
3194 | - To turn lambda-splitting for a.sml on with minimal aggressiveness: | |
3195 | a.sml (lambdasplitting:on) | |
3196 | - To turn lambda-splitting for a.sml on with aggressiveness <a> (where | |
3197 | <a> is a decimal non-negative integer): | |
3198 | a.sml (lambdasplitting:<a>) | |
3199 | - To turn lambda-splitting for a.sml on with maximal aggressiveness: | |
3200 | a.sml (lambdasplitting:infinity) | |
3201 | - To use the global default for a.sml: | |
3202 | a.sml (lambdasplitting:default) | |
3203 | or simply | |
3204 | a.sml | |
3205 | ||
3206 | ---------------------------------------------------------------------- | |
3207 | Name: Allen Leung | |
3208 | Date: 2001/05/04 01:57:00 EDT | |
3209 | Tag: leunga-20010504-sync | |
3210 | Description: | |
3211 | ||
3212 | MLRISC features. | |
3213 | ||
3214 | 1. Fix to CMPXCHG instructions. | |
3215 | 2. Changed RA interface to allow annotations in callbacks. | |
3216 | 3. Added a new method to the stream interface to allow annotations updates. | |
3217 | ||
3218 | ---------------------------------------------------------------------- | |
3219 | Name: Matthias Blume | |
3220 | Date: 2001/05/01 11:45:00 EDT | |
3221 | Tag: blume-20010501-pcedittmp | |
3222 | Description: | |
3223 | ||
3224 | Changed install.sh to use the current working directory instead of | |
3225 | /usr/tmp for a temporary file (pcedittmp). The previous choice | |
3226 | of /usr/tmp caused trouble with MacOS X because of file premission | |
3227 | problems. | |
3228 | ||
3229 | ---------------------------------------------------------------------- | |
3230 | Name: Matthias Blume | |
3231 | Date: 2001/04/20 11:10:00 EDT | |
3232 | Tag: blume-20010420-inMLflag | |
3233 | Description: | |
3234 | ||
3235 | - added vp_limitPtrMask to vproc-state.h | |
3236 | (for use by the raw-C-calls mechanism to implement proper interrupt | |
3237 | handling) | |
3238 | - made the ML compiler aware of various data-structure offsets so it | |
3239 | can generate code for accessing the vp_inML flag and vp_limitPtrMask | |
3240 | - tweaked mlriscGen.sml to have it emit interrupt-handling code for | |
3241 | raw C-calls | |
3242 | ||
3243 | ---------------------------------------------------------------------- | |
3244 | Name: Lal George | |
3245 | Date: 2001/04/20 09:15:28 EDT | |
3246 | Tag: george-20010420-macosX | |
3247 | Description: | |
3248 | ||
3249 | - Changes to port to Mac OS X; Darwin. | |
3250 | ||
3251 | - In the process I found that sqrt was broken on the PPC, because the | |
3252 | fsqrt instruction is not implemented. | |
3253 | ||
3254 | ---------------------------------------------------------------------- | |
3255 | Name: Matthias Blume | |
3256 | Date: 2001/04/18 12:45:00 EDT | |
3257 | Tag: blume-20010418-ccalls | |
3258 | Description: | |
3259 | ||
3260 | - fixed two off-by-4 errors in the x86-specific c-calls implementation | |
3261 | (this bug prevented structure arguments containing pointers from being | |
3262 | passed correctly) | |
3263 | - changed the raw-C-call code in mlriscGen.sml in such a way that | |
3264 | structure arguments are represented as a pointer to the beginning | |
3265 | of the structure (instead of having a series of synthesized arguments, | |
3266 | one for each structure member) | |
3267 | ||
3268 | - made makeml script's verbosity level configurable via environment | |
3269 | variable (MAKEML_VERBOSITY) | |
3270 | ||
3271 | - eliminated placeholder implementations for f32l, w16s, i16s, and f32s | |
3272 | in rawmem-x86.sml; we are now using the real thing | |
3273 | ||
3274 | ---------------------------------------------------------------------- | |
3275 | Name: Matthias Blume | |
3276 | Date: 2001/03/22 16:25:00 EST | |
3277 | Tag: blume-20010322-bootfiles | |
3278 | Description: | |
3279 | ||
3280 | Created a new set of bootfiles (for your automatic installation convenience). | |
3281 | ||
3282 | ---------------------------------------------------------------------- | |
3283 | Name: Matthias Blume | |
3284 | Date: 2001/03/22 15:10:00 EST | |
3285 | Tag: blume-20010322-rawmem-parcm | |
3286 | Description: | |
3287 | ||
3288 | 1. All "raw memory access" primitives for the new FFI are implemented now | |
3289 | (at least on the x86). | |
3290 | 2. Some further cleanup of CM's parallel make mechanism. | |
3291 | ||
3292 | ---------------------------------------------------------------------- | |
3293 | Name: Matthias Blume | |
3294 | Date: 2001/03/19 17:53:00 EST | |
3295 | Tag: blume-20010319-parallel | |
3296 | Description: | |
3297 | ||
3298 | Parallel make (using compile servers) now works again. | |
3299 | ||
3300 | To this end, CM.stabilize and CMB.make have been modified to work in | |
3301 | two passes when compile servers are attached: | |
3302 | 1. Compile everything, do not perform stabilization; this pass | |
3303 | uses compile servers | |
3304 | 2. Stabilize everything; this pass does not use compile servers | |
3305 | If there are no compile servers, the two passes are combined into one | |
3306 | (as before). Splitting the passes increases the inherent parallelism | |
3307 | in the dependency graph because the entire graph including all | |
3308 | libraries is available at the same time. This, in turn, improves | |
3309 | server utilization. The downside is that the master process will | |
3310 | have to do some extra work after compilation is done (because for | |
3311 | technical reasons it must re-read all the binfiles during stabilization). | |
3312 | ||
3313 | ---------------------------------------------------------------------- | |
3314 | Name: Matthias Blume | |
3315 | Date: 2001/03/16 12:22:00 EST | |
3316 | Tag: blume-20010316-bootfiles | |
3317 | Description: | |
3318 | ||
3319 | Created a new set of bootfiles (for your automatic installation convenience). | |
3320 | ||
3321 | ---------------------------------------------------------------------- | |
3322 | Name: Matthias Blume | |
3323 | Date: 2001/03/16 11:00:00 EST | |
3324 | Tag: blume-20010316-MLTREE-fixup | |
3325 | Description: | |
3326 | ||
3327 | This is a minor fixup for an (untagged) earlier commit by Allen. | |
3328 | (A file was missing). | |
3329 | ||
3330 | ---------------------------------------------------------------------- | |
3331 | Name: Allen Leung | |
3332 | Date: Mon Mar 5 18:54:57 EST 2001 | |
3333 | Tag: leunga-20010305-cut-support | |
3334 | ||
3335 | 1. New support for alternative control-flow in MLTREE. | |
3336 | Currently we support | |
3337 | ||
3338 | FLOW_TO(CALL ...., [k1,...,kn]) | |
3339 | ||
3340 | This is needed for 'cuts to' in C-- and try/handle-like constructs | |
3341 | in Moby | |
3342 | ||
3343 | New assembler flag "asm-show-cutsto" to turn on control-flow debugging. | |
3344 | ||
3345 | 2. Register Allocator | |
3346 | ||
3347 | Changes in interface [from Fermin, John] | |
3348 | ||
3349 | 3. Alpha 8-bit SLL support [Fermin] | |
3350 | ||
3351 | 4. All architectures | |
3352 | ||
3353 | A new module (ClusterExpandCopies) for expanding parallel copies. | |
3354 | ||
3355 | ---------------------------------------------------------------------- | |
3356 | Name: Allen Leung | |
3357 | Date: 2001/02/27 23:07:00 EST | |
3358 | Tag: leunga-20010227-minor-stuff | |
3359 | ||
3360 | 1. Alpha bug fix for CMOVNE | |
3361 | 2. Handle mltree COND(..,FCMP ...,...) | |
3362 | 3. Bug fix in simplifier | |
3363 | ||
3364 | ---------------------------------------------------------------------- | |
3365 | Name: Matthias Blume | |
3366 | Date: 2001/01/30 17:50:00 EST | |
3367 | Tag: blume-20010130-sync | |
3368 | Description: | |
3369 | ||
3370 | This is just a minor update to sync my devel branch with the main brach. | |
3371 | The only visible change is the addition of some README files. | |
3372 | ||
3373 | ---------------------------------------------------------------------- | |
3374 | Name: Matthias Blume | |
3375 | Date: 2001/01/12 23:30:00 JST | |
3376 | Tag: blume-20010112-bootfiles | |
3377 | Description: | |
3378 | ||
3379 | Made a new set of bootfiles that goes with the current state of the | |
3380 | repository. | |
3381 | ||
3382 | ---------------------------------------------------------------------- | |
3383 | Name: Matthias Blume | |
3384 | Date: 2001/01/12 21:20:00 JST | |
3385 | Tag: blume-20010112-sync | |
3386 | Description: | |
3387 | ||
3388 | I am just flushing out some minor changes that had accumulated in | |
3389 | my private branch in order to sync with the main tree. (This is | |
3390 | mainly because I had CVS trouble when trying to merge _into_ my | |
3391 | private branch.) | |
3392 | ||
3393 | Most people should be completely unaffected by this. | |
3394 | ||
3395 | ---------------------------------------------------------------------- | |
3396 | Name: Allen Leung | |
3397 | Date: Thu Jan 11 21:03:00 EST 2001 | |
3398 | Tag: leunga-20010111-labexp=mltree | |
3399 | Description: | |
3400 | ||
3401 | 1. Removed the type LabelExp and replace it by MLTree. | |
3402 | 2. Rewritten mltree-simplify with the pattern matcher tool. | |
3403 | 3. There were some bugs in alpha code generator which would break | |
3404 | 64-bit code generation. | |
3405 | 4. Redo the tools to generate code with the | |
3406 | 5. The CM files in MLRISC (and in src/system/smlnj/MLRISC) | |
3407 | are now generated by perl scripts. | |
3408 | ||
3409 | ---------------------------------------------------------------------- | |
3410 | Name: Matthias Blume | |
3411 | Date: 2001/01/10 21:55:00 JST | |
3412 | Tag: blume-20010110-rcc | |
3413 | Description: | |
3414 | ||
3415 | The RCC stuff now seems to work (but only on the x86). | |
3416 | This required hacking of the c-calls interface (and -implementation) in | |
3417 | MLRISC. | |
3418 | ||
3419 | Normal compiler users should be unaffected. | |
3420 | ||
3421 | ---------------------------------------------------------------------- | |
3422 | Name: Matthias Blume | |
3423 | Date: 2001/01/09 01:20:00 JST | |
3424 | Tag: blume-20010109-rcc | |
3425 | Description: | |
3426 | ||
3427 | This is a fairly big patch, flushing out a large number of pending | |
3428 | changes that I made to my development copy over the last couple of days. | |
3429 | ||
3430 | Of practical relevance at this moment is a workaround for a pickling | |
3431 | bug that Allen ran into the other day. The cause of the bug itself is | |
3432 | still unknown and it might be hard to fix it properly, but the | |
3433 | workaround has some merits of its own (namely somewhat reducing pickling | |
3434 | overhead for certain libraries). Therefore, I think this solution should | |
3435 | be satisfactory at this time. | |
3436 | ||
3437 | The rest of the changes (i.e., the vast majority) has to do with my | |
3438 | ongoing efforts of providing direct support for C function calls from | |
3439 | ML. At the moment there is a new primop "RAW_CCALL", typing magic | |
3440 | in types/cproto.sml (invoked from FLINT/trans/translate.sml), a new | |
3441 | case in the FLINT CPS datatype (RCC), changes to cps/convert.sml to | |
3442 | translate uses of RAW_CCALL into RCC, and changes to mlriscGen.sml to | |
3443 | handle RCC. | |
3444 | ||
3445 | The last part (the changes to mlriscGen.sml) are still known to be | |
3446 | wrong on the x86 and not implemented on all other architectures. But | |
3447 | the infrastructure is in place. I had to change a few functor | |
3448 | signatures in the backend to be able to route the CCalls interface | |
3449 | from MLRISC there, and I had to specialize the mltree type (on the | |
3450 | x86) to include the necessary extensions. (The extensions themselves | |
3451 | were already there and redy to go in MLRISC/x86). | |
3452 | ||
3453 | Everything should be very happy as soon as someone helps me with | |
3454 | mlriscGen.sml... | |
3455 | ||
3456 | In any case, nothing of this should matter to anyone as long as the | |
3457 | new primop is not being used (which is going to be the case unless you | |
3458 | find it where I hid it :). The rest of the compiler is completely | |
3459 | unaffected. | |
3460 | ||
3461 | ---------------------------------------------------------------------- | |
3462 | Name: Matthias Blume | |
3463 | Date: 2001/01/05 00:30:00 JST | |
3464 | Tag: blume-20010105-primops | |
3465 | Description: | |
3466 | ||
3467 | Added some experimental support for work that I am doing right now. | |
3468 | These changes mostly concern added primops, but there is also a new | |
3469 | experimental C library in the runtime system (but currently not enabled | |
3470 | anywhere except on Linux/X86). | |
3471 | ||
3472 | In the course of adding primops (and playing with them), I discovered that | |
3473 | Zhong's INL_PRIM hack (no type info for certain primops) was, in fact, badly | |
3474 | broken. (Zhong was very right he labeled this stuff as "major gross hack".) | |
3475 | To recover, I made type information in INL_PRIM mandatory and changed | |
3476 | prim.sml as well as built-in.sml accordingly. The InLine structure now | |
3477 | has complete, correct type information (i.e., no bottom types). | |
3478 | ||
3479 | Since all these changes mean that we need new binfiles, I also bumped the | |
3480 | version number to 110.32.1. | |
3481 | ||
3482 | ---------------------------------------------------------------------- | |
3483 | Name: Matthias Blume | |
3484 | Date: 2000/12/30 22:10:00 JST | |
3485 | Tag: blume-20001230-various | |
3486 | Description: | |
3487 | ||
3488 | Added proxy libraries for MLRISC and let MLRISC libraries refer | |
3489 | to each other using path anchors. (See CM manual for explanation.) | |
3490 | ||
3491 | Updated CM documentation. | |
3492 | ||
3493 | Fixed some bugs in CM. | |
3494 | ||
3495 | Implemented "proxy" libraries (= syntactic sugar for CM). | |
3496 | ||
3497 | Added "-quiet" option to makeml and changed runtime system accordingly. | |
3498 | ||
3499 | Added cleanup handler for exportML to reset timers and compiler stats. | |
3500 | ||
3501 | ---------------------------------------------------------------------- | |
3502 | Name: Lal George | |
3503 | Date: 2000/12/22 22:22:58 EST 2000 | |
3504 | Tag: Release_110_32 | |
3505 | Description: | |
3506 | ||
3507 | Infinite precision used throughout MLRISC. | |
3508 | see MLRISC/mltree/machine-int.sig | |
3509 | ||
3510 | ---------------------------------------------------------------------- | |
3511 | Name: Matthias Blume | |
3512 | Date: 2000/12/22 23:16:00 JST | |
3513 | Tag: blume-20001222-warn | |
3514 | Description: | |
3515 | ||
3516 | Corrected wording and formatting of some CM warning message which I | |
3517 | broke in my previous patch. | |
3518 | ||
3519 | ---------------------------------------------------------------------- | |
3520 | Name: Matthias Blume | |
3521 | Date: 2000/12/22 21:20:00 JST | |
3522 | Tag: blume-20001222-anchorenv | |
3523 | Description: | |
3524 | ||
3525 | Fixed CM's handling of anchor environments in connection with CMB.make. | |
3526 | ||
3527 | ---------------------------------------------------------------------- | |
3528 | Name: Matthias Blume | |
3529 | Date: 2000/12/22 13:15:00 JST | |
3530 | Tag: blume-20001222-cleanup | |
3531 | Description: | |
3532 | ||
3533 | Removed src/cm/ffi which does not (and did not) belong here. | |
3534 | ||
3535 | ---------------------------------------------------------------------- | |
3536 | Name: Matthias Blume | |
3537 | Date: 2000/12/21 23:55:00 JST | |
3538 | Tag: blume-20001221-exn | |
3539 | Description: | |
3540 | ||
3541 | Probably most important: CM no longer silently swallows all exceptions | |
3542 | in the compiler. | |
3543 | Plus: some other minor CM changes. For example, CM now reports some | |
3544 | sizes for generated binfiles (code, data, envpickle, lambdapickle). | |
3545 | ||
3546 | ---------------------------------------------------------------------- | |
3547 | Name: Matthias Blume | |
3548 | Date: 2000/12/15 00:01:05 JST | |
3549 | Tag: blume-20001215-dirtool | |
3550 | Description: | |
3551 | ||
3552 | - "dir" tool added. | |
3553 | - improvements and cleanup to Tools structure | |
3554 | - documentation updates | |
3555 | ||
3556 | ---------------------------------------------------------------------- | |
3557 | Name: Allen Leung | |
3558 | Date: Thu Dec 14 03:45:24 EST 2000 | |
3559 | Description: | |
3560 | Tag: leunga-20001214-int-inf | |
3561 | Description: | |
3562 | ||
3563 | In IntInf, added these standard functions, which are missing from our | |
3564 | implementation: | |
3565 | ||
3566 | andb : int * int -> int | |
3567 | xorb : int * int -> int | |
3568 | orb : int * int -> int | |
3569 | notb : int -> int | |
3570 | << : int * word -> int | |
3571 | ~>> : int * word -> int | |
3572 | ||
3573 | Not tested, I hope they are correct. | |
3574 | ||
3575 | ---------------------------------------------------------------------- | |
3576 | Name: Allen Leung | |
3577 | Date: Fri Dec 8 19:23:26 EST 2000 | |
3578 | Description: | |
3579 | Tag: leunga-20001208-nowhere | |
3580 | Description: | |
3581 | ||
3582 | Slight improvements to the 'nowhere' tool to handle OR-patterns, | |
3583 | to generate better error messages etc. Plus a brief manual. | |
3584 | ||
3585 | ---------------------------------------------------------------------- | |
3586 | Name: Lal George | |
3587 | Date: 2000/12/08 09:54:02 EST 2000 | |
3588 | Tag: Release_110_31 | |
3589 | Description: | |
3590 | ||
3591 | - Version 110.31 | |
3592 | ---------------------------------------------------------------------- | |
3593 | Name: Allen Leung | |
3594 | Date: Thu Dec 7 22:01:04 EST 2000 | |
3595 | Tag: leunga-20001207-cell-monster-hack | |
3596 | Description: | |
3597 | ||
3598 | Major MLRISC internal changes. Affect all clients. | |
3599 | Summary: | |
3600 | ||
3601 | 1. Type CELLS.cell = int is now replaced by a datatype. | |
3602 | As a result, the old regmap is now gone. Almost all interfaces | |
3603 | in MLRISC change as a consequence. | |
3604 | ||
3605 | 2. A new brand version of machine description tool (v3.0) that generates | |
3606 | modules expecting the new interface. The old version is removed. | |
3607 | ||
3608 | 3. The RA interface has been further abstracted into two new functors. | |
3609 | RISC_RA and X86RA. These functors have much simpler interfaces. | |
3610 | [See also directory MLRISC/demo.] | |
3611 | ||
3612 | 4. Some other new source->source code generation tools are available: | |
3613 | ||
3614 | a. MLRISC/Tools/RewriteGen -- generate rewriters from rules. | |
3615 | b. MLRISC/Tools/WhereGen -- expands conditional pattern matching rules. | |
3616 | I use this tool to generate the peephole optimizers---with the new | |
3617 | cell type changes, peephole rules are becoming difficult to write | |
3618 | without conditional pattern matching. | |
3619 | ||
3620 | 5. More Intmap -> IntHashTable change. Previous changes by Matthias didn't | |
3621 | cover the entire MLRISC source tree so many things broke. | |
3622 |