13 |
Description: |
Description: |
14 |
|
|
15 |
---------------------------------------------------------------------- |
---------------------------------------------------------------------- |
16 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
17 |
|
Date: 2004/05/11 14:35:00 CDT |
18 |
|
Tag: blume-20040511-win32sock |
19 |
|
Description: |
20 |
|
|
21 |
|
Added previously missing support for many socket-related functions |
22 |
|
under win32. Thanks to David Hansel <hansel@reactive-systems.com> |
23 |
|
for the voluminous patch! |
24 |
|
|
25 |
|
(I have not tested this patch under win32 yet.) |
26 |
|
|
27 |
|
Here is David's e-mail: |
28 |
|
|
29 |
|
Hi, |
30 |
|
|
31 |
|
Attached to this email you find a diff against sml/nj 110.45 |
32 |
|
that will enable socket support under Windows. |
33 |
|
|
34 |
|
To apply the patch (using unix or cygwin) |
35 |
|
1) gunzip runtime.diff.gz |
36 |
|
2) "cd" into "src/runtime" in the source tree of a fresh |
37 |
|
110.45 installation. |
38 |
|
3) patch -p 1 < [your/path/to]runtime.diff |
39 |
|
|
40 |
|
The code compiles fine but has NOT yet been extensively tested. |
41 |
|
I only ran a few tests for basic socket client functionality |
42 |
|
(which worked fine). Especially the functions that use ioctl |
43 |
|
are not tested at all and might not work (see below). |
44 |
|
|
45 |
|
I implemented this since we want to move to a newer version of sml/nj |
46 |
|
but need socket support in order to use it. This is the first time I |
47 |
|
even had a look at the sml/nj source, so please review my changes |
48 |
|
before making this part of the distribution! Here are a few issues |
49 |
|
that I think might be better for someone to solve who is more |
50 |
|
familiar with the sml/nj source (and socket programming): |
51 |
|
|
52 |
|
- getnetbyaddr.c and getnetbyname.c will raise a "not implemented" |
53 |
|
exception since I could not figure out what the windows equivalent |
54 |
|
of these functions is |
55 |
|
|
56 |
|
- In sockets-osdep.h there are a some #include statements that are |
57 |
|
only used in a few files that include sockets-osdep.h |
58 |
|
|
59 |
|
- In smlnj-sock-lib.c, function init_fn() calls WSAStartup() but |
60 |
|
does not process its return value since I don't know how to |
61 |
|
report an error upwards. |
62 |
|
|
63 |
|
- It would probably be good to have a call to WSACleanup() when |
64 |
|
the library is unloaded (if there is such a possibility). |
65 |
|
Otherwise I think Windows will take care of this automatically |
66 |
|
when the process finishes. |
67 |
|
|
68 |
|
- I used ioctlsocket() as a replacement for ioctl() but I have |
69 |
|
no idea if that is actually the proper replacement on Windows. |
70 |
|
|
71 |
|
- All these issues are marked in the code by "FIXME" comments. |
72 |
|
|
73 |
|
We use sml/nj extensively in our products and are quite happy |
74 |
|
with it. I hope this contribution will help you. |
75 |
|
|
76 |
|
Keep up the good work! |
77 |
|
|
78 |
|
David |
79 |
|
|
80 |
|
---------------------------------------------------------------------- |
81 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
82 |
|
Date: 2004/05/11 14:20:00 CDT |
83 |
|
Tag: blume-20040511-installml |
84 |
|
Description: |
85 |
|
|
86 |
|
Fixed two bugs in installml script. (Thanks to Vesa A. Norrman for |
87 |
|
the patch.) |
88 |
|
|
89 |
|
---------------------------------------------------------------------- |
90 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
91 |
|
Date: 2004/05/11 14:05:00 CDT |
92 |
|
Tag: blume-20040511-nlffi-netbsd |
93 |
|
Description: |
94 |
|
|
95 |
|
Added support for nlffi under netbsd. (Thanks to Vesa A. Norrman for |
96 |
|
the patch.) |
97 |
|
|
98 |
|
---------------------------------------------------------------------- |
99 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
100 |
|
Date: 2004/05/11 12:05:00 CDT |
101 |
|
Tag: blume-20040511-exports |
102 |
|
Description: |
103 |
|
|
104 |
|
As per request by Adam Chlipala <adam@hcoop.net>, extended various |
105 |
|
export lists in compiler-related .cm-files. |
106 |
|
|
107 |
|
---------------------------------------------------------------------- |
108 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
109 |
|
Date: 2004/05/11 11:35:00 CDT |
110 |
|
Tag: blume-20040511-allsource |
111 |
|
Description: |
112 |
|
|
113 |
|
The installer now honors the "src-smlnj" target again, although its meaning |
114 |
|
has changed from "all sources required for the compiler" to "all sources |
115 |
|
the installer knows about". In other words, if you enable "src-smlnj" |
116 |
|
in the "targets" file, then the installer will pull in sources for |
117 |
|
everything. (Notice that this refers to source code only. Compiled |
118 |
|
code is still only installed for modules that were requested explicitly |
119 |
|
or which are required for other modules that were requested explicitly.) |
120 |
|
|
121 |
|
---------------------------------------------------------------------- |
122 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
123 |
|
Date: 2004/04/23 17:40:00 CDT |
124 |
|
Tag: blume-20040423-ieee-scan |
125 |
|
Description: |
126 |
|
|
127 |
|
Fixed IEEEReal.scan (and .fromString) so that if there is an overflow |
128 |
|
in the exponent calculation we get INF or ZERO (depending on the mantissa |
129 |
|
and the sign of the exponent). |
130 |
|
|
131 |
|
---------------------------------------------------------------------- |
132 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
133 |
|
Date: 2004/04/23 10:40:00 CDT |
134 |
|
Tag: blume-20040423-ml-build |
135 |
|
Description: |
136 |
|
|
137 |
|
The ml-build script now terminates with a non-0 status when something |
138 |
|
goes wrong. |
139 |
|
|
140 |
|
---------------------------------------------------------------------- |
141 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
142 |
|
Date: 2004/04/22 16:35:00 CDT |
143 |
|
Tag: blume-20040422-Option |
144 |
|
Description: |
145 |
|
|
146 |
|
Made exception Option to be the same as exception Option.Option |
147 |
|
(as it should be). |
148 |
|
|
149 |
|
---------------------------------------------------------------------- |
150 |
|
Name: Allen Leung (leunga (at) reservoir (dot) com) |
151 |
|
Date: 2004/03/19 14:40:00 EST |
152 |
|
Tag: leunga-20040319-cygwin-nlffi |
153 |
|
Description: |
154 |
|
|
155 |
|
Fixed the runtime so that ml-nlffi-lib runs on the cygwin version |
156 |
|
of SML/NJ. The problem is that |
157 |
|
|
158 |
|
lib = dlopen(NULL, ...) |
159 |
|
f = dlsym(lib, "malloc"); |
160 |
|
|
161 |
|
does not work on Windows unless we explicitly export symbols |
162 |
|
such as 'malloc' during linking. We fixed this by explicitly |
163 |
|
exporting the required symbols with the magic gcc incantation: |
164 |
|
|
165 |
|
-Wl,--export-all cygwin.def |
166 |
|
|
167 |
|
where cygwin.def is a file containing all the symbols that |
168 |
|
we wish to export. |
169 |
|
|
170 |
|
I suspect this is a Windows problem and we'll have to |
171 |
|
do the same (somehow with windows compilers) when |
172 |
|
we build the native win32 version with the system |
173 |
|
calls LoadLibrary/GetProcAddress. |
174 |
|
|
175 |
|
---------------------------------------------------------------------- |
176 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
177 |
|
Date: 2004/03/04 16:35:00 CST |
178 |
|
Tag: blume-20040304-intinf-fmt |
179 |
|
Description: |
180 |
|
|
181 |
|
Fixed problem with IntInf.fmt (sign would show up on the right instead |
182 |
|
of on the left for BIN, OCT, and HEX). |
183 |
|
|
184 |
|
---------------------------------------------------------------------- |
185 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
186 |
|
Date: 2004/03/04 11:25:00 CST |
187 |
|
Tag: blume-20040304-symlinks |
188 |
|
Description: |
189 |
|
|
190 |
|
Fixed problem with installer script (unix only) where bin/ml-yacc and |
191 |
|
friends pointed (via symlinks) to absolute locations instead of just |
192 |
|
.run-sml. This was reported by Vesa A Norrman. |
193 |
|
|
194 |
|
---------------------------------------------------------------------- |
195 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
196 |
|
Date: 2004/02/13 14:50:00 CST |
197 |
|
Tag: Release_110_45 |
198 |
|
Description: |
199 |
|
|
200 |
|
New working version (110.45). New bootfiles. |
201 |
|
|
202 |
|
---------------------------------------------------------------------- |
203 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
204 |
|
Date: 2004/01/26 15:15:15 CST |
205 |
|
Tag: blume-20040126-toplevel |
206 |
|
Description: |
207 |
|
|
208 |
|
Improved handling of exceptions at the interactive toplevel. |
209 |
|
|
210 |
|
---------------------------------------------------------------------- |
211 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
212 |
|
Date: 2004/01/26 11:25:00 |
213 |
|
Tag: blume-20040126-app |
214 |
|
Description: |
215 |
|
|
216 |
|
Type of top-level "app" corrected. |
217 |
|
Added code for setting vp_limitPtrMask to Win32-specific runtime. |
218 |
|
|
219 |
|
---------------------------------------------------------------------- |
220 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
221 |
|
Date: 2003/11/18 17:10 CST |
222 |
|
Tag: blume-20031118-basis-fiddle |
223 |
|
Description: |
224 |
|
|
225 |
|
- changed Timer interface to what might become the spec |
226 |
|
- POSIX_FLAGS -> BIT_FLAGS according to spec |
227 |
|
- some other minor discrepancies wrt. spec eliminated |
228 |
|
|
229 |
|
---------------------------------------------------------------------- |
230 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
231 |
|
Date: 2003/11/06 12:00:00 CST |
232 |
|
Tag: Release_110_44 |
233 |
|
Description: |
234 |
|
|
235 |
|
New working version (110.44). New bootfiles. |
236 |
|
|
237 |
|
---------------------------------------------------------------------- |
238 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
239 |
|
Date: 2003/11/04 11:50:00 CST |
240 |
|
Tag: blume-20031104-move-libraries |
241 |
|
Description: |
242 |
|
|
243 |
|
Eliminated the "dont_move_libraries" directive in config/targets. |
244 |
|
(The mechanism was broken and could not be fixed easily. Moreover, |
245 |
|
there does not seem to be any reason not to move all libraries into |
246 |
|
lib during installation. I originally implemented this directive as a |
247 |
|
backward-compatibility feature when I first introduced the new CM. |
248 |
|
Now that things have been stable for a long time and going back to the |
249 |
|
old CM is not an option, there is no reason to keep it around.) |
250 |
|
|
251 |
|
---------------------------------------------------------------------- |
252 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
253 |
|
Date: 2003/11/03 16:00:00 CST |
254 |
|
Tag: blume-20031103-installdir |
255 |
|
Description: |
256 |
|
|
257 |
|
Made installer honor INSTALLDIR variable again. (Thanks to Chris |
258 |
|
Richards for pointing out the problem and providing the solution.) |
259 |
|
|
260 |
|
---------------------------------------------------------------------- |
261 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
262 |
|
Date: 2003/10/01 17:05:00 CDT |
263 |
|
Tag: blume-20031001-lal-mlrisc |
264 |
|
Description: |
265 |
|
|
266 |
|
MLRISC bug fix from Lal. |
267 |
|
|
268 |
|
---------------------------------------------------------------------- |
269 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
270 |
|
Date: 2003/09/30 16:10:00 CDT |
271 |
|
Tag: blume-20030930-primio-bat |
272 |
|
Description: |
273 |
|
|
274 |
|
1. Added openVector, nullRd, and nullWr to PRIM_IO. |
275 |
|
2. Improved .bat files (for Win32 port) to make things work under Win95. |
276 |
|
(thanks to Aaron S. Hawley for this one) |
277 |
|
|
278 |
|
---------------------------------------------------------------------- |
279 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
280 |
|
Date: 2003/09/26 16:05:00 CDT |
281 |
|
Tag: blume-20030926-wrappriv |
282 |
|
Description: |
283 |
|
|
284 |
|
Added missing wrapper for privilege "primitive" in $smlnj/viscomp/core.cm. |
285 |
|
|
286 |
|
---------------------------------------------------------------------- |
287 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
288 |
|
Date: 2003/09/26 15:00:00 CDT |
289 |
|
Tag: blume-20030926-110_43_3 |
290 |
|
Description: |
291 |
|
|
292 |
|
- additional cleanup |
293 |
|
- version number bump, NEW BOOTFILES |
294 |
|
|
295 |
|
---------------------------------------------------------------------- |
296 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
297 |
|
Date: 2003/09/26 12:00:00 CDT |
298 |
|
Tag: blume-20030926-ppautoload |
299 |
|
Description: |
300 |
|
|
301 |
|
I modified the read-eval-print loop so that the autoloader gets |
302 |
|
invoked whenever the prettyprinter tries to look up a symbol that |
303 |
|
is not currently defined in the toplevel environment but which |
304 |
|
appears in CM's autoload registry. As a result, we see far fewer of |
305 |
|
those ?.Foo.Bar.xxx names in the prettyprinter's output. |
306 |
|
|
307 |
|
In addition to this I tried to clean up some pieces of the Basis |
308 |
|
implementation (e.g., Socket, Word8Array) in order to prevent other |
309 |
|
instances of these ?.Foo.Bar.xxx names from being printed. |
310 |
|
|
311 |
|
The mechanism that picks names for types still needs some work, though. |
312 |
|
(Right now it seems that if there is a type A.t which is defined to |
313 |
|
be B.u, but B is unavailable at toplevel, then A.t gets printed as |
314 |
|
"?.B.u" although the perhaps more sensible solution would be to use |
315 |
|
"A.t" in this case. In other words, the prettyprinter should follow |
316 |
|
a chain of DEFtycs not farther than there are corresponding toplevel |
317 |
|
names in the current environment.) |
318 |
|
|
319 |
|
---------------------------------------------------------------------- |
320 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
321 |
|
Date: 2003/09/24 16:31:00 CDT |
322 |
|
Tag: blume-20030924-installer |
323 |
|
Description: |
324 |
|
|
325 |
|
Another installer tweak: All the ML code for the installer is now |
326 |
|
compiled during CMB.make and put into a little library called |
327 |
|
$smlnj/installer.cm. The installation then simply invokes |
328 |
|
|
329 |
|
sml -m $smlnj/installer.cm |
330 |
|
|
331 |
|
and everything happens automagically. |
332 |
|
|
333 |
|
Win32: ML code senses value of environment variable SMLNJ_HOME. |
334 |
|
Unix: ML code senses values of environment variables ROOT, CONFIGDIR, |
335 |
|
and BINDIR. |
336 |
|
|
337 |
|
The new scheme guarantees that the ML code responsible for the installation |
338 |
|
is in sync with the APIs of the main system. Also, the installer is |
339 |
|
somewhat faster because the installer script is precompiled. |
340 |
|
|
341 |
|
---------------------------------------------------------------------- |
342 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
343 |
|
Date: 2003/09/24 15:35:00 CDT |
344 |
|
Tag: blume-20030924-synsock |
345 |
|
Description: |
346 |
|
|
347 |
|
Added a signature SYNCHRONOUS_SOCKET to basis.cm. This is like SOCKET |
348 |
|
but excludes all non-blocking operations. Defined SOCKET (in Basis) |
349 |
|
and CML_SOCKET in terms of SYNCHRONOUS_SOCKET. Removed superfluous |
350 |
|
implementations of non-blocking operations from CML's Socket |
351 |
|
structure. |
352 |
|
|
353 |
|
---------------------------------------------------------------------- |
354 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
355 |
|
Date: 2003/09/24 15:10:05 CDT |
356 |
|
Tag: blume-20030924-sockets |
357 |
|
Description: |
358 |
|
|
359 |
|
1. Fixed SOCKET API and implementation to match Basis spec. |
360 |
|
This required changing the internal representation of sockets to one |
361 |
|
that remembers (for each socket file descriptor) whether it is currently |
362 |
|
blocking or non-blocking. This state is maintained lazily (i.e., a system |
363 |
|
call is made only if the state actually needs to change). |
364 |
|
|
365 |
|
2. OS-specific details of sockets were moved into separate files, thus |
366 |
|
making it possible to unify the bulk of the socket implementations |
367 |
|
between Unix and Win32. |
368 |
|
|
369 |
|
3. CML's socket API changed accordingly. |
370 |
|
(Note that we need to remove non-blocking functions from this API |
371 |
|
since they are redundant in the case of CML!) |
372 |
|
|
373 |
|
4. CML's socket implementation now makes use of non-blocking functions |
374 |
|
provided by Basis, thus removing all OS-dependent code from this part |
375 |
|
of CML. |
376 |
|
|
377 |
|
5. Changed Real64.precision from 52 to 53. Minor cleanup in Real64 code. |
378 |
|
|
379 |
|
---------------------------------------------------------------------- |
380 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
381 |
|
Date: 2003/09/22 12:10:00 CDT |
382 |
|
Tag: blume-20030922-110_43_2 |
383 |
|
Description: |
384 |
|
|
385 |
|
Made a new interim version and bootfiles for developer's bootstrapping |
386 |
|
convenience. |
387 |
|
|
388 |
|
110.43.2 -- NEW BOOTFILES |
389 |
|
|
390 |
|
---------------------------------------------------------------------- |
391 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
392 |
|
Date: 2003/09/19 15:55:00 CDT |
393 |
|
Tag: blume-20030919-cmdir |
394 |
|
Description: |
395 |
|
|
396 |
|
1. new-install.sh -> install.sh |
397 |
|
2. changed default CM "metadata" directory name to ".cm" (instead of "CM") |
398 |
|
3. tweaked installer so that another name instead of .cm can be chosen |
399 |
|
at install time (by setting the CM_DIR_ARC environment variable |
400 |
|
during installation); once installation is complete, the name is |
401 |
|
fixed |
402 |
|
|
403 |
|
---------------------------------------------------------------------- |
404 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
405 |
|
Date: 2003/09/18 16:00:00 CDT |
406 |
|
Tag: blume-20030918-110_43_1 |
407 |
|
Description: |
408 |
|
|
409 |
|
Made a new interim version and bootfiles for developer's bootstrapping |
410 |
|
convenience. |
411 |
|
|
412 |
|
110.43.1 -- NEW BOOTFILES |
413 |
|
|
414 |
|
---------------------------------------------------------------------- |
415 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
416 |
|
Date: 2003/09/18 15:20:00 CDT |
417 |
|
Tag: blume-20030918-misc |
418 |
|
Description: |
419 |
|
|
420 |
|
1. Exported fractionsPerSecond etc. from TimeImp (but not from Time as |
421 |
|
this seems to be controversial at the moment) and used those in |
422 |
|
Posix.ProcEnv.times. |
423 |
|
|
424 |
|
2. Added Time.{from,to}Nanoseconds to Time. |
425 |
|
|
426 |
|
3. Improved Real.{from,to}LargeInt by avoiding needless calculations. |
427 |
|
For example, fromLargeInt never needs to look at more than 3 "big |
428 |
|
digits" to get its 53 bits of precision. |
429 |
|
|
430 |
|
---------------------------------------------------------------------- |
431 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
432 |
|
Date: 2003/09/17 16:30:00 CDT |
433 |
|
Tag: blume-20030917-real32-slices |
434 |
|
Description: |
435 |
|
|
436 |
|
Added an entry to the primitive environment |
437 |
|
(compiler/Semant/statenv/prim.sml) for int32->real64 conversion and |
438 |
|
added code to compiler/CodeGen/main/mlriscGen.sml to implement it. |
439 |
|
|
440 |
|
Removed some of the "magic" constants in real64.sml and replaced them |
441 |
|
with code that generates these values from their corresponding |
442 |
|
integer counterparts. |
443 |
|
|
444 |
|
Made all(?) the slice-related changes to the Basis and made everything |
445 |
|
compile again... |
446 |
|
|
447 |
|
---------------------------------------------------------------------- |
448 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
449 |
|
Date: 2003/09/15 17:45:00 CDT |
450 |
|
Tag: blume-20030915-rbase |
451 |
|
Description: |
452 |
|
|
453 |
|
Fixed bug in Real.fromLargeInt. |
454 |
|
|
455 |
|
---------------------------------------------------------------------- |
456 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
457 |
|
Date: 2003/09/13 18:11:00 CDT |
458 |
|
Tag: blume-20030913-libinstall |
459 |
|
Description: |
460 |
|
|
461 |
|
Minor bugfix in config/libinstall (set anchor with path to |
462 |
|
standalone tool after installing it, otherwise libraries that |
463 |
|
need ml-lex or ml-yacc won't compile the first time the installer |
464 |
|
runs). |
465 |
|
|
466 |
|
---------------------------------------------------------------------- |
467 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
468 |
|
Date: 2003/09/12 11:45:00 CDT |
469 |
|
Tag: blume-20030912-various |
470 |
|
Description: |
471 |
|
|
472 |
|
- fixed bug in Real.toLargeInt |
473 |
|
- fixed bug in Posix.ProcEnv.times |
474 |
|
- changed inputLine functions to return an option |
475 |
|
- minor installer improvements / bugfixes |
476 |
|
- changed default @SMLalloc parameter for x86/celeron to 64k |
477 |
|
|
478 |
|
---------------------------------------------------------------------- |
479 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
480 |
|
Date: 2003/09/09 22:00:00 CDT |
481 |
|
Tag: Release_110_43 |
482 |
|
Description: |
483 |
|
|
484 |
|
New working release 110.43. New bootfiles. |
485 |
|
|
486 |
|
---------------------------------------------------------------------- |
487 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
488 |
|
Date: 2003/09/09 19:20:00 CDT |
489 |
|
Tag: blume-20030909-installer |
490 |
|
Description: |
491 |
|
|
492 |
|
Rewrote large parts of config/install.sh in SML (config/libinstall.sml). |
493 |
|
Modified config/install.bat to take advantage of it. Also modified |
494 |
|
config/install.sh (and called it config/new-install.sh) to take advantage |
495 |
|
of it on Unix systems. (The SML code is (supposed to be) platform- |
496 |
|
independent.) |
497 |
|
|
498 |
|
The installer can now install everything under Win32 |
499 |
|
as well as under *nix as long as it compiles. |
500 |
|
|
501 |
|
Other changes: |
502 |
|
|
503 |
|
- made CML compile again under Win32 |
504 |
|
- made eXene compile under Win32 (by providing a fake structure UnixSock |
505 |
|
and by using OS.Process.getEnv instead of Posix.ProcEnv.getenv) |
506 |
|
- fixed a bug in nowhere: it assumed that type OS.Process.status is the |
507 |
|
same as type int; under Win32 it isn't |
508 |
|
- fixed some slice-related problems in the win32-specific parts of CML |
509 |
|
- added a functor argument "sameVol" to os-path-fn.sml in the Basis |
510 |
|
(under Win32, the volume name is case-insensitive, and the |
511 |
|
OS.Path code compares volume names for equality) |
512 |
|
|
513 |
|
---------------------------------------------------------------------- |
514 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
515 |
|
Date: 2003/09/08 11:55:00 CDT |
516 |
|
Tag: blume-20030908-fullpath |
517 |
|
Description: |
518 |
|
|
519 |
|
Made Win32 version of OS.FileSys.fullPath return current directory |
520 |
|
when given an empty string. This is what the spec says, and incidentally, |
521 |
|
CM depends on it. (CM otherwise goes into an infinite loop in certain |
522 |
|
cases when presented with the name of a non-existing .cm file.) |
523 |
|
|
524 |
|
---------------------------------------------------------------------- |
525 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
526 |
|
Date: 2003/09/04 16:30:00 CDT |
527 |
|
Tag: blume-20030905-slices-etc |
528 |
|
Description: |
529 |
|
|
530 |
|
1. Changed interface to vectors and arrays in Basis to match |
531 |
|
(draft) Basis spec. |
532 |
|
2. Added signatures and implementations of slices according to |
533 |
|
Basis spec. |
534 |
|
3. Edited source code throughout the system to make it compile again |
535 |
|
under 1. and 2. (In some cases code had to be added to have it |
536 |
|
match the new signatures.) |
537 |
|
4. MLRISC should be backward-compatible: the copies of the originals |
538 |
|
of files that needed to change under 3. were retained, the .cm files |
539 |
|
check the compiler version number and use old versions when |
540 |
|
appropriate. |
541 |
|
5. Changed type of OS.FileSys.readDir and Posix.FileSys.readdir to |
542 |
|
dirstream -> string option (in accordance with Basis spec). |
543 |
|
6. When generating code that counts lines, ml-lex used function |
544 |
|
CharVector.foldli, taking advantage of its old interface. |
545 |
|
This has been replaced with the corresponding code from |
546 |
|
CharVectorSlice. (html-lex must be re-lexed!) |
547 |
|
7. BitArray in smlnj-lib/Util has been extended/modified to match the |
548 |
|
new MONO_ARRAY signature. (Do we need BitArraySlice?) |
549 |
|
8. Removed temporary additions (fromInternal, toInternal) from the |
550 |
|
(now obsolete) IntInf in smlnj-lib/Util. |
551 |
|
9. Cleaned up structure Byte. |
552 |
|
10. Added localOffset, scan, and fromString to Date (according to spec). |
553 |
|
Cleaned/corrected implementation of Date. |
554 |
|
(Still need to check for correctness; implement better canonicalizeDate.) |
555 |
|
11. Added "scan" to signature IEEE_REAL. |
556 |
|
12. Some improvements to IntInf [in particular: efficiency-hack for |
557 |
|
mod and rem when second operand is 2 (for parity checks).] |
558 |
|
13. Changed representation of type Time.time, using a single IntInf.int |
559 |
|
value counting microseconds. This considerably simplified the |
560 |
|
implementation of structure Time. We now support negative time |
561 |
|
values; scan and fromString handle signs. |
562 |
|
14. Functor PrimIO now takes two additional arguments (VectorSlice and |
563 |
|
ArraySlice). |
564 |
|
|
565 |
|
---------------------------------------------------------------------- |
566 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
567 |
|
Date: 2003/08/28 17:00:00 CDT |
568 |
|
Tag: blume-20030828-intinf |
569 |
|
Description: |
570 |
|
|
571 |
|
This is a major update which comes with a version number bump |
572 |
|
(110.42.99 -- yes, we are really close to 110.43 :-), NEW BOOTFILES, |
573 |
|
and an implementation of IntInf in the Basis. |
574 |
|
|
575 |
|
There are a fairly large number of related changes and updates throughout |
576 |
|
the system: |
577 |
|
|
578 |
|
Basis: |
579 |
|
- Implemented IntInf. |
580 |
|
- Made LargeInt a projection of IntInf (by filtering through INTEGER). |
581 |
|
- Added some missing Real64 operations, most notably Real.toLargeInt. |
582 |
|
- Added FixedInt as a synonym for Int32. |
583 |
|
|
584 |
|
compiler: |
585 |
|
* Added support for a built-in intinf type. |
586 |
|
- literals |
587 |
|
- pattern matching |
588 |
|
- conversion shortcuts (Int32.fromLarge o Int.toLarge etc.) |
589 |
|
- overloading on literals and operations |
590 |
|
|
591 |
|
This required adding a primitive type intinf, some additional |
592 |
|
primops, and implementations for several non-trivial intinf |
593 |
|
operations in Core. (The intinf type is completely abstract |
594 |
|
to the compiler; all operations get delegated back to the Core.) |
595 |
|
|
596 |
|
* Intinf equality is handled by polyequal. However, the compiler |
597 |
|
does not print its usual warning in this case (since polyequal |
598 |
|
is the right thing to do there). |
599 |
|
|
600 |
|
* Improved the organization of structure InlineT. |
601 |
|
|
602 |
|
* A word about conversion primops: |
603 |
|
If conversions involving intinf do not cancel out during |
604 |
|
CPS contract, then the compiler must insert calls to Core functions. |
605 |
|
Since all core access must be resolved already during the FLINT |
606 |
|
translate phase, it would be too late a the time of CPS contract |
607 |
|
to add new Core calls. For this reason, conversion primops |
608 |
|
for intinf carry two arguments: 1. the numeric argument that |
609 |
|
they are supposed to convert, and 2. the Core function that |
610 |
|
can help with this conversion if necessary. If CPS contract |
611 |
|
eliminates a primop, then the associated Core function becomes |
612 |
|
dead and goes away. Intinf conversion primops that do not get |
613 |
|
eliminated by CPS contract get rewritten into calls of their |
614 |
|
core functions by a separate, new phase. |
615 |
|
|
616 |
|
interactive system: |
617 |
|
- Control.Print.intinfDepth controls max length of intinf constants |
618 |
|
being printed. (Analogous to Control.Print.stringDepth.) |
619 |
|
- Cleanup in printutil and pputil: got rid of unused stuff and |
620 |
|
duplicates; replaced some of the code with code that makes better |
621 |
|
use of library functionality. |
622 |
|
|
623 |
|
CM: |
624 |
|
Bugfix: parse-errors in init group (system/smlnj/init/init.cmi) |
625 |
|
are no longer silent. |
626 |
|
|
627 |
|
CKIT: |
628 |
|
Fixed mismatched uses of Int32 and LargeInt. I always decided |
629 |
|
in favor of LargeInt -- which is now the same as IntInf. |
630 |
|
CKIT-knowledgable people should check whether this is what's |
631 |
|
intended and otherwise change things back to using Int32 or |
632 |
|
FixedInt. |
633 |
|
|
634 |
|
Throughout the code: |
635 |
|
Started using IntInf.int literals and built-in operations |
636 |
|
(e.g., comparison with 0) where this seems appropriate. |
637 |
|
|
638 |
|
|
639 |
|
---------------------------------------------------------------------- |
640 |
|
Name: Dave MacQueen (dbm@cs.uchicago.edu) |
641 |
|
Date: 2003/08/13 11:36:00 CDT |
642 |
|
Tag: dbm-20030813-mcz-merge1 |
643 |
|
Description: |
644 |
|
|
645 |
|
Merging changes from the mcz-branch development branch into trunk. |
646 |
|
These changes involve replacement of the emulated old prettyprinter |
647 |
|
interface with direct use of the SML/NJ Lib PP library, and fixing |
648 |
|
of a couple of bugs (895, 1186) relating to error messages. A new |
649 |
|
prettyprinter for ast datatypes (Elaborator/print/ppast.{sig,sml}) |
650 |
|
has been added. |
651 |
|
|
652 |
|
---------------------------------------------------------------------- |
653 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
654 |
|
Date: 2003/08/11 15:45:00 CDT |
655 |
|
Tag: blume-20030811-windows |
656 |
|
Description: |
657 |
|
|
658 |
|
Version number bumped to 110.42.9. NEW BOOTFILES!!! |
659 |
|
|
660 |
|
http://smlnj.cs.uchicago.edu/dist/working/110.42.9/ |
661 |
|
|
662 |
|
This patch restores SML/NJ's ability to run under win32. There are a |
663 |
|
number of changes, including fixes for several bugs that had gone |
664 |
|
unnoticed until now: |
665 |
|
|
666 |
|
- uname "CYGWIN_NT*" is recognized as win32 (This is relevant only when |
667 |
|
trying to run the win32 version from within cygwin.) |
668 |
|
|
669 |
|
- There are a number of simple .bat scripts that substitute for their |
670 |
|
corresponding Unix shell-scripts. (See below.) |
671 |
|
|
672 |
|
- The internals of ml-build have been modified slightly. The main |
673 |
|
difference is that instead of calling ".link-sml" (or link-sml.bat) |
674 |
|
using OS.Process.system, the ML process delegates this task back |
675 |
|
to the script. Otherwise problems arise in mixed environments such |
676 |
|
as Cygwin where scripts look and work like Unix scripts, but |
677 |
|
where OS.Process.system cannot run them. |
678 |
|
|
679 |
|
- In CM, the srcpath pickler used native pathname syntax -- which |
680 |
|
is incorrect in the case of cross-compilation. The new pickle format |
681 |
|
is independent of platform-specific naming conventions. |
682 |
|
|
683 |
|
- Path configuration files (such as lib/pathconfig) can now choose |
684 |
|
between native and standard syntax. Placing a line of the form |
685 |
|
|
686 |
|
standard! |
687 |
|
|
688 |
|
into the file causes all subsequent paths to be interpreted using |
689 |
|
CM standard pathname syntax (= Unix conventions); a line |
690 |
|
|
691 |
|
native! |
692 |
|
|
693 |
|
switches back to native style. This was needed so that |
694 |
|
path config files can be written portably, see src/system/pathconfig. |
695 |
|
|
696 |
|
- Runtime system: |
697 |
|
|
698 |
|
- win32-filesys.c: get_file_time and set_file_time now |
699 |
|
access modification time, not creation time. |
700 |
|
|
701 |
|
- I/O code made aware of new array representation. |
702 |
|
|
703 |
|
- Bug fixes in X86.prim.masm. |
704 |
|
|
705 |
|
- src/system/makeml made aware of win32. (For use under cygwin |
706 |
|
and other Unix-environments for windows.) |
707 |
|
|
708 |
|
- In Basis, fixed off-by-one error in win32-io.sml (function vecF) |
709 |
|
which caused BinIO.inputAll to fail consistently. |
710 |
|
|
711 |
|
.bat scripts: |
712 |
|
|
713 |
|
Windows .bat scripts assume that SMLNJ_HOME is defined. |
714 |
|
|
715 |
|
- sml.bat, ml-yacc.bat, ml-lex.bat: Driver scripts for standalone |
716 |
|
applications (sml, ml-yacc, ml-lex). |
717 |
|
- ml-build.bat: analogous to ml-build. |
718 |
|
- config\install.bat: Analogous to config/install.sh. This requires |
719 |
|
that SMLNJ_HOME is set and that Microsoft Visual C is ready to use. |
720 |
|
(nmake etc. must be on the path, and vcvars32 must have been run.) |
721 |
|
Moreover, sources for ml-lex and ml-yacc need to exist under src, |
722 |
|
and the bootfile hierarchy must have been unpacked under |
723 |
|
sml.boot.x86-win32. |
724 |
|
The script is very primitive and does a poor job at error checking. |
725 |
|
It only installs the base system, ml-lex, and ml-yacc. No other |
726 |
|
libraries are being installed (i.e., you get only those that |
727 |
|
are part of the compiler.) |
728 |
|
- link-sml.bat: analogous to .link-sml, but not currently used |
729 |
|
|
730 |
|
Unrelated bug fixes: |
731 |
|
|
732 |
|
- ml-nlffigen now exports structures ST_* corresponding to incomplete |
733 |
|
types. |
734 |
|
- Added getDevice to PP/src/pp-debug-fn.sml. (Would not compile |
735 |
|
otherwise.) |
736 |
|
|
737 |
|
---------------------------------------------------------------------- |
738 |
|
Name: Dave MacQueen (macqueen@cs.uchicago.edu) |
739 |
|
Date: 2003/06/17 |
740 |
|
Tag: macqueen-20030617-bug895 |
741 |
|
Description: |
742 |
|
|
743 |
|
Modified compiler/Elaborator/print/pptype.sml to fix bug 895. |
744 |
|
Tag will be used for new development branch (mcz-branch) for |
745 |
|
use by MacQueen, (Lucasz) Zairek, and (George) Cao at uchicago. |
746 |
|
|
747 |
|
---------------------------------------------------------------------- |
748 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
749 |
|
Date: 2003/05/27 16:55:00 CDT |
750 |
|
Tag: blume-20030527-polyeq |
751 |
|
Description: |
752 |
|
|
753 |
|
Tried to eliminated most cases of polymorphic equality. |
754 |
|
|
755 |
|
---------------------------------------------------------------------- |
756 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
757 |
|
Date: 2003/05/21 17:45:00 CDT |
758 |
|
Tag: blume-20030517-complete |
759 |
|
Description: |
760 |
|
|
761 |
|
Two changes: |
762 |
|
|
763 |
|
1. Added a flag for controlling whether non-exhaustive bindings will |
764 |
|
be treated as errors (default is false). |
765 |
|
2. Cleaned up the *entire* source tree so that CMB.make goes through |
766 |
|
without a single non-exhaustive match- or bind warning. |
767 |
|
|
768 |
|
---------------------------------------------------------------------- |
769 |
|
Name: Matthias Blume (blume (at) tti - c (dot) org) |
770 |
|
Date: 2003/05/17 10:20:00 CDT |
771 |
|
Tag: blume-20030517-absyn |
772 |
|
Description: |
773 |
|
|
774 |
|
1. Added cases for IF, WHILE, ANDALSO, and ORELSE to Absyn. |
775 |
|
|
776 |
|
This mainly affects the quality of error messages. However, some |
777 |
|
of the code is now more straightforward than before. (Treatment of |
778 |
|
the above four constructs in translate.sml is much simpler than |
779 |
|
the "macro-expansion" that was going on before. Plus, the mach- |
780 |
|
compiler no longer gets invoked just to be able to compile an |
781 |
|
if-expression.) |
782 |
|
|
783 |
|
2. The ErrorMsg.Error exception is now caught and absorbed by the |
784 |
|
interactive loop. |
785 |
|
|
786 |
|
---------------------------------------------------------------------- |
787 |
|
Name: Allen Leung |
788 |
|
Date: 2003/05/16 13:05:00 CDT |
789 |
|
Tag: leunga-20030516-cygwin-runtime |
790 |
|
Description: |
791 |
|
|
792 |
|
Ported the runtime system to cygwin, which uses the unix |
793 |
|
x86-unix bin files. Missing/buggy features: |
794 |
|
|
795 |
|
o getnetbyname, getnetbyaddr: these functions seem to be missing in |
796 |
|
the Cygwin library. |
797 |
|
o Ctrl-C handling may be flaky. |
798 |
|
o Windows system calls and Windows I/O are not supported. |
799 |
|
|
800 |
|
A new set of binfiles is located at: |
801 |
|
|
802 |
|
http://www.dorsai.org/~leunga/boot.x86-unix.tgz |
803 |
|
|
804 |
|
This is only needed for bootstrapping the cygwin version of smlnj. |
805 |
|
Other x86 versions can use the existing binfiles. |
806 |
|
|
807 |
|
---------------------------------------------------------------------- |
808 |
|
Name: Matthias Blume |
809 |
|
Date: 2003/04/08 15:42:00 CDT |
810 |
|
Tag: blume-20030408-listpair |
811 |
|
Description: |
812 |
|
|
813 |
|
1. Added a target 'mlrisc' to installer. |
814 |
|
|
815 |
|
2. Added missing elements to structure ListPair. |
816 |
|
|
817 |
|
---------------------------------------------------------------------- |
818 |
|
Name: Allen Leung |
819 |
|
Date: 2003/01/07 10:40:00 EST |
820 |
|
Tag: leunga-20030107-int-rem |
821 |
|
Description: |
822 |
|
|
823 |
|
Fixed a bug in Int.rem(x,y) where y is a power of 2 on x86. |
824 |
|
The arguments to the SUBL instruction were swapped. |
825 |
|
|
826 |
|
---------------------------------------------------------------------- |
827 |
|
Name: Matthias Blume |
828 |
|
Date: 2002/12/12 16:25:00 EST |
829 |
|
Tag: blume-20021212-risc-ra |
830 |
|
Description: |
831 |
|
|
832 |
|
Fixed a serious bug in the rewrite code for FP spilling/reloading that |
833 |
|
sent the RA into an infinite loop when floating point registers get |
834 |
|
spilled. (Because of this bug, e.g., nucleic stopped compiling between |
835 |
|
110.37 and 110.38.) |
836 |
|
There was another set of potential problems related to the handling of |
837 |
|
MLRISC annotations (but those did not yet cause real problems, apparently). |
838 |
|
|
839 |
|
---------------------------------------------------------------------- |
840 |
|
Name: Matthias Blume |
841 |
|
Date: 2002/12/06 22:40:00 EST |
842 |
|
Tag: blume-20021206-cm-fileid |
843 |
|
Description: |
844 |
|
|
845 |
|
Added a call of SrcPath.sync at the beginning of Parse.parse (in CM). |
846 |
|
This fixes the problem of CM getting confused by files that suddenly |
847 |
|
change their identity (e.g., by getting unlinked and recreated by some |
848 |
|
text editor such as vi). There might be a better/cheaper/cleaner way |
849 |
|
of doing this, but for now this will have to do. |
850 |
|
|
851 |
|
---------------------------------------------------------------------- |
852 |
|
Name: Matthias Blume |
853 |
|
Date: 2002/10/28 09:50:00 EST |
854 |
|
Tag: blume-20021028-typecheck |
855 |
|
Description: |
856 |
|
|
857 |
|
Exported structure Typecheck from $smlnj/viscomp/core.cm. |
858 |
|
|
859 |
|
---------------------------------------------------------------------- |
860 |
|
Name: Matthias Blume |
861 |
|
Date: 2002/10/17 09:10:00 EDT |
862 |
|
Tag: Release_110_42 |
863 |
|
Description: |
864 |
|
|
865 |
|
In good old tradition, there has been a slight hiccup so that we have |
866 |
|
to patch 110.42 after the fact. The old release tag has been replaced |
867 |
|
(see below). |
868 |
|
|
869 |
|
The change solves a problem with two competing approaches the |
870 |
|
configuration problem regarding MacOS 10.1 vs. MacOS 10.2 which got in |
871 |
|
each other's way. |
872 |
|
|
873 |
|
This change only affects the runtime system code and the installer script. |
874 |
|
(No new bootfiles.) |
875 |
|
|
876 |
|
---------------------------------------------------------------------- |
877 |
|
Name: Matthias Blume |
878 |
|
Date: 2002/10/16 12:00:00 EDT |
879 |
|
Tag: Release_110_42_removed |
880 |
|
Description: |
881 |
|
|
882 |
|
New working release. New bootfiles. |
883 |
|
|
884 |
|
---------------------------------------------------------------------- |
885 |
|
Name: Matthias Blume |
886 |
|
Date: 2002/10/10 13:10:00 EDT |
887 |
|
Tag: blume-20021010-ppc-divs |
888 |
|
Description: |
889 |
|
|
890 |
|
The mltree operator DIVS must be implemented with an overflow check on |
891 |
|
the PPC because the hardware indicates divide-by-zero using "overflow" as |
892 |
|
well. |
893 |
|
|
894 |
|
---------------------------------------------------------------------- |
895 |
|
Name: Matthias Blume |
896 |
|
Date: 2002/07/23 11:45:00 |
897 |
|
Tag: blume-20020723-smlnj-home |
898 |
|
Description: |
899 |
|
|
900 |
|
Sml now senses the SMLNJ_HOME environment variable. If this is set, |
901 |
|
then the bin dir is assumed to be in $SMLNJ_HOME/bin and (unless |
902 |
|
CM_PATHCONFIG is also set), the path configuration file is assumed |
903 |
|
to be in $SMLNJ_HOME/lib/pathconfig. This way one can easily move |
904 |
|
the entire tree to some other place and everything will "just work". |
905 |
|
|
906 |
|
(Companion commands such as ml-build and ml-makedepend also sense this |
907 |
|
variable.) |
908 |
|
|
909 |
|
---------------------------------------------------------------------- |
910 |
|
Name: Matthias Blume |
911 |
|
Date: 2002/07/12 21:19:00 EDT |
912 |
|
Tag: blume-20020712-liveness |
913 |
|
Description: |
914 |
|
|
915 |
|
Exported two useful "step" functions from liveness module (MLRISC). |
916 |
|
|
917 |
|
---------------------------------------------------------------------- |
918 |
|
Name: Matthias Blume |
919 |
|
Date: 2002/07/05 16:00 EDT |
920 |
|
Tag: Release_110_41 |
921 |
|
Description: |
922 |
|
|
923 |
|
New working release. New bootfiles. |
924 |
|
|
925 |
|
---------------------------------------------------------------------- |
926 |
|
Name: Matthias Blume |
927 |
|
Date: 2002/07/05 10:25:00 EDT |
928 |
|
Tag: blume-20020705-btimp |
929 |
|
Description: |
930 |
|
|
931 |
|
Exported structure BTImp from $smlnj/viscomp/debugprof.cm so that |
932 |
|
other clients can set up backtracing support. |
933 |
|
|
934 |
|
---------------------------------------------------------------------- |
935 |
|
Name: Matthias Blume |
936 |
|
Date: 2002/06/25 17:23:00 EDT |
937 |
|
Tag: blume-20020625-fpmax |
938 |
|
Description: |
939 |
|
|
940 |
|
Fixed a bug in translation of INLMAX (and INLMIN) for the floating-point |
941 |
|
case. (The sense of the isNaN test was reversed -- which made min and |
942 |
|
max always return their first argument.) |
943 |
|
|
944 |
|
---------------------------------------------------------------------- |
945 |
|
Name: Matthias Blume |
946 |
|
Date: 2002/06/11 |
947 |
|
Tag: blume-20020611-unixpath |
948 |
|
Description: |
949 |
|
|
950 |
|
Back-ported OS.Path.{from,to}UnixPath from idlbasis-devel branch. |
951 |
|
|
952 |
|
---------------------------------------------------------------------- |
953 |
|
Name: Matthias Blume |
954 |
|
Date: 2002/06/10 16:35:00 EDT |
955 |
|
Tag: blume-20020610-ieeereal |
956 |
|
Description: |
957 |
|
|
958 |
|
I back-ported my implementation of IEEEReal.fromString from the |
959 |
|
idlbasis-devel branch so that we can test it. |
960 |
|
|
961 |
|
Another small change is that ppDec tries to give more information |
962 |
|
than just "<sig>" in the case of functors. However, this code is |
963 |
|
broken in some mysterious way if the functor's body's signature |
964 |
|
has not been declared by ascription but gets inferred from the |
965 |
|
implementation. This needs fixing... |
966 |
|
|
967 |
|
---------------------------------------------------------------------- |
968 |
|
Name: Matthias Blume |
969 |
|
Date: 2002/05/31 |
970 |
|
Tag: blume-20020531-btrace-mode |
971 |
|
Description: |
972 |
|
|
973 |
|
Resurrected SMLofNJ.Internals.BTrace.mode. (It accidentally fell by |
974 |
|
the wayside when I switched over to using Controls everywhere.) |
975 |
|
|
976 |
|
---------------------------------------------------------------------- |
977 |
|
Name: Lal George |
978 |
|
Date: 2002/05/23 12:21:40 EDT |
979 |
|
Tag: george-20020523-visual-labels |
980 |
|
Description: |
981 |
|
|
982 |
|
Labels are now displayed in the graphical output to make |
983 |
|
the fall-through and target blocks obvious. |
984 |
|
|
985 |
|
---------------------------------------------------------------------- |
986 |
|
Name: Matthias Blume |
987 |
|
Date: 2002/05/22 11:03:00 EDT |
988 |
|
Tag: blume-20020522-shrink |
989 |
|
Description: |
990 |
|
|
991 |
|
John tweaked yesterday's fix for 1131 to handle an out-of-memory |
992 |
|
situation that comes up when allocating huge arrays. |
993 |
|
|
994 |
|
---------------------------------------------------------------------- |
995 |
|
Name: Matthias Blume |
996 |
|
Date: 2002/05/21 16:00:00 EDT |
997 |
|
Tag: Release_110_40 |
998 |
|
Description: |
999 |
|
|
1000 |
|
New working release (110.40). New bootfiles. |
1001 |
|
|
1002 |
|
[Also: John Reppy fixed GC bug 1131.] |
1003 |
|
|
1004 |
|
---------------------------------------------------------------------- |
1005 |
|
Name: Matthias Blume |
1006 |
|
Date: 2002/05/21 12:35:00 EDT |
1007 |
|
Tag: blume-20020521-cmdoc |
1008 |
|
Description: |
1009 |
|
|
1010 |
|
CM documentation update. |
1011 |
|
|
1012 |
|
---------------------------------------------------------------------- |
1013 |
|
Name: Matthias Blume |
1014 |
|
Date: 2002/05/21 10:55:00 EDT |
1015 |
|
Tag: blume-20020521-misc |
1016 |
|
Description: |
1017 |
|
|
1018 |
|
- John tweaked runtime to be silent on heap export (except when |
1019 |
|
GC messages are on). |
1020 |
|
- I added a few more things (cross-compiling versions of CMB) to |
1021 |
|
config/preloads (as suggestions). |
1022 |
|
|
1023 |
|
---------------------------------------------------------------------- |
1024 |
|
Name: Matthias Blume |
1025 |
|
Date: 2002/05/20 22:25:00 EDT |
1026 |
|
Tag: blume-20020520-controls |
1027 |
|
Description: |
1028 |
|
|
1029 |
|
- Added ControlUtil structure to control-lib.cm. |
1030 |
|
- Use it throughout. |
1031 |
|
- Used Controls facility to define MLRISC controls (as opposed to |
1032 |
|
registering MLRISC control ref cells with Controls after the fact) |
1033 |
|
- Fixed messed-up controls priorities. |
1034 |
|
|
1035 |
|
* Removed again all the stuff from config/preloads that one wouldn't |
1036 |
|
be able to preload at the time the initial heap image is built. |
1037 |
|
(Many libraries, e.g., CML, do not exist yet at this time. The |
1038 |
|
only libraries that can be preloaded via config/preloads are those |
1039 |
|
that come bundled with the bootfiles.) |
1040 |
|
|
1041 |
|
---------------------------------------------------------------------- |
1042 |
|
Name: Matthias Blume |
1043 |
|
Date: 2002/05/20 10:59:00 EDT |
1044 |
|
Tag: blume-20020520-preloads |
1045 |
|
Description: |
1046 |
|
|
1047 |
|
Added a lot of commented-out suggestions for things to be included |
1048 |
|
in config/preloads. |
1049 |
|
|
1050 |
|
---------------------------------------------------------------------- |
1051 |
|
Name: Allen Leung |
1052 |
|
Date: 2002/05/18 14:20:00 EDT |
1053 |
|
Tag: leunga-20020518-mdl |
1054 |
|
Description: |
1055 |
|
|
1056 |
|
o Made the mdl tool stuff compile and run again. |
1057 |
|
o I've disabled all the stuff that depends on RTL specifications; they |
1058 |
|
are all badly broken anyway. |
1059 |
|
|
1060 |
|
---------------------------------------------------------------------- |
1061 |
|
Name: Matthias Blume |
1062 |
|
Date: 2002/05/17 16:49:00 EDT |
1063 |
|
Tag: blume-20020517-controls |
1064 |
|
Description: |
1065 |
|
|
1066 |
|
0. John Reppy made several modifications to the SML/NJ library. |
1067 |
|
In particular, there is a shiny new controls-lib.cm. |
1068 |
|
|
1069 |
|
1. Pushed new controls interface through compiler so that everything |
1070 |
|
compiles again. |
1071 |
|
|
1072 |
|
2. Added FormatComb and FORMAT_COMB to the CML version of the |
1073 |
|
SML/NJ library (so that CML compiles again). |
1074 |
|
|
1075 |
|
3. Modified init scripts because XXX_DEFAULT environment variables |
1076 |
|
are no longer with us. (Boot-time initialization is now done |
1077 |
|
using the same environment variables that are also used for |
1078 |
|
startup-time initialization of controls.) |
1079 |
|
|
1080 |
|
---------------------------------------------------------------------- |
1081 |
|
Name: Lal George |
1082 |
|
Date: 2002/05/15 09:20:10 EDT |
1083 |
|
Tag: george-20020515-pseudo-op-decls |
1084 |
|
Description: |
1085 |
|
|
1086 |
|
All pseudo-ops emitted before the first segment declaration |
1087 |
|
such as TEXT, DATA, and BSS directives are assumed to be global |
1088 |
|
declarations and are emitted first in the assembly file. This is |
1089 |
|
useful in a number of situations where one has pseudo-ops that are not |
1090 |
|
specific to any segment, and also works around the constraint that one |
1091 |
|
cannot have client pseudo-ops in the TEXT segment. |
1092 |
|
|
1093 |
|
Because no segment is associated with these declarations it is |
1094 |
|
an error to allocate any space or objects before the first segment |
1095 |
|
directive and an exception will be raised. However, we cannot make |
1096 |
|
this check for client pseudo-ops. |
1097 |
|
|
1098 |
|
These top level declarations are a field in the CFG graph_info. |
1099 |
|
In theory you can continue to add to this field after the CFG has been |
1100 |
|
built -- provided you know what you are doing;-) |
1101 |
|
|
1102 |
|
---------------------------------------------------------------------- |
1103 |
|
Name: Matthias Blume |
1104 |
|
Date: 2002/05/13 16:40:00 EDT |
1105 |
|
Tag: blume-20020513-pp-etc |
1106 |
|
Description: |
1107 |
|
|
1108 |
|
A few minor bugfixes: |
1109 |
|
|
1110 |
|
- Stopgap measure for bug recently reported by Elsa Gunter (ppDec). |
1111 |
|
(Bogus printouts for redefined bindings still occur. Compiler |
1112 |
|
bug should no longer occur now. We need to redo the prettyprinter |
1113 |
|
from scratch.) |
1114 |
|
|
1115 |
|
- CM pathname printer now also adds escape sequences for ( and ) |
1116 |
|
|
1117 |
|
- commend and docu fixes for ml-nlffi |
1118 |
|
|
1119 |
|
---------------------------------------------------------------------- |
1120 |
|
Name: Matthias Blume |
1121 |
|
Date: 2002/05/10 16:40:00 EDT |
1122 |
|
Tag: blume-20020510-erg-textio |
1123 |
|
Description: |
1124 |
|
|
1125 |
|
Applied the following bugfix provided by Emden Gansner: |
1126 |
|
|
1127 |
|
Output is corrupted when outputSubstr is used rather than output. |
1128 |
|
|
1129 |
|
The problem occurs when a substring |
1130 |
|
|
1131 |
|
ss = (s, dataStart, dataLen) |
1132 |
|
|
1133 |
|
where dataStart > 0, fills a stream buffer with avail bytes left. |
1134 |
|
avail bytes of s, starting at index dataStart, are copied into the |
1135 |
|
buffer, the buffer is flushed, and then the remaining dataLen-avail |
1136 |
|
bytes of ss are copied into the beginning of the buffer. Instead of |
1137 |
|
starting this copy at index dataStart+avail in s, the current code |
1138 |
|
starts the copy at index avail. |
1139 |
|
|
1140 |
|
Fix: |
1141 |
|
In text-io-fn.sml, change line 695 from |
1142 |
|
val needsFlush = copyVec(v, avail, dataLen-avail, buf, 0) |
1143 |
|
to |
1144 |
|
val needsFlush = copyVec(v, dataStart+avail, dataLen-avail, buf, 0) |
1145 |
|
|
1146 |
|
---------------------------------------------------------------------- |
1147 |
|
Name: Matthias Blume |
1148 |
|
Date: 2002/04/12 13:55:00 EDT |
1149 |
|
Tag: blume-20020412-assyntax |
1150 |
|
Description: |
1151 |
|
|
1152 |
|
1. Grabbed newer assyntax.h from the XFree86 project. |
1153 |
|
2. Fiddled with how to compile X86.prim.asm without warnings. |
1154 |
|
3. (Very) Minor cleanup in CM. |
1155 |
|
|
1156 |
|
---------------------------------------------------------------------- |
1157 |
|
Name: Matthias Blume |
1158 |
|
Date: 2002/04/01 (no joke!) 17:07:00 EST |
1159 |
|
Tag: blume-20020401-x86div |
1160 |
|
Description: |
1161 |
|
|
1162 |
|
Added full support for div/mod/rem/quot on the x86, using the machine |
1163 |
|
instruction's two results (without clumsily recomputing the remainder) |
1164 |
|
directly where appropriate. |
1165 |
|
|
1166 |
|
Some more extensive power-of-two support was added to the x86 instruction |
1167 |
|
selector (avoiding expensive divs, mods, and muls where they can be |
1168 |
|
replaced with cheaper shifts and masks). However, this sort of thing |
1169 |
|
ought to be done earlier, e.g., within the CPS optimizer so that |
1170 |
|
all architectures benefit from it. |
1171 |
|
|
1172 |
|
The compiler compiles to a fixed point, but changes might be somewhat |
1173 |
|
fragile nevertheless. Please, report any strange things that you might |
1174 |
|
see wrt. div/mod/quot/rem... |
1175 |
|
|
1176 |
|
---------------------------------------------------------------------- |
1177 |
|
Name: Matthias Blume |
1178 |
|
Date: 2002/03/29 17:22:00 |
1179 |
|
Tag: blume-20020329-div |
1180 |
|
Description: |
1181 |
|
|
1182 |
|
Fixed my broken div/mod logic. Unfortunately, this means that the |
1183 |
|
inline code for div/mod now has one more comparison than before. |
1184 |
|
Fast paths (quotient > 0 or remainder = 0) are not affected, though. |
1185 |
|
The problem was with quotient = 0, because that alone does not tell |
1186 |
|
us which way the rounding went. One then has to look at whether |
1187 |
|
remainder and divisor have the same sign... :( |
1188 |
|
|
1189 |
|
Anyway, I replaced the bootfiles with fresh ones... |
1190 |
|
|
1191 |
|
---------------------------------------------------------------------- |
1192 |
|
Name: Matthias Blume |
1193 |
|
Date: 2002/03/29 14:10:00 EST |
1194 |
|
Tag: blume-20020329-inlprims |
1195 |
|
Description: |
1196 |
|
|
1197 |
|
NEW BOOTFILES!!! Version number bumped to 110.39.3. |
1198 |
|
|
1199 |
|
Primops have changed. This means that the bin/boot-file formats have |
1200 |
|
changed as well. |
1201 |
|
|
1202 |
|
To make sure that there is no confusion, I made a new version. |
1203 |
|
|
1204 |
|
|
1205 |
|
CHANGES: |
1206 |
|
|
1207 |
|
* removed REMT from mltree (remainder should never overflow). |
1208 |
|
|
1209 |
|
* added primops to deal with divisions of all flavors to the frontend |
1210 |
|
|
1211 |
|
* handled these primops all the way through so they map to their respective |
1212 |
|
MLRISC support |
1213 |
|
|
1214 |
|
* used these primops in the implementation of Int, Int32, Word, Word32 |
1215 |
|
|
1216 |
|
* removed INLDIV, INLMOD, and INLREM as they are no longer necessary |
1217 |
|
|
1218 |
|
* parameterized INLMIN, INLMAX, and INLABS by a numkind |
1219 |
|
|
1220 |
|
* translate.sml now deals with all flavors of INL{MIN,MAX,ABS}, including |
1221 |
|
floating point |
1222 |
|
|
1223 |
|
* used INL{MIN,MAX,ABS} in the implementation of Int, Int32, Word, Word32, |
1224 |
|
and Real (but Real.abs maps to a separate floating-point-only primop) |
1225 |
|
|
1226 |
|
|
1227 |
|
TODO items: |
1228 |
|
|
1229 |
|
* Hacked Alpha32 instruction selection, disabling the selection of REMx |
1230 |
|
instructions because the machine instruction encoder cannot handle |
1231 |
|
them. (Hppa, PPC, and Sparc instruction selection did not handle |
1232 |
|
REM in the first place, and REM is supported by the x86 machine coder.) |
1233 |
|
|
1234 |
|
* Handle DIV and MOD with DIV_TO_NEGINF directly in the x86 instruction |
1235 |
|
selection phase. (The two can be streamlined because the hardware |
1236 |
|
delivers both quotient and remainder at the same time anyway.) |
1237 |
|
|
1238 |
|
* Think about what to do with "valOf(Int32.minInt) div ~1" and friends. |
1239 |
|
(Currently the behavior is inconsistent both across architectures and |
1240 |
|
wrt. the draft Basis spec.) |
1241 |
|
|
1242 |
|
* Word8 should eventually be handled natively, too. |
1243 |
|
|
1244 |
|
* There seems to be one serious bug in mltree-gen.sml. It appears, though, |
1245 |
|
as if there currently is no execution path that could trigger it in |
1246 |
|
SML/NJ. (The assumptions underlying functions arith and promotable do not |
1247 |
|
hold for things like multiplication and division.) |
1248 |
|
|
1249 |
|
---------------------------------------------------------------------- |
1250 |
|
Name: Matthias Blume |
1251 |
|
Date: 2002/03/27 16:27:00 EST |
1252 |
|
Tag: blume-20020327-mlrisc-divisions |
1253 |
|
Description: |
1254 |
|
|
1255 |
|
Added support for all four division operations (ML's div, mod, quot, |
1256 |
|
and rem) to MLRISC. In the course of doing so, I also rationalized |
1257 |
|
the naming (no more annoying switch-around of DIV and QUOT), by |
1258 |
|
parameterizing the operation by div_rounding_mode (which can be either |
1259 |
|
DIV_TO_ZERO or DIV_TO_NEGINF). |
1260 |
|
|
1261 |
|
The generic MLTreeGen functor takes care of compiling all four |
1262 |
|
operations down to only round-to-zero div. |
1263 |
|
|
1264 |
|
Missing pieces: |
1265 |
|
|
1266 |
|
* Doing something smarter than relying on MLTreeGen on architectures |
1267 |
|
like, e.g., the x86 where hardware division delivers both quotient and |
1268 |
|
remainder at the same time. With this, the implementation of the |
1269 |
|
round-to-neginf operations could be further streamlined. |
1270 |
|
|
1271 |
|
* Remove inlining support for div/mod/rem from the frontend and replace it |
1272 |
|
with primops that get carried through to the backend. Do this for all |
1273 |
|
int and word types. |
1274 |
|
|
1275 |
|
---------------------------------------------------------------------- |
1276 |
|
Name: Matthias Blume |
1277 |
|
Date: 2002/03/25 17:25:00 EST |
1278 |
|
Tag: blume-20020325-divmod |
1279 |
|
Description: |
1280 |
|
|
1281 |
|
I improved (hopefully without breaking them) the implementation of Int.div, |
1282 |
|
Int.mod, and Int.rem. For this, the code in translate.sml now takes |
1283 |
|
advantage of the following observations: |
1284 |
|
|
1285 |
|
Let q = x quot y r = x rem y |
1286 |
|
d = x div y m = x mod y |
1287 |
|
|
1288 |
|
where "quot" is the round-to-zero version of integer division that |
1289 |
|
hardware usually provides. Then we have: |
1290 |
|
|
1291 |
|
r = x - q * y where neither the * nor the - will overflow |
1292 |
|
d = if q >= 0 orelse x = q * y then q else q - 1 |
1293 |
|
where neither the * nor the - will overflow |
1294 |
|
m = if q >= 0 orelse r = 0 then r else r + y |
1295 |
|
where the + will not overflow |
1296 |
|
|
1297 |
|
This results in substantial simplification of the generated code. |
1298 |
|
The following table shows the number of CFG nodes and edges generated |
1299 |
|
for |
1300 |
|
fun f (x, y) = x OPER y |
1301 |
|
(* with OPER \in div, mod, quot, rem *) |
1302 |
|
|
1303 |
|
|
1304 |
|
OPER | nodes(old) | edges(old) | nodes(new) | edges(new) |
1305 |
|
-------------------------------------------------------- |
1306 |
|
div | 24 | 39 | 12 | 16 |
1307 |
|
mod | 41 | 71 | 12 | 16 |
1308 |
|
quot | 8 | 10 | 8 | 10 |
1309 |
|
rem | 10 | 14 | 8 | 10 |
1310 |
|
|
1311 |
|
|
1312 |
|
---------------------------------------------------------------------- |
1313 |
|
Name: Matthias Blume |
1314 |
|
Date: 2002/03/25 22:06:00 EST |
1315 |
|
Tag: blume-20020325-cprotobug |
1316 |
|
Description: |
1317 |
|
|
1318 |
|
Fixed a bug in cproto (c prototype decoder). |
1319 |
|
|
1320 |
|
---------------------------------------------------------------------- |
1321 |
|
Name: Matthias Blume |
1322 |
|
Date: 2002/03/25 16:00:00 EST |
1323 |
|
Tag: blume-20020325-raw-primops |
1324 |
|
Description: |
1325 |
|
|
1326 |
|
I did some cleanup to Allen's new primop code and |
1327 |
|
replaced yesterday's bootfiles with new ones. |
1328 |
|
(But they are stored in the same place.) |
1329 |
|
|
1330 |
|
---------------------------------------------------------------------- |
1331 |
|
Name: Matthias Blume |
1332 |
|
Date: 2002/03/24 22:40:00 EST |
1333 |
|
Tag: blume-20020324-bootfiles |
1334 |
|
Description: |
1335 |
|
|
1336 |
|
Made the bootfiles that Allen asked for. |
1337 |
|
|
1338 |
|
---------------------------------------------------------------------- |
1339 |
|
Name: Allen Leung |
1340 |
|
Date: 2002/03/23 15:50:00 EST |
1341 |
|
Tag: leunga-20020323-flint-cps-rcc-primops |
1342 |
|
Description: |
1343 |
|
|
1344 |
|
1. Changes to FLINT primops: |
1345 |
|
|
1346 |
|
(* make a call to a C-function; |
1347 |
|
* The primop carries C function prototype information and specifies |
1348 |
|
* which of its (ML-) arguments are floating point. C prototype |
1349 |
|
* information is for use by the backend, ML information is for |
1350 |
|
* use by the CPS converter. *) |
1351 |
|
| RAW_CCALL of { c_proto: CTypes.c_proto, |
1352 |
|
ml_args: ccall_type list, |
1353 |
|
ml_res_opt: ccall_type option, |
1354 |
|
reentrant : bool |
1355 |
|
} option |
1356 |
|
(* Allocate uninitialized storage on the heap. |
1357 |
|
* The record is meant to hold short-lived C objects, i.e., they |
1358 |
|
* are not ML pointers. With the tag, the representation is |
1359 |
|
* the same as RECORD with tag tag_raw32 (sz=4), or tag_fblock (sz=8) |
1360 |
|
*) |
1361 |
|
| RAW_RECORD of {tag:bool,sz:int} |
1362 |
|
and ccall_type = CCALL_INT32 | CCALL_REAL64 | CCALL_ML_PTR |
1363 |
|
|
1364 |
|
2. These CPS primops are now overloaded: |
1365 |
|
|
1366 |
|
rawload of {kind:numkind} |
1367 |
|
rawstore of {kind:numkind} |
1368 |
|
|
1369 |
|
The one argument form is: |
1370 |
|
|
1371 |
|
rawload {kind} address |
1372 |
|
|
1373 |
|
The two argument form is: |
1374 |
|
|
1375 |
|
rawload {kind} [ml object, byte-offset] |
1376 |
|
|
1377 |
|
3. RAW_CCALL/RCC now takes two extra arguments: |
1378 |
|
|
1379 |
|
a. The first is whether the C call is reentrant, i.e., whether |
1380 |
|
ML state should be saved and restored. |
1381 |
|
b. The second argument is a string argument specifying the name of |
1382 |
|
library and the C function. |
1383 |
|
|
1384 |
|
These things are currently not handled in the code generator, yet. |
1385 |
|
|
1386 |
|
4. In CProto, |
1387 |
|
|
1388 |
|
An encoding type of "bool" means "ml object" and is mapped into |
1389 |
|
C prototype of PTR. Note that "bool" is different than "string", |
1390 |
|
even though "string" is also mapped into PTR, because "bool" |
1391 |
|
is assigned an CPS type of BOGt, while "string" is assigned INT32t. |
1392 |
|
|
1393 |
|
5. Pickler/unpicker |
1394 |
|
|
1395 |
|
Changed to handle RAW_RECORD and newest RAW_CCALL |
1396 |
|
|
1397 |
|
6. MLRiscGen, |
1398 |
|
|
1399 |
|
1. Changed to handle the new rawload/rawstore/rawrecord operators. |
1400 |
|
2. Code for handling C Calls has been moved to a new module CPSCCalls, |
1401 |
|
in the file CodeGen/cpscompile/cps-c-calls.sml |
1402 |
|
|
1403 |
|
7. Added the conditional move operator |
1404 |
|
|
1405 |
|
condmove of branch |
1406 |
|
|
1407 |
|
to cps. Generation of this is still buggy so it is currently |
1408 |
|
disabled. |
1409 |
|
|
1410 |
|
---------------------------------------------------------------------- |
1411 |
|
Name: Lal George |
1412 |
|
Date: 2002/03/22 14:18:25 EST |
1413 |
|
Tag: george-20020322-cps-branch-prob |
1414 |
|
Description: |
1415 |
|
|
1416 |
|
Implemented the Ball-Larus branch prediction-heuristics, and |
1417 |
|
incorporated graphical viewers for control flow graphs. |
1418 |
|
|
1419 |
|
Ball-Larus Heuristics: |
1420 |
|
--------------------- |
1421 |
|
See the file compiler/CodeGen/cpscompile/cpsBranchProb.sml. |
1422 |
|
|
1423 |
|
By design it uses the Dempster-Shafer theory for combining |
1424 |
|
probabilities. For example, in the function: |
1425 |
|
|
1426 |
|
fun f(n,acc) = if n = 0 then acc else f(n-1, n*acc) |
1427 |
|
|
1428 |
|
the ball-larus heuristics predicts that the n=0 is unlikely |
1429 |
|
(OH-heuristic), and the 'then' branch is unlikely because of the |
1430 |
|
RH-heuristic -- giving the 'then' branch an even lower combined |
1431 |
|
probability using the Dempster-Shafer theory. |
1432 |
|
|
1433 |
|
Finally, John Reppy's loop analysis in MLRISC, further lowers the |
1434 |
|
probability of the 'then' branch because of the loop in the else |
1435 |
|
branch. |
1436 |
|
|
1437 |
|
|
1438 |
|
Graphical Viewing: |
1439 |
|
------------------ |
1440 |
|
I merely plugged in Allen's graphical viewers into the compiler. The |
1441 |
|
additional code is not much. At the top level, saying: |
1442 |
|
|
1443 |
|
Control.MLRISC.getFlag "cfg-graphical-view" := true; |
1444 |
|
|
1445 |
|
will display the graphical view of the control flow graph just before |
1446 |
|
back-patching. daVinci must be in your path for this to work. If |
1447 |
|
daVinci is not available, then the default viewer can be changed |
1448 |
|
using: |
1449 |
|
|
1450 |
|
Control.MLRISC.getString "viewer" |
1451 |
|
|
1452 |
|
which can be set to "dot" or "vcg" for the corresponding viewers. Of |
1453 |
|
course, these viewers must be in your path. |
1454 |
|
|
1455 |
|
The above will display the compilation unit at the level of clusters, |
1456 |
|
many of which are small, boring, and un-interesting. Also setting: |
1457 |
|
|
1458 |
|
Control.MLRISC.getInt "cfg-graphical-view_size" |
1459 |
|
|
1460 |
|
will display clusters that are larger than the value set by the above. |
1461 |
|
|
1462 |
|
|
1463 |
|
---------------------------------------------------------------------- |
1464 |
|
Name: Matthias Blume |
1465 |
|
Date: 2002/03/21 22:20:00 EST |
1466 |
|
Tag: blume-20020321-kmp-bugfix |
1467 |
|
Description: |
1468 |
|
|
1469 |
|
Changed the interface to the KMP routine in PreString and fixed |
1470 |
|
a minor bug in one place where it was used. |
1471 |
|
|
1472 |
|
---------------------------------------------------------------------- |
1473 |
|
Name: Allen Leung |
1474 |
|
Date: 2002/03/21 20:30:00 EST |
1475 |
|
Tag: leunga-20020321-cfg |
1476 |
|
Description: |
1477 |
|
|
1478 |
|
Fixed a potential problem in cfg edge splitting. |
1479 |
|
|
1480 |
|
---------------------------------------------------------------------- |
1481 |
|
Name: Allen Leung |
1482 |
|
Date: 2002/03/21 17:15:00 EST |
1483 |
|
Tag: leunga-20020321-x86-fp-cfg |
1484 |
|
Description: |
1485 |
|
|
1486 |
|
1. Recoded the buggy parts of x86-fp. |
1487 |
|
|
1488 |
|
a. All the block reordering code has been removed. |
1489 |
|
We now depend on the block placement phases to do this work. |
1490 |
|
|
1491 |
|
b. Critical edge splitting code has been simplified and moved into the |
1492 |
|
CFG modules, as where they belong. |
1493 |
|
|
1494 |
|
Both of these were quite buggy and complex. The code is now much, much |
1495 |
|
simpler. |
1496 |
|
|
1497 |
|
2. X86 backend. |
1498 |
|
|
1499 |
|
a. Added instructions for 64-bit support. Instruction selection for |
1500 |
|
64-bit has not been committed, however, since that |
1501 |
|
requires changes to MLTREE which haven't been approved by |
1502 |
|
Lal and John. |
1503 |
|
|
1504 |
|
b. Added support for FUCOMI and FUCOMIP when generating code for |
1505 |
|
PentiumPro and above. We only generate these instructions in |
1506 |
|
the fast-fp mode. |
1507 |
|
|
1508 |
|
c. Added cases for JP and JNP in X86FreqProps. |
1509 |
|
|
1510 |
|
3. CFG |
1511 |
|
|
1512 |
|
CFG now has a bunch of methods for edge splitting and merging. |
1513 |
|
|
1514 |
|
4. Machine description. |
1515 |
|
|
1516 |
|
John's simplification of MLTREE_BASIS.fcond broke a few machine |
1517 |
|
description things: |
1518 |
|
|
1519 |
|
rtl-build.{sig,sml} and hppa.mdl fixed. |
1520 |
|
|
1521 |
|
NOTE: the machine description stuff in the repository is still broken. |
1522 |
|
Again, I can't put my fixes in because that involves |
1523 |
|
changes to MLTREE. |
1524 |
|
|
1525 |
|
---------------------------------------------------------------------- |
1526 |
|
Name: Matthias Blume |
1527 |
|
Date: 2002/03/20 15:55:00 EST |
1528 |
|
Tag: blume-20020320-kmp |
1529 |
|
Description: |
1530 |
|
|
1531 |
|
Implemented Knuth-Morris-Pratt string matching in PreString and used |
1532 |
|
it for String.isSubstring, Substring.isSubstring, and |
1533 |
|
Substring.position. |
1534 |
|
|
1535 |
|
(Might need some stress-testing. Simple examples worked fine.) |
1536 |
|
|
1537 |
|
---------------------------------------------------------------------- |
1538 |
|
Name: Matthias Blume |
1539 |
|
Date: 2002/03/19 16:37:00 EST |
1540 |
|
Tag: blume-20020319-witnesses |
1541 |
|
Description: |
1542 |
|
|
1543 |
|
Added a structure C.W and functions convert/Ptr.convert to ml-nlffi-lib. |
1544 |
|
|
1545 |
|
This implements a generic mechanism for changing constness qualifiers |
1546 |
|
anywhere within big C types without resorting to outright "casts". |
1547 |
|
(So far, functions such as C.rw/C.ro or C.Ptr.rw/C.Ptr.ro only let you |
1548 |
|
modify the constness at the outermost level.) |
1549 |
|
The implementation of "convert" is based on the idea of "witness" |
1550 |
|
values -- values that are not used by the operation but whose types |
1551 |
|
"testify" to their applicability. On the implementation side, "convert" |
1552 |
|
is simply a projection (returning its second curried argument). With |
1553 |
|
cross-module inlining, it should not result in any machine code being |
1554 |
|
generated. |
1555 |
|
|
1556 |
|
---------------------------------------------------------------------- |
1557 |
|
Name: Matthias Blume |
1558 |
|
Date: 2002/03/15 16:40:00 EST |
1559 |
|
Tag: blume-20020315-basis |
1560 |
|
Description: |
1561 |
|
|
1562 |
|
Provided (preliminary?) implementations for |
1563 |
|
|
1564 |
|
{String,Substring}.{concatWith,isSuffix,isSubstring} |
1565 |
|
|
1566 |
|
and |
1567 |
|
|
1568 |
|
Substring.full |
1569 |
|
|
1570 |
|
Those are in the Basis spec but they were missing in SML/NJ. |
1571 |
|
|
1572 |
|
---------------------------------------------------------------------- |
1573 |
|
Name: Matthias Blume |
1574 |
|
Date: 2002/03/14 21:30:00 EST |
1575 |
|
Tag: blume-20020314-controls |
1576 |
|
Description: |
1577 |
|
|
1578 |
|
Controls: |
1579 |
|
--------- |
1580 |
|
|
1581 |
|
1. Factored out the recently-added Controls : CONTROLS stuff and put |
1582 |
|
it into its own library $/controls-lib.cm. The source tree for |
1583 |
|
this is under src/smlnj-lib/Controls. |
1584 |
|
|
1585 |
|
2. Changed the names of types and functions in this interface, so they |
1586 |
|
make a bit more "sense": |
1587 |
|
|
1588 |
|
module -> registry |
1589 |
|
'a registry -> 'a group |
1590 |
|
|
1591 |
|
3. The interface now deals in ref cells only. The getter/setter interface |
1592 |
|
is (mostly) gone. |
1593 |
|
|
1594 |
|
4. Added a function that lets one register an already-existing ref cell. |
1595 |
|
|
1596 |
|
5. Made the corresponding modifications to the rest of the code so that |
1597 |
|
everything compiles again. |
1598 |
|
|
1599 |
|
6. Changed the implementation of Controls.MLRISC back to something closer |
1600 |
|
to the original. In particular, this module (and therefore MLRISC) |
1601 |
|
does not depend on Controls. There now is some link-time code in |
1602 |
|
int-sys.sml that registers the MLRISC controls with the Controls |
1603 |
|
module. |
1604 |
|
|
1605 |
|
CM: |
1606 |
|
--- |
1607 |
|
|
1608 |
|
* One can now specify the lambda-split aggressiveness in init.cmi. |
1609 |
|
|
1610 |
|
---------------------------------------------------------------------- |
1611 |
|
Name: Allen Leung |
1612 |
|
Date: 2002/03/13 17:30:00 EST |
1613 |
|
Tag: leunga-20020313-x86-fp-unary |
1614 |
|
Description: |
1615 |
|
|
1616 |
|
Bug fix for: |
1617 |
|
|
1618 |
|
> leunga@weaselbane:~/Yale/tmp/sml-dist{21} bin/sml |
1619 |
|
> Standard ML of New Jersey v110.39.1 [FLINT v1.5], March 08, 2002 |
1620 |
|
> - fun f(x,(y,z)) = Real.~ y; |
1621 |
|
> [autoloading] |
1622 |
|
> [autoloading done] |
1623 |
|
> fchsl (%eax), 184(%esp) |
1624 |
|
> Error: MLRisc bug: X86MCEmitter.emitInstr |
1625 |
|
> |
1626 |
|
> uncaught exception Error |
1627 |
|
> raised at: ../MLRISC/control/mlriscErrormsg.sml:16.14-16.19 |
1628 |
|
|
1629 |
|
The problem was that the code generator did not generate any fp registers |
1630 |
|
in this case, and the ra didn't know that it needed to run the X86FP phase to |
1631 |
|
translate the pseudo fp instruction. This only happened with unary fp |
1632 |
|
operators in certain situations. |
1633 |
|
|
1634 |
|
---------------------------------------------------------------------- |
1635 |
|
Name: Matthias Blume |
1636 |
|
Date: 2002/03/13 14:00:00 EST |
1637 |
|
Tag: blume-20020313-overload-etc |
1638 |
|
Description: |
1639 |
|
|
1640 |
|
1. Added _overload as a synonym for overload for backward compatibility. |
1641 |
|
(Control.overloadKW must be true for either version to be accepted.) |
1642 |
|
|
1643 |
|
2. Fixed bug in install script that caused more things to be installed |
1644 |
|
than what was requested in config/targets. |
1645 |
|
|
1646 |
|
3. Made CM aware of the (_)overload construct so that autoloading |
1647 |
|
works. |
1648 |
|
|
1649 |
|
---------------------------------------------------------------------- |
1650 |
|
Name: Matthias Blume |
1651 |
|
Date: 2002/03/12 22:03:00 EST |
1652 |
|
Tag: blume-20020312-url |
1653 |
|
Description: |
1654 |
|
|
1655 |
|
Forgot to update BOOT and srcarchiveurl. |
1656 |
|
|
1657 |
|
---------------------------------------------------------------------- |
1658 |
|
Name: Matthias Blume |
1659 |
|
Date: 2002/03/12 17:30:00 EST |
1660 |
|
Tag: blume-20020312-version110392 |
1661 |
|
Description: |
1662 |
|
|
1663 |
|
Yet another version number bump (because of small changes to the |
1664 |
|
binfile format). Version number is now 110.39.2. NEW BOOTFILES! |
1665 |
|
|
1666 |
|
Changes: |
1667 |
|
|
1668 |
|
The new pid generation scheme described a few weeks ago was overly |
1669 |
|
complicated. I implemented a new mechanism that is simpler and |
1670 |
|
provides a bit more "stability": Once CM has seen a compilation |
1671 |
|
unit, it keeps its identity constant (as long as you do not delete |
1672 |
|
those crucial CM/GUID/* files). This means that when you change |
1673 |
|
an interface, compile, then go back to the old interface, and |
1674 |
|
compile again, you arrive at the original pid. |
1675 |
|
|
1676 |
|
There now also is a mechanism that instructs CM to use the plain |
1677 |
|
environment hash as a module's pid (effectively making its GUID |
1678 |
|
the empty string). For this, "noguid" must be specified as an |
1679 |
|
option to the .sml file in question within its .cm file. |
1680 |
|
This is most useful for code that is being generated by tools such |
1681 |
|
as ml-nlffigen (because during development programmers tend to |
1682 |
|
erase the tool's entire output directory tree including CM's cached |
1683 |
|
GUIDs). "noguid" is somewhat dangerous (since it can be used to locally |
1684 |
|
revert to the old, broken behavior of SML/NJ, but in specific cases |
1685 |
|
where there is no danger of interface confusion, its use is ok |
1686 |
|
(I think). |
1687 |
|
|
1688 |
|
ml-nlffigen by default generates "noguid" annotations. They can be |
1689 |
|
turned off by specifying -guid in its command line. |
1690 |
|
|
1691 |
|
---------------------------------------------------------------------- |
1692 |
|
Name: Lal George |
1693 |
|
Date: 2002/03/12 12 14:42:36 EST |
1694 |
|
Tag: george-20020312-frequency-computation |
1695 |
|
Description: |
1696 |
|
|
1697 |
|
Integrated jump chaining and static block frequency into the |
1698 |
|
compiler. More details and numbers later. |
1699 |
|
|
1700 |
|
---------------------------------------------------------------------- |
1701 |
|
Name: Lal George |
1702 |
|
Date: 2002/03/11 11 22:38:53 EST |
1703 |
|
Tag: george-20020311-jump-chain-elim |
1704 |
|
Description: |
1705 |
|
|
1706 |
|
Tested the jump chain elimination on all architectures (except the |
1707 |
|
hppa). This is on by default right now and is profitable for the |
1708 |
|
alpha and x86, however, it may not be profitable for the sparc and ppc |
1709 |
|
when compiling the compiler. |
1710 |
|
|
1711 |
|
The gc test will typically jump to a label at the end of the cluster, |
1712 |
|
where there is another jump to an external cluster containing the actual |
1713 |
|
code to invoke gc. This is to allow factoring of common gc invocation |
1714 |
|
sequences. That is to say, we generate: |
1715 |
|
|
1716 |
|
f: |
1717 |
|
testgc |
1718 |
|
ja L1 % jump if above to L1 |
1719 |
|
|
1720 |
|
L1: |
1721 |
|
jmp L2 |
1722 |
|
|
1723 |
|
|
1724 |
|
After jump chain elimination the 'ja L1' instructions is converted to |
1725 |
|
'ja L2'. On the sparc and ppc, many of the 'ja L2' instructions may end |
1726 |
|
up being implemented in their long form (if L2 is far away) using: |
1727 |
|
|
1728 |
|
jbe L3 % jump if below or equal to L3 |
1729 |
|
jmp L2 |
1730 |
|
L3: |
1731 |
|
... |
1732 |
|
|
1733 |
|
|
1734 |
|
For large compilation units L2 may be far away. |
1735 |
|
|
1736 |
|
|
1737 |
|
---------------------------------------------------------------------- |
1738 |
|
Name: Matthias Blume |
1739 |
|
Date: 2002/03/11 13:30:00 EST |
1740 |
|
Tag: blume-20020311-mltreeeval |
1741 |
|
Description: |
1742 |
|
|
1743 |
|
A functor parameter was missing. |
1744 |
|
|
1745 |
|
---------------------------------------------------------------------- |
1746 |
|
Name: Allen Leung |
1747 |
|
Date: 2002/03/11 10:30:00 EST |
1748 |
|
Tag: leunga-20020311-runtime-string0 |
1749 |
|
Description: |
1750 |
|
|
1751 |
|
The representation of the empty string now points to a |
1752 |
|
legal null terminated C string instead of unit. It is now possible |
1753 |
|
to convert an ML string into C string with InlineT.CharVector.getData. |
1754 |
|
This compiles into one single machine instruction. |
1755 |
|
|
1756 |
|
---------------------------------------------------------------------- |
1757 |
|
Name: Allen Leung |
1758 |
|
Date: 2002/03/10 23:55:00 EST |
1759 |
|
Tag: leunga-20020310-x86-call |
1760 |
|
Description: |
1761 |
|
|
1762 |
|
Added machine generation for CALL instruction (relative displacement mode) |
1763 |
|
|
1764 |
|
---------------------------------------------------------------------- |
1765 |
|
Name: Matthias Blume |
1766 |
|
Date: 2002/03/08 16:05:00 |
1767 |
|
Tag: blume-20020308-entrypoints |
1768 |
|
Description: |
1769 |
|
|
1770 |
|
Version number bumped to 110.39.1. NEW BOOTFILES! |
1771 |
|
|
1772 |
|
Entrypoints: non-zero offset into a code object where execution should begin. |
1773 |
|
|
1774 |
|
- Added the notion of an entrypoint to CodeObj. |
1775 |
|
- Added reading/writing of entrypoint info to Binfile. |
1776 |
|
- Made runtime system bootloader aware of entrypoints. |
1777 |
|
- Use the address of the label of the first function given to mlriscGen |
1778 |
|
as the entrypoint. This address is currently always 0, but it will |
1779 |
|
not be 0 once we turn on block placement. |
1780 |
|
- Removed the linkage cluster code (which was The Other Way(tm) of dealing |
1781 |
|
with entry points) from mlriscGen. |
1782 |
|
|
1783 |
|
---------------------------------------------------------------------- |
1784 |
Name: Allen Leung |
Name: Allen Leung |
1785 |
Date: 2002/03/07 20:45:00 EST |
Date: 2002/03/07 20:45:00 EST |
1786 |
Tag: leunga-20020307-x86-cmov |
Tag: leunga-20020307-x86-cmov |