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