Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/trunk/NOTES/HISTORY
ViewVC logotype

Diff of /sml/trunk/NOTES/HISTORY

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1171, Fri Mar 22 20:41:43 2002 UTC revision 1652, Thu Oct 14 22:38:54 2004 UTC
# Line 13  Line 13 
13  Description:  Description:
14    
15  ----------------------------------------------------------------------  ----------------------------------------------------------------------
16    Name: Matthias Blume (blume (at) tti - c (dot) org)
17    Date: 2004/10/14 17:40:00 CDT
18    Tag: blume-20041014-tdp-core
19    Description:
20    
21    Snapshot of a significant overhaul of how the trace/debug/profile support
22    is hooked into the system (specifically: Core and SMLofNJ.Internals).
23    
24    ----------------------------------------------------------------------
25    Name: Matthias Blume (blume (at) tti - c (dot) org)
26    Date: 2004/10/13 16:34:00 CDT
27    Tag: blume-20041013-tdp
28    Description:
29    
30    Some rationalization of names:
31    
32       structure BTrace -> structure TDPInstrument
33       etc.
34    
35    This is is preparation of using the original back-trace
36    instrumentation for other purposes.  "TDP" stands for
37    Trace/Debug/Profile.
38    
39    The control flag controlling whether instrumentation is on or off is now
40    registered under a different name, so instead of running sml as
41    
42     sml -Cinstrument.btrace-mode=true
43    
44    one has to say
45    
46     sml -Ctdp.instrument=true
47    
48    ----------------------------------------------------------------------
49    Name: Matthias Blume (blume (at) tti - c (dot) org)
50    Date: 2004/10/11 16:37:00 CDT
51    Tag: blume-20041011-regions
52    Description:
53    
54    Made some minor modifications to elabcore.sml to have source regions
55    be propagated more tightly -- resulting in better (i.e., smaller)
56    regions being reported in error- and debug messages.
57    
58    ----------------------------------------------------------------------
59    Name: Matthias Blume (blume (at) tti - c (dot) org)
60    Date: 2004/10/08 22:50:00 CDT
61    Tag: blume-20041008-cmkw
62    Description:
63    
64    Fixed handling of keywords in .cm files: After seeing "is" the lexer
65    treats subsequent occurrences of "group", "library", "source", "is",
66    "*", and "-" as ordinary identifiers rather than keywords.
67    
68    Most seriously, this fixes a problem with CM's "shell" tool.  The tool
69    is supposed to accept a tool argument called "source", but this did
70    not work because of the clash with the keyword.
71    
72    ----------------------------------------------------------------------
73    Name: Matthias Blume (blume (at) tti - c (dot) org)
74    Date: 2004/10/07 16:00:00 CDT
75    Tag: blume-20041007-cleanup
76    Description:
77    
78    Assorted cleanup work:
79    
80      - got rid of intstrmap in favor of using the library's
81        hash table implementation
82      - threw out most of the pathnames stuff, as it was not used anyway
83      - simplified tokentable implementation
84      - fixed some minor spelling errors
85    
86    ----------------------------------------------------------------------
87    Name: Matthias Blume (blume (at) tti - c (dot) org)
88    Date: 2004/10/06 15:15:15 CDT
89    Tag: blume-20041006-handler
90    Description:
91    
92    Cleaned up the absyn to reflect the invariant that HANDLE always
93    carries a FNexp as part of the type definition.  This eliminates some
94    superfluous sanity checks at runtime down the road.
95    
96    Some minor cleanup of the btrace code.
97    
98    ----------------------------------------------------------------------
99    Name: Matthias Blume (blume (at) tti - c (dot) org)
100    Date: 2004/10/01 10:20:30 CDT
101    Tag: blume-20041001-slave
102    Description:
103    
104    Added hack to make slave mode work in the presence of the version
105    tool.  (Still, since the master does two passes over the code for
106    CMB.make, the release number gets bumped twice when slaves are
107    attached.  I don't know if this is worth fixing...)
108    
109    ----------------------------------------------------------------------
110    Name: Matthias Blume (blume (at) tti - c (dot) org)
111    Date: 2004/09/30 10:55:00 CDT
112    Tag: blume-20040930-version
113    Description:
114    
115    * Moved the "version" magic into its own little library under
116    src/system/smlnj/internal.  This avoids expensive reconstruction
117    of a stable src/compiler/core.cm.
118    
119    * At the same time, structure CompilerVersion is now known as structure
120    SMLNJVersion.
121    
122    * Arranged for the version tool to NOT kick in when rebuilding the system
123      (makeml -rebuild, fixpt).  Otherwise one would never reach a fixpoint.
124      Also, loading the versiontool does not work when rebuilding the system
125      because CM is not properly initialized at that time.
126    
127    ----------------------------------------------------------------------
128    Name: Matthias Blume (blume (at) tti - c (dot) org)
129    Date: 2004/09/29 14:00:00 CDT
130    Tag: blume-20040929-autoversion
131    Description:
132    
133    Implemented some CM magic to have
134        file src/compiler/TopLevel/main/version.sml
135    generated automagically.
136    The version is taken from two files: config/version and config/release.
137    The first is expected to contain a two-part version number such as 110.49.
138    The second should contain a single number, but it may be missing.
139    
140    If the environment variable VERSIONTOOL_BUMP_RELEASE is defined at the
141    time the version tool is loaded (which is the first time you say CMB.make),
142    then the tool will increment the value stored in config/release every
143    time CMB.make is invoked.
144    
145    The binfile format is now insensitive to anything beyond the first
146    two components of a version number, so bumping the release does not render
147    binfiles incompatible.  Auto-bumping can be used to keep track of versions
148    during development without invalidating existing binfiles.
149    
150    In any case, every CMB.make updates the date information in version.sml.
151    (This is the date that is printed in the banner.)
152    
153    ----------------------------------------------------------------------
154    Name: Matthias Blume (blume (at) tti - c (dot) org)
155    Date: 2004/09/28 10:53:00 CDT
156    Tag: blume-20040928-controls
157    Description:
158    
159    Some cleanup of the controls code.
160    
161    ----------------------------------------------------------------------
162    Name: Matthias Blume (blume (at) tti - c (dot) org)
163    Date: 2004/09/27 22:08:00 CDT
164    Tag: blume-20040927-controls
165    Description:
166    
167    Added two pieces of functionality to the Controls interface:
168    
169    1.   val save'restore: 'a control -> unit -> unit
170    
171       grabs the current value of the control in stage 1 and restores it
172       in stage 2.
173    
174    2.   val set' : 'a control * 'a -> unit -> unit
175    
176       stores the given value into the control in stage 2 (i.e., delayed)
177       but does all error checking in stage 1.
178       (This is for string controls that need to do parse their argument --
179        something that might fail.  In some cases, notably in CM, one
180        already knows the intended argument but wants to delay the actual
181        assignment until a time when error recovery would be more difficult.)
182    
183    Changed the handling of controls in tool arguments to classes "sml" and
184    "lazysml":
185       - use Controls.save'restore as a more robust way of restoring the
186         old value (in particular: without having to re-parse the string)
187       - use controls to handle the "overload" keyword in the init group
188         (I believe this change actually fixes a long-standing obscure bug.)
189    
190    ----------------------------------------------------------------------
191    Name: Matthias Blume (blume (at) tti - c (dot) org)
192    Date: 2004/09/27 17:00:00 CDT
193    Tag: blume-20040927-lazysml
194    Description:
195    
196    Added a new tool class called "lazysml" to CM's tool chest.  The only
197    difference to "sml" is that compilation is done with Control.lazysml
198    set to true.  A source of class "lazysml" is automatically recognized
199    by a file name suffix of ".lml".
200    
201    In addition to the above feature, the original class "sml" now also
202    supports a tool argument "lazy" which has the same effect.  As a
203    result, the following three lines are equivalent:
204    
205        foo.sml : lazysml
206        foo.sml : sml (lazy)
207        foo.sml (lazy)
208    
209    The setting goes into effect both during parsing and during
210    compilation.  The original setting is restored right after parsing and
211    after compilation, respectively.
212    
213    In addition to all the above, there is also a general mechanism to set
214    ANY of the "controls" that are available at the command line via
215    "-C..." on a per-sml-file basis.  The same rules that apply for "lazy"
216    apply as well. (In fact, "lazy" is implemented as a special case of
217    the general mechanism.)
218    
219    The .cm file syntax uses a new keyword tool argument called "with".
220    There are several ways of indicating the desired settings:
221    
222        foo.sml (with:parser.quotations=true)
223        foo.sml (with:(name:parser.quotations value:true))
224        foo.sml (with:(name:name1 value:value1 name:name2 value:value2 ...))
225        foo.sml (with:(name1=value1 name2=value2 ...))
226        foo.sml (with:(name1=value1 name:name2 value:value2 name3=value3 ...))
227    
228        etc.
229    
230    Another possible abbreviation is to leave out the =v or value:v part
231    if the name refers to a boolean control (in which case the value is
232    taken to be true).  Thus, one could get lazy sml also by saying:
233    
234        foo.sml (with:parser.lazy-keyword=true)
235        foo.sml (with:parser.lazy-keyword)
236        foo.sml (with:(name:parser.lazy-keyword value:true))
237        foo.sml (with:(name:parser.lazy-keyword))
238    
239    ----------------------------------------------------------------------
240    Name: Matthias Blume (blume (at) tti - c (dot) org)
241    Date: 2004/09/24 16:22:00 CDT
242    Tag: blume-20040924-ppc-long-branch
243    Description:
244    
245    Turned message about "emiting long form of branch" off by default.
246    Added a control flag to turn it back on when desired.
247    
248    ----------------------------------------------------------------------
249    Name: Matthias Blume (blume (at) tti - c (dot) org)
250    Date: 2004/09/24 16:05:00 CDT
251    Tag: blume-20040924-rounding
252    Description:
253    
254    Applied patch for setting rounding modes under Mac OS X.  Thanks to
255    Melissa O'Neill for providing the code!
256    
257    ----------------------------------------------------------------------
258    Name: Matthias Blume (blume (at) tti - c (dot) org)
259    Date: 2004/09/23 17:30:00 CDT
260    Tag: blume-20040923-envvars
261    Description:
262    
263    1. Changed definition of type ControlRegistry.registry_tree to
264       include control_info (i.e., the name of the controlling environment
265       variable).
266    
267    2. Added command-line flags -e and -E to print the names of environment
268       variables that can be used to control internal settings.
269       (This uses the new API mentioned in 1.)
270    
271    ----------------------------------------------------------------------
272    Name: Matthias Blume (blume (at) tti - c (dot) org)
273    Date: 2004/09/13 16:50:00 CDT
274    Tag: Release_110_49
275    Description:
276    
277    New working version (110.49).  NEW BOOTFILES!
278    
279    ----------------------------------------------------------------------
280    Name: Matthias Blume
281    Date: 2004/09/13 16:20:00 CDT
282    Tag: blume-20040913-config-mlrisc
283    Description:
284    
285    Put target "mlrisc" back into the default list.
286    (There is no harm in having it, and some users have expressed their
287    wish to have "mlrisc" included by default.)
288    
289    ----------------------------------------------------------------------
290    Name: John Reppy
291    Date: 2004/09/13
292    Tag: jhr-20040913-signals
293    Description:
294    
295    Fixed the signal masking code to properly nest mask/unmask operations
296    on a per-signal basis.
297    
298    ----------------------------------------------------------------------
299    Name: Matthias Blume (blume (at) tti - c (dot) org)
300    Date: 2004/09/08 13:20:00 CDT
301    Tag: blume-20040908-heap-magic
302    Description:
303    
304    Bumped the heap macig number to 0x09082004 to account for the changed
305    layout of the ML frame under MacOS X.
306    
307    ----------------------------------------------------------------------
308    Name: Allen Leung (leunga (at) reservoir (dot) com)
309    Date: 2004/09/03 11:26:00 EST
310    Tag: leunga-20040903-cygwin-install
311    Description:
312    
313       Added a patch to _arch-n-opsys to enable the Cygwin runtime.
314    The Cygwin runtime is turned on by setting the environment
315    variable SMLNJ_CYGWIN_RUNTIME to 1.
316    
317    ----------------------------------------------------------------------
318    Name: Matthias Blume (blume (at) tti - c (dot) org)
319    Date: 2004/08/31 17:15:00 CDT
320    Tag: blume-20040831-core
321    Description:
322    
323    Added some exports to src/compiler/core.cm upon request by J. Joemann.
324    
325    ----------------------------------------------------------------------
326    Name: Matthias Blume (blume (at) tti - c (dot) org)
327    Date: 2004/08/30 17:55:00 CDT
328    Tag: blume-20040830-installer
329    Description:
330    
331    Upon request by Johannes Joemann:
332    
333    - improved ML code of installer to fall back to coping when renaming
334      fails (i.e., when source and target are on different file systems);
335      the code compiles but has yet to be tested in anger
336    - removed mlrisc from list of default targets (config/targets)
337    
338    ----------------------------------------------------------------------
339    Name: Matthias Blume (blume (at) tti - c (dot) org)
340    Date: 2004/08/27 17:20:00 CDT
341    Tag: blume-20040827-ptreql
342    Description:
343    
344    Added ptreql primop to structure InlineT (upon request from Larry
345    Paulson).
346    
347    ----------------------------------------------------------------------
348    Name: Allen Leung (leunga (at) reservoir (dot) com)
349    Date: 2004/08/15 21:21:00 EST
350    Tag: leunga-110_48-udgraph
351    Description:
352    
353    Another bug fix from Carl Hauser:
354    
355    diff /net/niflab/smlnj48/src/MLRISC/graphs/udgraph.sml udgraph.sml
356    > 48c48
357    > <              | rmv((e as (k,_))::es,L) = rmv(es,if k = i then es else
358    > e::L)
359    > ---
360    > >              | rmv((e as (k,_))::es,L) = rmv(es,if k = i then L else e::L)
361    > Without this, any deletion of an edge in an undirected graph does severe
362    > violence to the graph.
363    
364    ----------------------------------------------------------------------
365    Name: Allen Leung (leunga (at) reservoir (dot) com)
366    Date: 2004/08/10 23:35:00 EST
367    Tag: leunga-110_48-ppc
368    Description:
369    
370       The IBM/MacOS syntax switch on PPC was incorrectly swapped.
371    
372    ----------------------------------------------------------------------
373    Name: Matthias Blume (blume (at) tti - c (dot) org)
374    Date: 2004/08/10 12:00:00 CDT
375    Tag: Release_110_48
376    Description:
377    
378    New working version (110.48).  NEW BOOTFILES!
379    
380    ----------------------------------------------------------------------
381    Name: Allen Leung (leunga (at) reservoir (dot) com)
382    Date: 2004/08/09 12:21:00 EST
383    Tag: leunga-110_47-dijsktra
384    Description:
385    
386    Bug fix from Carl Hauser:
387    
388    single_source_shortest_paths in dijkstra.sml was observed to get wrong
389    answers (by comparing to single_source_shortest_paths in bellman-ford.sml).
390    
391    The problem is that following the expression A.update(dist,s,Num.zero)
392    it is necessary to update the priority queue using Q.decreaseWeight(Q,s).
393    
394    ----------------------------------------------------------------------
395    Name: Matthias Blume (blume (at) tti - c (dot) org)
396    Date: 2004/08/06 18:10:00 CDT
397    Tag: blume-20040806-cmdline
398    Description:
399    
400    Fiddled with handling of command-line options:
401    
402      * sml now quits after processing the command line
403        if -H, -S, -h<n>, or -s<n> appears as the last
404        command-line argument
405      * a new option -q terminates the session when encountered on
406        the command line; subsequent arguments will be ignored
407      * bug fixes: short (erroneous) arguments are no longer ignored
408        completely
409    
410    ----------------------------------------------------------------------
411    Name: Allen Leung (leunga (at) reservoir (dot) com)
412    Date: 2004/08/04 18:17:00 EST
413    Tag: leunga-110_47-ppc-ibm-asm
414    Description:
415    
416      - Added minimal IBM assembly syntax support for PowerPC.
417    
418      - Cygwin: manually changed the file cygwin.def.  Some exported symbols have
419        been altered in the runtime.  We need an automatic way to keep the file
420        in sync.
421    
422    ----------------------------------------------------------------------
423    Name: Matthias Blume (blume (at) tti - c (dot) org)
424    Date: 2004/08/04 14:00:00 CDT
425    Tag: Release_110_47
426    Description:
427    
428    New working version (110.47).  NEW BOOTFILES!
429    
430    ----------------------------------------------------------------------
431    Name: Matthias Blume (blume (at) tti - c (dot) org)
432    Date: 2004/08/03 14:25:00 CDT
433    Tag: blume-20040803-callingconv
434    Description:
435    
436    Added low-level support for choosing C calling conventions by
437    twiddling the type of rawccall.  (See
438    src/compiler/Semant/types/cproto.sml for details.)
439    
440    ----------------------------------------------------------------------
441    Name: Matthias Blume (blume (at) tti - c (dot) org)
442    Date: 2004/08/02 15:55:00 CDT
443    Tag: blume-20040802-backout
444    Description:
445    
446    Backed out of change to win32-filesys.c.  The earlier patch to
447    get_file_time caused CM to produce files with the wrong time stamp.
448    
449    ----------------------------------------------------------------------
450    Name: Matthias Blume (blume (at) tti - c (dot) org)
451    Date: 2004/08/02 14:45:00 CDT
452    Tag: blume-20040802-nlffi-win32
453    Description:
454    
455    Added NLFFI support for Win32, adapted from a patch provided by David
456    Hansel.  This is currently completely untested.  Also, the issue
457    concerning stdcall vs. ccall is still unresolved.
458    
459    ----------------------------------------------------------------------
460    Name: Matthias Blume (blume (at) tti - c (dot) org)
461    Date: 2004/07/30 17:55:00 CDT
462    Tag: blume-20040730-various
463    Description:
464    
465    Gearing up towards 110.47...
466    
467    - various minor bugfixes to ml-nlffigen
468    - a beginning of a manual for nlffi
469    
470    - eliminated 'export name=value' in config/install.sh as this does
471      not work with certain versions of /bin/sh
472      (Thanks to David King at Motorola for catching this.)
473    
474    - several bugfixes provided or suggested by David Hansel at Reactive Systems:
475      - added a test for tm==NULL to gmtime.c and localtime.c
476      - applied patch for incorrect GetFileTime under win32
477      - toSeconds -> toMilliseconds in Win32/win32-process.sml
478    
479    ----------------------------------------------------------------------
480    Name: Matthias Blume (blume (at) tti - c (dot) org)
481    Date: 2004/07/21 18:20:00 CDT
482    Tag: blume-20040721-nlffigen
483    Description:
484    
485    - Fixed minor issue in ml-nlffigen: Now generate structure T_foo
486      for a typedef to an incomplete type, but leave out the "typ" member.
487      (This is just for consistency.)
488    - Started to produce what is supposed to become better (i.e., comprehensive)
489      documentation of what ml-nlffigen does and produces.
490    
491    ----------------------------------------------------------------------
492    Name: Matthias Blume (blume (at) tti - c (dot) org)
493    Date: 2004/07/14 16:25:00 CDT
494    Tag: blume-20040714-union
495    Description:
496    
497    Added C_UNION to c-calls/c-types.sml and updated the machinery
498    (ml-nlffigen, cproto.sml) that conveys C function interface
499    information to the code generator.
500    
501    However, the actual architecture-specific implementation of function
502    arguments and results that are C unions is still not implemented.
503    
504    ----------------------------------------------------------------------
505    Name: Allen Leung (leunga (at) reservoir (dot) com)
506    Date: 2004/07/14 14:38:00 EST
507    Tag: leunga-110_46_1-ppc-lwzu
508    Description:
509    
510        Added these instructions to the PowerPC architecture:
511        LBZU(X), LHZU(X), LWZU(X),
512        STWU(X), STFDU, STFSU
513    
514        etc...
515    
516        Note: I haven't added their instruction encoding into the description.
517    
518    ----------------------------------------------------------------------
519    Name: Allen Leung (leunga (at) reservoir (dot) com)
520    Date: 2004/07/13 15:04:00 EST
521    Tag: leunga-110_46_1-ppc-lwarx
522    Description:
523    
524       Added the two instructions LWARX and STWCX to the PowerPC
525    instruction set.
526    
527       A (untested) rewrite of loop-structure.sml.  The old version
528    is completely broken.
529    
530    ----------------------------------------------------------------------
531    Name: Matthias Blume (blume (at) tti - c (dot) org)
532    Date: 2004/07/13 13:50:00 CDT
533    Tag: blume-20040713-nlffi
534    Description:
535    
536    - use paramAlloc to report c-calls with too many arguments
537      (for PPC version where parameter area is pre-allocated)
538    - added ccall_maxargspace to machspec (to implement the above)
539    - made "make" commend in CM's "make" tool configurable
540    - added option (default: on) for passing the name of the SML/NJ's "bin"
541      directory to "make"; the call looks like this:
542    
543         make <options> SMLNJ_BINDIR=<dir> <target>
544    
545      This can be used by the Makefile to, e.g., pick the "right" version
546      of ml-nlffigen.
547    - minor code tweaks
548    
549    ----------------------------------------------------------------------
550    Name: Matthias Blume (blume (at) tti - c (dot) org)
551    Date: 2004/07/12 22:50:00 CDT
552    Tag: blume-110_46_1-macosx-nlffi
553    Description:
554    
555    NLFFI under Mac OS X now working (sort of).  This is largely untested,
556    though.
557    
558    Note:  1. You have to make a new, clean build of the runtime system.
559           2. There are new BOOTFILES, you have to use them!
560              (Doing the bootstrap process yourself would be *very* painful!
561               If you absolutely have to do it, build the system under
562               a different architecture and then cross-compile.)
563    
564    Version bumped to 110.46.1 to account for runtime data format changes.
565    
566    ----------------------------------------------------------------------
567    Name: Matthias Blume (blume (at) tti - c (dot) org)
568    Date: 2004/06/18 14:30:00 CDT
569    Tag: blume-20040618-unix
570    Description:
571    
572    Changed the implementation of structure Unix so that the same stream
573    is returned every time one of the {text,bin}{In,Out}streamOf functions
574    is invoked on the same proc.  This is not what the spec currently
575    says -- although IMO it arguably should.  (See discussion below.)
576    
577    ----------------------------------------------------------------------
578    Name: Matthias Blume (blume (at) tti - c (dot) org)
579    Date: 2004/06/17 18:15:00 CDT
580    Tag: Release_110_46
581    Description:
582    
583    New working version (110.46).  NEW BOOTFILES!
584    
585    ----------------------------------------------------------------------
586    Name: Matthias Blume (blume (at) tti - c (dot) org)
587    Date: 2004/06/17 17:20:00 CDT
588    Tag: blume-20040617-timer-unix
589    Description:
590    
591    Changed the interface of structures Timer and Unix to match the most
592    recent Basis spec.
593    
594    In the case of Unix there still seems to be an open/weird issue:
595    
596       The {text,bin}{In,Out}streamOf functions are supposed to create
597       fresh streams whenever they are called -- as opposed to have them
598       return the same stream every time.  This design is supposed to
599       prevent space leaks caused by proc values hanging on to streams.
600    
601       The reap function, on the other hand, is supposed to close the
602       streams.  This cannot be done without having a handle on the
603       stream in proc after all...
604    
605    I took the liberty to implement the following stopgap solution:
606    
607      The proc value hangs on to the most recently created stream(s).
608      Reap closes those.  If either or both of the two streams hadn't
609      been created at all yet, then reap will close the corresponding
610      file descriptors directly.
611    
612    PS: I don't understand the original space leak argument anymore.  If
613    a proc hangs on to the imperative stream, then I/O operations on those
614    will advance the state of the cached stream and avoid the space leak.
615    
616    ----------------------------------------------------------------------
617    Name: Matthias Blume (blume (at) tti - c (dot) org)
618    Date: 2004/05/28 16:45:00 CDT
619    Tag: blume-20040528-basis
620    Description:
621    
622    Added signature PACK_REAL and exported functor PrimIO.
623    
624    ----------------------------------------------------------------------
625    Name: Matthias Blume (blume (at) tti - c (dot) org)
626    Date: 2004/05/25 16:00:00 CDT
627    Tag: blume-20040525-group-owner
628    Description:
629    
630    CM now ignores (but still accepts) the "owner" information in group
631    descriptions.  The owner of a group is its next enclosing
632    library. Each group must have a unique owner.  (There is a virtual
633    "toplevel" library that owns groups which are not nested within a real
634    library.)  Previously, each group had to explicitly declare its owner,
635    and CM would check that such a declaration is correct.  The new scheme
636    is to have CM check that for each group there is precisely one owning
637    library.
638    
639    The advantage of the new scheme is that the programmer no longer needs
640    to maintain the somewhat annoying owner information.  The downside is
641    that CM cannot enforce the ownership rule across multiple runs of
642    CM.make.  Fortunately, enclosing the same group in two different
643    libraries A and B which are not part of the same program does not
644    cause real problems.
645    
646    ----------------------------------------------------------------------
647    Name: Matthias Blume (blume (at) tti - c (dot) org)
648    Date: 2004/05/20 16:00:00 CDT
649    Tag: blume-20040520-win32
650    Description:
651    
652    Made the win32 version work again.  (Strangely, a misplaced comma had
653    slipped into win32-process.c which prevented the runtime from being
654    compiled correctly.)
655    
656    Also, included a minor addition to ml-build.bat analogous to what was
657    done in blume-20040519-ml-build.
658    
659    ----------------------------------------------------------------------
660    Name: Matthias Blume (blume (at) tti - c (dot) org)
661    Date: 2004/05/19 22:10:00 CDT
662    Tag: blume-20040519-ml-build
663    Description:
664    
665    Arranged for ml-build to clean up after itself a little bit better.
666    The script generates a temporary SML source file and compiles it using
667    CM, so CM generates metadata (GUID, SKEL, objectfile) for it.  It now
668    gets rid of those at the end, so they don't accumulate under .cm.
669    
670    This required a minor change to install.sh because the name of the
671    metadata directory (default: .cm) is actually configurable at
672    installation time.
673    
674    ----------------------------------------------------------------------
675    Name: Matthias Blume (blume (at) tti - c (dot) org)
676    Date: 2004/05/18 15:50:00 CDT
677    Tag: blume-20040518-mkreader
678    Description:
679    
680    Added Posix.IO.mk{Bin,Text}{Reader,Writer} by lifting their respective
681    implementations from internal modules PosixBinPrimIO and PosixTextPrimIO.
682    
683    ----------------------------------------------------------------------
684    Name: Matthias Blume (blume (at) tti - c (dot) org)
685    Date: 2004/05/11 14:35:00 CDT
686    Tag: blume-20040511-win32sock
687    Description:
688    
689    Added previously missing support for many socket-related functions
690    under win32.  Thanks to David Hansel <hansel@reactive-systems.com>
691    for the voluminous patch!
692    
693    (I have not tested this patch under win32 yet.)
694    
695    Here is David's e-mail:
696    
697    Hi,
698    
699    Attached to this email you find a diff against sml/nj 110.45
700    that will enable socket support under Windows.
701    
702    To apply the patch (using unix or cygwin)
703    1) gunzip runtime.diff.gz
704    2) "cd" into "src/runtime" in the source tree of a fresh
705       110.45 installation.
706    3) patch -p 1 < [your/path/to]runtime.diff
707    
708    The code compiles fine but has NOT yet been extensively tested.
709    I only ran a few tests for basic socket client functionality
710    (which worked fine).  Especially the functions that use ioctl
711    are not tested at all and might not work (see below).
712    
713    I implemented this since we want to move to a newer version of sml/nj
714    but need socket support in order to use it.  This is the first time I
715    even had a look at the sml/nj source,  so please review my changes
716    before making this part of the distribution!  Here are a few issues
717    that I think might be better for someone to solve who is more
718    familiar with the sml/nj source (and socket programming):
719    
720    - getnetbyaddr.c and getnetbyname.c will raise a "not implemented"
721      exception since I could not figure out what the windows equivalent
722      of these functions is
723    
724    - In sockets-osdep.h there are a some #include statements that are
725      only used in a few files that include sockets-osdep.h
726    
727    - In smlnj-sock-lib.c, function init_fn() calls WSAStartup() but
728      does not process its return value since I don't know how to
729      report an error upwards.
730    
731    - It would probably be good to have a call to WSACleanup() when
732      the library is unloaded (if there is such a possibility).
733      Otherwise I think Windows will take care of this automatically
734      when the process finishes.
735    
736    - I used ioctlsocket() as a replacement for ioctl() but I have
737      no idea if that is actually the proper replacement on Windows.
738    
739    - All these issues are marked in the code by "FIXME" comments.
740    
741    We use sml/nj extensively in our products and are quite happy
742    with it.  I hope this contribution will help you.
743    
744    Keep up the good work!
745    
746    David
747    
748    ----------------------------------------------------------------------
749    Name: Matthias Blume (blume (at) tti - c (dot) org)
750    Date: 2004/05/11 14:20:00 CDT
751    Tag: blume-20040511-installml
752    Description:
753    
754    Fixed two bugs in installml script.  (Thanks to Vesa A. Norrman for
755    the patch.)
756    
757    ----------------------------------------------------------------------
758    Name: Matthias Blume (blume (at) tti - c (dot) org)
759    Date: 2004/05/11 14:05:00 CDT
760    Tag: blume-20040511-nlffi-netbsd
761    Description:
762    
763    Added support for nlffi under netbsd.  (Thanks to Vesa A. Norrman for
764    the patch.)
765    
766    ----------------------------------------------------------------------
767    Name: Matthias Blume (blume (at) tti - c (dot) org)
768    Date: 2004/05/11 12:05:00 CDT
769    Tag: blume-20040511-exports
770    Description:
771    
772    As per request by Adam Chlipala <adam@hcoop.net>, extended various
773    export lists in compiler-related .cm-files.
774    
775    ----------------------------------------------------------------------
776    Name: Matthias Blume (blume (at) tti - c (dot) org)
777    Date: 2004/05/11 11:35:00 CDT
778    Tag: blume-20040511-allsource
779    Description:
780    
781    The installer now honors the "src-smlnj" target again, although its meaning
782    has changed from "all sources required for the compiler" to "all sources
783    the installer knows about".  In other words, if you enable "src-smlnj"
784    in the "targets" file, then the installer will pull in sources for
785    everything.  (Notice that this refers to source code only.  Compiled
786    code is still only installed for modules that were requested explicitly
787    or which are required for other modules that were requested explicitly.)
788    
789    ----------------------------------------------------------------------
790    Name: Matthias Blume (blume (at) tti - c (dot) org)
791    Date: 2004/04/23 17:40:00 CDT
792    Tag: blume-20040423-ieee-scan
793    Description:
794    
795    Fixed IEEEReal.scan (and .fromString) so that if there is an overflow
796    in the exponent calculation we get INF or ZERO (depending on the mantissa
797    and the sign of the exponent).
798    
799    ----------------------------------------------------------------------
800    Name: Matthias Blume (blume (at) tti - c (dot) org)
801    Date: 2004/04/23 10:40:00 CDT
802    Tag: blume-20040423-ml-build
803    Description:
804    
805    The ml-build script now terminates with a non-0 status when something
806    goes wrong.
807    
808    ----------------------------------------------------------------------
809    Name: Matthias Blume (blume (at) tti - c (dot) org)
810    Date: 2004/04/22 16:35:00 CDT
811    Tag: blume-20040422-Option
812    Description:
813    
814    Made exception Option to be the same as exception Option.Option
815    (as it should be).
816    
817    ----------------------------------------------------------------------
818    Name: Allen Leung (leunga (at) reservoir (dot) com)
819    Date: 2004/03/19 14:40:00 EST
820    Tag: leunga-20040319-cygwin-nlffi
821    Description:
822    
823    Fixed the runtime so that ml-nlffi-lib runs on the cygwin version
824    of SML/NJ.  The problem is that
825    
826       lib = dlopen(NULL, ...)
827       f   = dlsym(lib, "malloc");
828    
829    does not work on Windows unless we explicitly export symbols
830    such as 'malloc' during linking.  We fixed this by explicitly
831    exporting the required symbols with the magic gcc incantation:
832    
833        -Wl,--export-all cygwin.def
834    
835    where cygwin.def is a file containing all the symbols that
836    we wish to export.
837    
838    I suspect this is a Windows problem and we'll have to
839    do the same (somehow with windows compilers) when
840    we build the native win32 version with the system
841    calls LoadLibrary/GetProcAddress.
842    
843    ----------------------------------------------------------------------
844    Name: Matthias Blume (blume (at) tti - c (dot) org)
845    Date: 2004/03/04 16:35:00 CST
846    Tag: blume-20040304-intinf-fmt
847    Description:
848    
849    Fixed problem with IntInf.fmt (sign would show up on the right instead
850    of on the left for BIN, OCT, and HEX).
851    
852    ----------------------------------------------------------------------
853    Name: Matthias Blume (blume (at) tti - c (dot) org)
854    Date: 2004/03/04 11:25:00 CST
855    Tag: blume-20040304-symlinks
856    Description:
857    
858    Fixed problem with installer script (unix only) where bin/ml-yacc and
859    friends pointed (via symlinks) to absolute locations instead of just
860    .run-sml.  This was reported by Vesa A Norrman.
861    
862    ----------------------------------------------------------------------
863    Name: Matthias Blume (blume (at) tti - c (dot) org)
864    Date: 2004/02/13 14:50:00 CST
865    Tag: Release_110_45
866    Description:
867    
868    New working version (110.45). New bootfiles.
869    
870    ----------------------------------------------------------------------
871    Name: Matthias Blume (blume (at) tti - c (dot) org)
872    Date: 2004/01/26 15:15:15 CST
873    Tag: blume-20040126-toplevel
874    Description:
875    
876    Improved handling of exceptions at the interactive toplevel.
877    
878    ----------------------------------------------------------------------
879    Name: Matthias Blume (blume (at) tti - c (dot) org)
880    Date: 2004/01/26 11:25:00
881    Tag: blume-20040126-app
882    Description:
883    
884    Type of top-level "app" corrected.
885    Added code for setting vp_limitPtrMask to Win32-specific runtime.
886    
887    ----------------------------------------------------------------------
888    Name: Matthias Blume (blume (at) tti - c (dot) org)
889    Date: 2003/11/18 17:10 CST
890    Tag: blume-20031118-basis-fiddle
891    Description:
892    
893    - changed Timer interface to what might become the spec
894    - POSIX_FLAGS -> BIT_FLAGS according to spec
895    - some other minor discrepancies wrt. spec eliminated
896    
897    ----------------------------------------------------------------------
898    Name: Matthias Blume (blume (at) tti - c (dot) org)
899    Date: 2003/11/06 12:00:00 CST
900    Tag: Release_110_44
901    Description:
902    
903    New working version (110.44). New bootfiles.
904    
905    ----------------------------------------------------------------------
906    Name: Matthias Blume (blume (at) tti - c (dot) org)
907    Date: 2003/11/04 11:50:00 CST
908    Tag: blume-20031104-move-libraries
909    Description:
910    
911    Eliminated the "dont_move_libraries" directive in config/targets.
912    (The mechanism was broken and could not be fixed easily.  Moreover,
913    there does not seem to be any reason not to move all libraries into
914    lib during installation.  I originally implemented this directive as a
915    backward-compatibility feature when I first introduced the new CM.
916    Now that things have been stable for a long time and going back to the
917    old CM is not an option, there is no reason to keep it around.)
918    
919    ----------------------------------------------------------------------
920    Name: Matthias Blume (blume (at) tti - c (dot) org)
921    Date: 2003/11/03 16:00:00 CST
922    Tag: blume-20031103-installdir
923    Description:
924    
925    Made installer honor INSTALLDIR variable again.  (Thanks to Chris
926    Richards for pointing out the problem and providing the solution.)
927    
928    ----------------------------------------------------------------------
929    Name: Matthias Blume (blume (at) tti - c (dot) org)
930    Date: 2003/10/01 17:05:00 CDT
931    Tag: blume-20031001-lal-mlrisc
932    Description:
933    
934    MLRISC bug fix from Lal.
935    
936    ----------------------------------------------------------------------
937    Name: Matthias Blume (blume (at) tti - c (dot) org)
938    Date: 2003/09/30 16:10:00 CDT
939    Tag: blume-20030930-primio-bat
940    Description:
941    
942    1. Added openVector, nullRd, and nullWr to PRIM_IO.
943    2. Improved .bat files (for Win32 port) to make things work under Win95.
944       (thanks to Aaron S. Hawley for this one)
945    
946    ----------------------------------------------------------------------
947    Name: Matthias Blume (blume (at) tti - c (dot) org)
948    Date: 2003/09/26 16:05:00 CDT
949    Tag: blume-20030926-wrappriv
950    Description:
951    
952    Added missing wrapper for privilege "primitive" in $smlnj/viscomp/core.cm.
953    
954    ----------------------------------------------------------------------
955    Name: Matthias Blume (blume (at) tti - c (dot) org)
956    Date: 2003/09/26 15:00:00 CDT
957    Tag: blume-20030926-110_43_3
958    Description:
959    
960    - additional cleanup
961    - version number bump, NEW BOOTFILES
962    
963    ----------------------------------------------------------------------
964    Name: Matthias Blume (blume (at) tti - c (dot) org)
965    Date: 2003/09/26 12:00:00 CDT
966    Tag: blume-20030926-ppautoload
967    Description:
968    
969    I modified the read-eval-print loop so that the autoloader gets
970    invoked whenever the prettyprinter tries to look up a symbol that
971    is not currently defined in the toplevel environment but which
972    appears in CM's autoload registry.  As a result, we see far fewer of
973    those ?.Foo.Bar.xxx names in the prettyprinter's output.
974    
975    In addition to this I tried to clean up some pieces of the Basis
976    implementation (e.g., Socket, Word8Array) in order to prevent other
977    instances of these ?.Foo.Bar.xxx names from being printed.
978    
979    The mechanism that picks names for types still needs some work, though.
980    (Right now it seems that if there is a type A.t which is defined to
981    be B.u, but B is unavailable at toplevel, then A.t gets printed as
982    "?.B.u" although the perhaps more sensible solution would be to use
983    "A.t" in this case.  In other words, the prettyprinter should follow
984    a chain of DEFtycs not farther than there are corresponding toplevel
985    names in the current environment.)
986    
987    ----------------------------------------------------------------------
988    Name: Matthias Blume (blume (at) tti - c (dot) org)
989    Date: 2003/09/24 16:31:00 CDT
990    Tag: blume-20030924-installer
991    Description:
992    
993    Another installer tweak:  All the ML code for the installer is now
994    compiled during CMB.make and put into a little library called
995    $smlnj/installer.cm.  The installation then simply invokes
996    
997       sml -m $smlnj/installer.cm
998    
999    and everything happens automagically.
1000    
1001    Win32:  ML code senses value of environment variable SMLNJ_HOME.
1002    Unix:   ML code senses values of environment variables ROOT, CONFIGDIR,
1003            and BINDIR.
1004    
1005    The new scheme guarantees that the ML code responsible for the installation
1006    is in sync with the APIs of the main system.  Also, the installer is
1007    somewhat faster because the installer script is precompiled.
1008    
1009    ----------------------------------------------------------------------
1010    Name: Matthias Blume (blume (at) tti - c (dot) org)
1011    Date: 2003/09/24 15:35:00 CDT
1012    Tag: blume-20030924-synsock
1013    Description:
1014    
1015    Added a signature SYNCHRONOUS_SOCKET to basis.cm.  This is like SOCKET
1016    but excludes all non-blocking operations.  Defined SOCKET (in Basis)
1017    and CML_SOCKET in terms of SYNCHRONOUS_SOCKET.  Removed superfluous
1018    implementations of non-blocking operations from CML's Socket
1019    structure.
1020    
1021    ----------------------------------------------------------------------
1022    Name: Matthias Blume (blume (at) tti - c (dot) org)
1023    Date: 2003/09/24 15:10:05 CDT
1024    Tag: blume-20030924-sockets
1025    Description:
1026    
1027    1. Fixed SOCKET API and implementation to match Basis spec.
1028       This required changing the internal representation of sockets to one
1029       that remembers (for each socket file descriptor) whether it is currently
1030       blocking or non-blocking.  This state is maintained lazily (i.e., a system
1031       call is made only if the state actually needs to change).
1032    
1033    2. OS-specific details of sockets were moved into separate files, thus
1034       making it possible to unify the bulk of the socket implementations
1035       between Unix and Win32.
1036    
1037    3. CML's socket API changed accordingly.
1038       (Note that we need to remove non-blocking functions from this API
1039       since they are redundant in the case of CML!)
1040    
1041    4. CML's socket implementation now makes use of non-blocking functions
1042       provided by Basis, thus removing all OS-dependent code from this part
1043       of CML.
1044    
1045    5. Changed Real64.precision from 52 to 53.  Minor cleanup in Real64 code.
1046    
1047    ----------------------------------------------------------------------
1048    Name: Matthias Blume (blume (at) tti - c (dot) org)
1049    Date: 2003/09/22 12:10:00 CDT
1050    Tag: blume-20030922-110_43_2
1051    Description:
1052    
1053    Made a new interim version and bootfiles for developer's bootstrapping
1054    convenience.
1055    
1056       110.43.2 -- NEW BOOTFILES
1057    
1058    ----------------------------------------------------------------------
1059    Name: Matthias Blume (blume (at) tti - c (dot) org)
1060    Date: 2003/09/19 15:55:00 CDT
1061    Tag: blume-20030919-cmdir
1062    Description:
1063    
1064    1. new-install.sh -> install.sh
1065    2. changed default CM "metadata" directory name to ".cm" (instead of "CM")
1066    3. tweaked installer so that another name instead of .cm can be chosen
1067       at install time (by setting the CM_DIR_ARC environment variable
1068       during installation); once installation is complete, the name is
1069       fixed
1070    
1071    ----------------------------------------------------------------------
1072    Name: Matthias Blume (blume (at) tti - c (dot) org)
1073    Date: 2003/09/18 16:00:00 CDT
1074    Tag: blume-20030918-110_43_1
1075    Description:
1076    
1077    Made a new interim version and bootfiles for developer's bootstrapping
1078    convenience.
1079    
1080       110.43.1 -- NEW BOOTFILES
1081    
1082    ----------------------------------------------------------------------
1083    Name: Matthias Blume (blume (at) tti - c (dot) org)
1084    Date: 2003/09/18 15:20:00 CDT
1085    Tag: blume-20030918-misc
1086    Description:
1087    
1088    1. Exported fractionsPerSecond etc. from TimeImp (but not from Time as
1089       this seems to be controversial at the moment) and used those in
1090       Posix.ProcEnv.times.
1091    
1092    2. Added Time.{from,to}Nanoseconds to Time.
1093    
1094    3. Improved Real.{from,to}LargeInt by avoiding needless calculations.
1095       For example, fromLargeInt never needs to look at more than 3 "big
1096       digits" to get its 53 bits of precision.
1097    
1098    ----------------------------------------------------------------------
1099    Name: Matthias Blume (blume (at) tti - c (dot) org)
1100    Date: 2003/09/17 16:30:00 CDT
1101    Tag: blume-20030917-real32-slices
1102    Description:
1103    
1104    Added an entry to the primitive environment
1105    (compiler/Semant/statenv/prim.sml) for int32->real64 conversion and
1106    added code to compiler/CodeGen/main/mlriscGen.sml to implement it.
1107    
1108    Removed some of the "magic" constants in real64.sml and replaced them
1109    with code that generates these values from their corresponding
1110    integer counterparts.
1111    
1112    Made all(?) the slice-related changes to the Basis and made everything
1113    compile again...
1114    
1115    ----------------------------------------------------------------------
1116    Name: Matthias Blume (blume (at) tti - c (dot) org)
1117    Date: 2003/09/15 17:45:00 CDT
1118    Tag: blume-20030915-rbase
1119    Description:
1120    
1121    Fixed bug in Real.fromLargeInt.
1122    
1123    ----------------------------------------------------------------------
1124    Name: Matthias Blume (blume (at) tti - c (dot) org)
1125    Date: 2003/09/13 18:11:00 CDT
1126    Tag: blume-20030913-libinstall
1127    Description:
1128    
1129    Minor bugfix in config/libinstall (set anchor with path to
1130    standalone tool after installing it, otherwise libraries that
1131    need ml-lex or ml-yacc won't compile the first time the installer
1132    runs).
1133    
1134    ----------------------------------------------------------------------
1135    Name: Matthias Blume (blume (at) tti - c (dot) org)
1136    Date: 2003/09/12 11:45:00 CDT
1137    Tag: blume-20030912-various
1138    Description:
1139    
1140     - fixed bug in Real.toLargeInt
1141     - fixed bug in Posix.ProcEnv.times
1142     - changed inputLine functions to return an option
1143     - minor installer improvements / bugfixes
1144     - changed default @SMLalloc parameter for x86/celeron to 64k
1145    
1146    ----------------------------------------------------------------------
1147    Name: Matthias Blume (blume (at) tti - c (dot) org)
1148    Date: 2003/09/09 22:00:00 CDT
1149    Tag: Release_110_43
1150    Description:
1151    
1152        New working release 110.43.  New bootfiles.
1153    
1154    ----------------------------------------------------------------------
1155    Name: Matthias Blume (blume (at) tti - c (dot) org)
1156    Date: 2003/09/09 19:20:00 CDT
1157    Tag: blume-20030909-installer
1158    Description:
1159    
1160    Rewrote large parts of config/install.sh in SML (config/libinstall.sml).
1161    Modified config/install.bat to take advantage of it.  Also modified
1162    config/install.sh (and called it config/new-install.sh) to take advantage
1163    of it on Unix systems.  (The SML code is (supposed to be) platform-
1164    independent.)
1165    
1166    The installer can now install everything under Win32
1167    as well as under *nix as long as it compiles.
1168    
1169    Other changes:
1170    
1171      - made CML compile again under Win32
1172      - made eXene compile under Win32 (by providing a fake structure UnixSock
1173        and by using OS.Process.getEnv instead of Posix.ProcEnv.getenv)
1174      - fixed a bug in nowhere: it assumed that type OS.Process.status is the
1175        same as type int;  under Win32 it isn't
1176      - fixed some slice-related problems in the win32-specific parts of CML
1177      - added a functor argument "sameVol" to os-path-fn.sml in the Basis
1178        (under Win32, the volume name is case-insensitive, and the
1179        OS.Path code compares volume names for equality)
1180    
1181    ----------------------------------------------------------------------
1182    Name: Matthias Blume (blume (at) tti - c (dot) org)
1183    Date: 2003/09/08 11:55:00 CDT
1184    Tag: blume-20030908-fullpath
1185    Description:
1186    
1187    Made Win32 version of OS.FileSys.fullPath return current directory
1188    when given an empty string.  This is what the spec says, and incidentally,
1189    CM depends on it.  (CM otherwise goes into an infinite loop in certain
1190    cases when presented with the name of a non-existing .cm file.)
1191    
1192    ----------------------------------------------------------------------
1193    Name: Matthias Blume (blume (at) tti - c (dot) org)
1194    Date: 2003/09/04 16:30:00 CDT
1195    Tag: blume-20030905-slices-etc
1196    Description:
1197    
1198      1. Changed interface to vectors and arrays in Basis to match
1199         (draft) Basis spec.
1200      2. Added signatures and implementations of slices according to
1201         Basis spec.
1202      3. Edited source code throughout the system to make it compile again
1203         under 1. and 2.  (In some cases code had to be added to have it
1204         match the new signatures.)
1205      4. MLRISC should be backward-compatible: the copies of the originals
1206         of files that needed to change under 3. were retained, the .cm files
1207         check the compiler version number and use old versions when
1208         appropriate.
1209      5. Changed type of OS.FileSys.readDir and Posix.FileSys.readdir to
1210         dirstream -> string option (in accordance with Basis spec).
1211      6. When generating code that counts lines, ml-lex used function
1212         CharVector.foldli, taking advantage of its old interface.
1213         This has been replaced with the corresponding code from
1214         CharVectorSlice.  (html-lex must be re-lexed!)
1215      7. BitArray in smlnj-lib/Util has been extended/modified to match the
1216         new MONO_ARRAY signature.  (Do we need BitArraySlice?)
1217      8. Removed temporary additions (fromInternal, toInternal) from the
1218         (now obsolete) IntInf in smlnj-lib/Util.
1219      9. Cleaned up structure Byte.
1220     10. Added localOffset, scan, and fromString to Date (according to spec).
1221         Cleaned/corrected implementation of Date.
1222         (Still need to check for correctness; implement better canonicalizeDate.)
1223     11. Added "scan" to signature IEEE_REAL.
1224     12. Some improvements to IntInf [in particular: efficiency-hack for
1225         mod and rem when second operand is 2 (for parity checks).]
1226     13. Changed representation of type Time.time, using a single IntInf.int
1227         value counting microseconds.  This considerably simplified the
1228         implementation of structure Time.  We now support negative time
1229         values; scan and fromString handle signs.
1230     14. Functor PrimIO now takes two additional arguments (VectorSlice and
1231         ArraySlice).
1232    
1233    ----------------------------------------------------------------------
1234    Name: Matthias Blume (blume (at) tti - c (dot) org)
1235    Date: 2003/08/28 17:00:00 CDT
1236    Tag: blume-20030828-intinf
1237    Description:
1238    
1239    This is a major update which comes with a version number bump
1240    (110.42.99 -- yes, we are really close to 110.43 :-), NEW BOOTFILES,
1241    and an implementation of IntInf in the Basis.
1242    
1243    There are a fairly large number of related changes and updates throughout
1244    the system:
1245    
1246    Basis:
1247            - Implemented IntInf.
1248            - Made LargeInt a projection of IntInf (by filtering through INTEGER).
1249            - Added some missing Real64 operations, most notably Real.toLargeInt.
1250            - Added FixedInt as a synonym for Int32.
1251    
1252    compiler:
1253            * Added support for a built-in intinf type.
1254              - literals
1255              - pattern matching
1256              - conversion shortcuts (Int32.fromLarge o Int.toLarge etc.)
1257              - overloading on literals and operations
1258    
1259            This required adding a primitive type intinf, some additional
1260            primops, and implementations for several non-trivial intinf
1261            operations in Core.  (The intinf type is completely abstract
1262            to the compiler; all operations get delegated back to the Core.)
1263    
1264            * Intinf equality is handled by polyequal.  However, the compiler
1265            does not print its usual warning in this case (since polyequal
1266            is the right thing to do there).
1267    
1268            * Improved the organization of structure InlineT.
1269    
1270            * A word about conversion primops:
1271            If conversions involving intinf do not cancel out during
1272            CPS contract, then the compiler must insert calls to Core functions.
1273            Since all core access must be resolved already during the FLINT
1274            translate phase, it would be too late a the time of CPS contract
1275            to add new Core calls.  For this reason, conversion primops
1276            for intinf carry two arguments:  1. the numeric argument that
1277            they are supposed to convert, and 2. the Core function that
1278            can help with this conversion if necessary.  If CPS contract
1279            eliminates a primop, then the associated Core function becomes
1280            dead and goes away.  Intinf conversion primops that do not get
1281            eliminated by CPS contract get rewritten into calls of their
1282            core functions by a separate, new phase.
1283    
1284    interactive system:
1285            - Control.Print.intinfDepth controls max length of intinf constants
1286            being printed. (Analogous to Control.Print.stringDepth.)
1287            - Cleanup in printutil and pputil: got rid of unused stuff and
1288            duplicates; replaced some of the code with code that makes better
1289            use of library functionality.
1290    
1291    CM:
1292            Bugfix: parse-errors in init group (system/smlnj/init/init.cmi)
1293            are no longer silent.
1294    
1295    CKIT:
1296            Fixed mismatched uses of Int32 and LargeInt.  I always decided
1297            in favor of LargeInt -- which is now the same as IntInf.
1298            CKIT-knowledgable people should check whether this is what's
1299            intended and otherwise change things back to using Int32 or
1300            FixedInt.
1301    
1302    Throughout the code:
1303            Started using IntInf.int literals and built-in operations
1304            (e.g., comparison with 0) where this seems appropriate.
1305    
1306    
1307    ----------------------------------------------------------------------
1308    Name: Dave MacQueen (dbm@cs.uchicago.edu)
1309    Date: 2003/08/13 11:36:00 CDT
1310    Tag: dbm-20030813-mcz-merge1
1311    Description:
1312    
1313    Merging changes from the mcz-branch development branch into trunk.
1314    These changes involve replacement of the emulated old prettyprinter
1315    interface with direct use of the SML/NJ Lib PP library, and fixing
1316    of a couple of bugs (895, 1186) relating to error messages.  A new
1317    prettyprinter for ast datatypes (Elaborator/print/ppast.{sig,sml})
1318    has been added.
1319    
1320    ----------------------------------------------------------------------
1321    Name: Matthias Blume (blume (at) tti - c (dot) org)
1322    Date: 2003/08/11 15:45:00 CDT
1323    Tag: blume-20030811-windows
1324    Description:
1325    
1326    Version number bumped to 110.42.9.  NEW BOOTFILES!!!
1327    
1328        http://smlnj.cs.uchicago.edu/dist/working/110.42.9/
1329    
1330    This patch restores SML/NJ's ability to run under win32.  There are a
1331    number of changes, including fixes for several bugs that had gone
1332    unnoticed until now:
1333    
1334      - uname "CYGWIN_NT*" is recognized as win32 (This is relevant only when
1335        trying to run the win32 version from within cygwin.)
1336    
1337      - There are a number of simple .bat scripts that substitute for their
1338        corresponding Unix shell-scripts.  (See below.)
1339    
1340      - The internals of ml-build have been modified slightly.  The main
1341        difference is that instead of calling ".link-sml" (or link-sml.bat)
1342        using OS.Process.system, the ML process delegates this task back
1343        to the script.  Otherwise problems arise in mixed environments such
1344        as Cygwin where scripts look and work like Unix scripts, but
1345        where OS.Process.system cannot run them.
1346    
1347      - In CM, the srcpath pickler used native pathname syntax -- which
1348        is incorrect in the case of cross-compilation.  The new pickle format
1349        is independent of platform-specific naming conventions.
1350    
1351      - Path configuration files (such as lib/pathconfig) can now choose
1352        between native and standard syntax.  Placing a line of the form
1353    
1354            standard!
1355    
1356        into the file causes all subsequent paths to be interpreted using
1357        CM standard pathname syntax (= Unix conventions); a line
1358    
1359            native!
1360    
1361        switches back to native style.  This was needed so that
1362        path config files can be written portably, see src/system/pathconfig.
1363    
1364      - Runtime system:
1365    
1366          - win32-filesys.c:  get_file_time and set_file_time now
1367            access modification time, not creation time.
1368    
1369          - I/O code made aware of new array representation.
1370    
1371          - Bug fixes in X86.prim.masm.
1372    
1373       - src/system/makeml made aware of win32. (For use under cygwin
1374            and other Unix-environments for windows.)
1375    
1376       - In Basis, fixed off-by-one error in win32-io.sml (function vecF)
1377         which caused BinIO.inputAll to fail consistently.
1378    
1379    .bat scripts:
1380    
1381       Windows .bat scripts assume that SMLNJ_HOME is defined.
1382    
1383       - sml.bat, ml-yacc.bat, ml-lex.bat:  Driver scripts for standalone
1384         applications (sml, ml-yacc, ml-lex).
1385       - ml-build.bat: analogous to ml-build.
1386       - config\install.bat:  Analogous to config/install.sh.  This requires
1387         that SMLNJ_HOME is set and that Microsoft Visual C is ready to use.
1388         (nmake etc. must be on the path, and vcvars32 must have been run.)
1389         Moreover, sources for ml-lex and ml-yacc need to exist under src,
1390         and the bootfile hierarchy must have been unpacked under
1391         sml.boot.x86-win32.
1392         The script is very primitive and does a poor job at error checking.
1393         It only installs the base system, ml-lex, and ml-yacc.  No other
1394         libraries are being installed (i.e., you get only those that
1395         are part of the compiler.)
1396       - link-sml.bat:  analogous to .link-sml, but not currently used
1397    
1398    Unrelated bug fixes:
1399    
1400      - ml-nlffigen now exports structures ST_* corresponding to incomplete
1401        types.
1402      - Added getDevice to PP/src/pp-debug-fn.sml.  (Would not compile
1403        otherwise.)
1404    
1405    ----------------------------------------------------------------------
1406    Name: Dave MacQueen (macqueen@cs.uchicago.edu)
1407    Date: 2003/06/17
1408    Tag: macqueen-20030617-bug895
1409    Description:
1410    
1411    Modified compiler/Elaborator/print/pptype.sml to fix bug 895.
1412    Tag will be used for new development branch (mcz-branch) for
1413    use by MacQueen, (Lucasz) Zairek, and (George) Cao at uchicago.
1414    
1415    ----------------------------------------------------------------------
1416    Name: Matthias Blume (blume (at) tti - c (dot) org)
1417    Date: 2003/05/27 16:55:00 CDT
1418    Tag: blume-20030527-polyeq
1419    Description:
1420    
1421    Tried to eliminated most cases of polymorphic equality.
1422    
1423    ----------------------------------------------------------------------
1424    Name: Matthias Blume (blume (at) tti - c (dot) org)
1425    Date: 2003/05/21 17:45:00 CDT
1426    Tag: blume-20030517-complete
1427    Description:
1428    
1429    Two changes:
1430    
1431      1. Added a flag for controlling whether non-exhaustive bindings will
1432         be treated as errors (default is false).
1433      2. Cleaned up the *entire* source tree so that CMB.make goes through
1434         without a single non-exhaustive match- or bind warning.
1435    
1436    ----------------------------------------------------------------------
1437    Name: Matthias Blume (blume (at) tti - c (dot) org)
1438    Date: 2003/05/17 10:20:00 CDT
1439    Tag: blume-20030517-absyn
1440    Description:
1441    
1442    1. Added cases for IF, WHILE, ANDALSO, and ORELSE to Absyn.
1443    
1444       This mainly affects the quality of error messages.  However, some
1445       of the code is now more straightforward than before. (Treatment of
1446       the above four constructs in translate.sml is much simpler than
1447       the "macro-expansion" that was going on before.  Plus, the mach-
1448       compiler no longer gets invoked just to be able to compile an
1449       if-expression.)
1450    
1451    2. The ErrorMsg.Error exception is now caught and absorbed by the
1452       interactive loop.
1453    
1454    ----------------------------------------------------------------------
1455    Name: Allen Leung
1456    Date: 2003/05/16 13:05:00 CDT
1457    Tag: leunga-20030516-cygwin-runtime
1458    Description:
1459    
1460        Ported the runtime system to cygwin, which uses the unix
1461    x86-unix bin files.  Missing/buggy features:
1462    
1463       o getnetbyname, getnetbyaddr: these functions seem to be missing in
1464         the Cygwin library.
1465       o Ctrl-C handling may be flaky.
1466       o Windows system calls and Windows I/O are not supported.
1467    
1468       A new set of binfiles is located at:
1469    
1470         http://www.dorsai.org/~leunga/boot.x86-unix.tgz
1471    
1472       This is only needed for bootstrapping the cygwin version of smlnj.
1473       Other x86 versions can use the existing binfiles.
1474    
1475    ----------------------------------------------------------------------
1476    Name: Matthias Blume
1477    Date: 2003/04/08 15:42:00 CDT
1478    Tag: blume-20030408-listpair
1479    Description:
1480    
1481    1. Added a target 'mlrisc' to installer.
1482    
1483    2. Added missing elements to structure ListPair.
1484    
1485    ----------------------------------------------------------------------
1486    Name: Allen Leung
1487    Date: 2003/01/07 10:40:00 EST
1488    Tag: leunga-20030107-int-rem
1489    Description:
1490    
1491    Fixed a bug in Int.rem(x,y) where y is a power of 2 on x86.
1492    The arguments to the SUBL instruction were swapped.
1493    
1494    ----------------------------------------------------------------------
1495    Name: Matthias Blume
1496    Date: 2002/12/12 16:25:00 EST
1497    Tag: blume-20021212-risc-ra
1498    Description:
1499    
1500    Fixed a serious bug in the rewrite code for FP spilling/reloading that
1501    sent the RA into an infinite loop when floating point registers get
1502    spilled.  (Because of this bug, e.g., nucleic stopped compiling between
1503    110.37 and 110.38.)
1504    There was another set of potential problems related to the handling of
1505    MLRISC annotations (but those did not yet cause real problems, apparently).
1506    
1507    ----------------------------------------------------------------------
1508    Name: Matthias Blume
1509    Date: 2002/12/06 22:40:00 EST
1510    Tag: blume-20021206-cm-fileid
1511    Description:
1512    
1513    Added a call of SrcPath.sync at the beginning of Parse.parse (in CM).
1514    This fixes the problem of CM getting confused by files that suddenly
1515    change their identity (e.g., by getting unlinked and recreated by some
1516    text editor such as vi).  There might be a better/cheaper/cleaner way
1517    of doing this, but for now this will have to do.
1518    
1519    ----------------------------------------------------------------------
1520    Name: Matthias Blume
1521    Date: 2002/10/28 09:50:00 EST
1522    Tag: blume-20021028-typecheck
1523    Description:
1524    
1525    Exported structure Typecheck from $smlnj/viscomp/core.cm.
1526    
1527    ----------------------------------------------------------------------
1528    Name: Matthias Blume
1529    Date: 2002/10/17 09:10:00 EDT
1530    Tag: Release_110_42
1531    Description:
1532    
1533    In good old tradition, there has been a slight hiccup so that we have
1534    to patch 110.42 after the fact.   The old release tag has been replaced
1535    (see below).
1536    
1537    The change solves a problem with two competing approaches the
1538    configuration problem regarding MacOS 10.1 vs. MacOS 10.2 which got in
1539    each other's way.
1540    
1541    This change only affects the runtime system code and the installer script.
1542    (No new bootfiles.)
1543    
1544    ----------------------------------------------------------------------
1545    Name: Matthias Blume
1546    Date: 2002/10/16 12:00:00 EDT
1547    Tag: Release_110_42_removed
1548    Description:
1549    
1550    New working release.  New bootfiles.
1551    
1552    ----------------------------------------------------------------------
1553    Name: Matthias Blume
1554    Date: 2002/10/10 13:10:00 EDT
1555    Tag: blume-20021010-ppc-divs
1556    Description:
1557    
1558    The mltree operator DIVS must be implemented with an overflow check on
1559    the PPC because the hardware indicates divide-by-zero using "overflow" as
1560    well.
1561    
1562    ----------------------------------------------------------------------
1563    Name: Matthias Blume
1564    Date: 2002/07/23 11:45:00
1565    Tag: blume-20020723-smlnj-home
1566    Description:
1567    
1568    Sml now senses the SMLNJ_HOME environment variable.  If this is set,
1569    then the bin dir is assumed to be in $SMLNJ_HOME/bin and (unless
1570    CM_PATHCONFIG is also set), the path configuration file is assumed
1571    to be in $SMLNJ_HOME/lib/pathconfig.  This way one can easily move
1572    the entire tree to some other place and everything will "just work".
1573    
1574    (Companion commands such as ml-build and ml-makedepend also sense this
1575    variable.)
1576    
1577    ----------------------------------------------------------------------
1578    Name: Matthias Blume
1579    Date: 2002/07/12 21:19:00 EDT
1580    Tag: blume-20020712-liveness
1581    Description:
1582    
1583    Exported two useful "step" functions from liveness module (MLRISC).
1584    
1585    ----------------------------------------------------------------------
1586    Name: Matthias Blume
1587    Date: 2002/07/05 16:00 EDT
1588    Tag: Release_110_41
1589    Description:
1590    
1591    New working release.  New bootfiles.
1592    
1593    ----------------------------------------------------------------------
1594    Name: Matthias Blume
1595    Date: 2002/07/05 10:25:00 EDT
1596    Tag: blume-20020705-btimp
1597    Description:
1598    
1599    Exported structure BTImp from $smlnj/viscomp/debugprof.cm so that
1600    other clients can set up backtracing support.
1601    
1602    ----------------------------------------------------------------------
1603    Name: Matthias Blume
1604    Date: 2002/06/25 17:23:00 EDT
1605    Tag: blume-20020625-fpmax
1606    Description:
1607    
1608    Fixed a bug in translation of INLMAX (and INLMIN) for the floating-point
1609    case.  (The sense of the isNaN test was reversed -- which made min and
1610    max always return their first argument.)
1611    
1612    ----------------------------------------------------------------------
1613    Name: Matthias Blume
1614    Date: 2002/06/11
1615    Tag: blume-20020611-unixpath
1616    Description:
1617    
1618    Back-ported OS.Path.{from,to}UnixPath from idlbasis-devel branch.
1619    
1620    ----------------------------------------------------------------------
1621    Name: Matthias Blume
1622    Date: 2002/06/10 16:35:00 EDT
1623    Tag: blume-20020610-ieeereal
1624    Description:
1625    
1626    I back-ported my implementation of IEEEReal.fromString from the
1627    idlbasis-devel branch so that we can test it.
1628    
1629    Another small change is that ppDec tries to give more information
1630    than just "<sig>" in the case of functors.  However, this code is
1631    broken in some mysterious way if the functor's body's signature
1632    has not been declared by ascription but gets inferred from the
1633    implementation.  This needs fixing...
1634    
1635    ----------------------------------------------------------------------
1636    Name: Matthias Blume
1637    Date: 2002/05/31
1638    Tag: blume-20020531-btrace-mode
1639    Description:
1640    
1641    Resurrected SMLofNJ.Internals.BTrace.mode.  (It accidentally fell by
1642    the wayside when I switched over to using Controls everywhere.)
1643    
1644    ----------------------------------------------------------------------
1645    Name: Lal George
1646    Date: 2002/05/23 12:21:40 EDT
1647    Tag: george-20020523-visual-labels
1648    Description:
1649    
1650    Labels are now displayed in the graphical output to make
1651    the fall-through and target blocks obvious.
1652    
1653    ----------------------------------------------------------------------
1654    Name: Matthias Blume
1655    Date: 2002/05/22 11:03:00 EDT
1656    Tag: blume-20020522-shrink
1657    Description:
1658    
1659    John tweaked yesterday's fix for 1131 to handle an out-of-memory
1660    situation that comes up when allocating huge arrays.
1661    
1662    ----------------------------------------------------------------------
1663    Name: Matthias Blume
1664    Date: 2002/05/21 16:00:00 EDT
1665    Tag: Release_110_40
1666    Description:
1667    
1668    New working release (110.40).  New bootfiles.
1669    
1670    [Also: John Reppy fixed GC bug 1131.]
1671    
1672    ----------------------------------------------------------------------
1673    Name: Matthias Blume
1674    Date: 2002/05/21 12:35:00 EDT
1675    Tag: blume-20020521-cmdoc
1676    Description:
1677    
1678    CM documentation update.
1679    
1680    ----------------------------------------------------------------------
1681    Name: Matthias Blume
1682    Date: 2002/05/21 10:55:00 EDT
1683    Tag: blume-20020521-misc
1684    Description:
1685    
1686    - John tweaked runtime to be silent on heap export (except when
1687      GC messages are on).
1688    - I added a few more things (cross-compiling versions of CMB) to
1689      config/preloads (as suggestions).
1690    
1691    ----------------------------------------------------------------------
1692    Name: Matthias Blume
1693    Date: 2002/05/20 22:25:00 EDT
1694    Tag: blume-20020520-controls
1695    Description:
1696    
1697    - Added ControlUtil structure to control-lib.cm.
1698    - Use it throughout.
1699    - Used Controls facility to define MLRISC controls (as opposed to
1700      registering MLRISC control ref cells with Controls after the fact)
1701    - Fixed messed-up controls priorities.
1702    
1703    * Removed again all the stuff from config/preloads that one wouldn't
1704      be able to preload at the time the initial heap image is built.
1705      (Many libraries, e.g., CML, do not exist yet at this time.  The
1706       only libraries that can be preloaded via config/preloads are those
1707       that come bundled with the bootfiles.)
1708    
1709    ----------------------------------------------------------------------
1710    Name: Matthias Blume
1711    Date: 2002/05/20 10:59:00 EDT
1712    Tag: blume-20020520-preloads
1713    Description:
1714    
1715    Added a lot of commented-out suggestions for things to be included
1716    in config/preloads.
1717    
1718    ----------------------------------------------------------------------
1719    Name: Allen Leung
1720    Date: 2002/05/18 14:20:00 EDT
1721    Tag: leunga-20020518-mdl
1722    Description:
1723    
1724    o Made the mdl tool stuff compile and run again.
1725    o I've disabled all the stuff that depends on RTL specifications; they
1726      are all badly broken anyway.
1727    
1728    ----------------------------------------------------------------------
1729    Name: Matthias Blume
1730    Date: 2002/05/17 16:49:00 EDT
1731    Tag: blume-20020517-controls
1732    Description:
1733    
1734    0. John Reppy made several modifications to the SML/NJ library.
1735       In particular, there is a shiny new controls-lib.cm.
1736    
1737    1. Pushed new controls interface through compiler so that everything
1738       compiles again.
1739    
1740    2. Added FormatComb and FORMAT_COMB to the CML version of the
1741       SML/NJ library (so that CML compiles again).
1742    
1743    3. Modified init scripts because XXX_DEFAULT environment variables
1744       are no longer with us.  (Boot-time initialization is now done
1745       using the same environment variables that are also used for
1746       startup-time initialization of controls.)
1747    
1748    ----------------------------------------------------------------------
1749    Name: Lal George
1750    Date: 2002/05/15 09:20:10 EDT
1751    Tag: george-20020515-pseudo-op-decls
1752    Description:
1753    
1754            All pseudo-ops emitted before the first segment declaration
1755    such as TEXT, DATA, and BSS directives are assumed to be global
1756    declarations and are emitted first in the assembly file. This is
1757    useful in a number of situations where one has pseudo-ops that are not
1758    specific to any segment, and also works around the constraint that one
1759    cannot have client pseudo-ops in the TEXT segment.
1760    
1761            Because no segment is associated with these declarations it is
1762    an error to allocate any space or objects before the first segment
1763    directive and an exception will be raised. However, we cannot make
1764    this check for client pseudo-ops.
1765    
1766            These top level declarations are a field in the CFG graph_info.
1767    In theory you can continue to add to this field after the CFG has been
1768    built -- provided you know what you are doing;-)
1769    
1770    ----------------------------------------------------------------------
1771    Name: Matthias Blume
1772    Date: 2002/05/13 16:40:00 EDT
1773    Tag: blume-20020513-pp-etc
1774    Description:
1775    
1776    A few minor bugfixes:
1777    
1778      - Stopgap measure for bug recently reported by Elsa Gunter (ppDec).
1779        (Bogus printouts for redefined bindings still occur.  Compiler
1780        bug should no longer occur now.  We need to redo the prettyprinter
1781        from scratch.)
1782    
1783      - CM pathname printer now also adds escape sequences for ( and )
1784    
1785      - commend and docu fixes for ml-nlffi
1786    
1787    ----------------------------------------------------------------------
1788    Name: Matthias Blume
1789    Date: 2002/05/10 16:40:00 EDT
1790    Tag: blume-20020510-erg-textio
1791    Description:
1792    
1793    Applied the following bugfix provided by Emden Gansner:
1794    
1795        Output is corrupted when outputSubstr is used rather than output.
1796    
1797        The problem occurs when a substring
1798    
1799            ss = (s, dataStart, dataLen)
1800    
1801        where dataStart > 0, fills a stream buffer with avail bytes left.
1802        avail bytes of s, starting at index dataStart, are copied into the
1803        buffer, the buffer is flushed, and then the remaining dataLen-avail
1804        bytes of ss are copied into the beginning of the buffer. Instead of
1805        starting this copy at index dataStart+avail in s, the current code
1806        starts the copy at index avail.
1807    
1808        Fix:
1809        In text-io-fn.sml, change line 695 from
1810             val needsFlush = copyVec(v, avail, dataLen-avail, buf, 0)
1811        to
1812             val needsFlush = copyVec(v, dataStart+avail, dataLen-avail, buf, 0)
1813    
1814    ----------------------------------------------------------------------
1815    Name: Matthias Blume
1816    Date: 2002/04/12 13:55:00 EDT
1817    Tag: blume-20020412-assyntax
1818    Description:
1819    
1820    1. Grabbed newer assyntax.h from the XFree86 project.
1821    2. Fiddled with how to compile X86.prim.asm without warnings.
1822    3. (Very) Minor cleanup in CM.
1823    
1824    ----------------------------------------------------------------------
1825    Name: Matthias Blume
1826    Date: 2002/04/01 (no joke!) 17:07:00 EST
1827    Tag: blume-20020401-x86div
1828    Description:
1829    
1830    Added full support for div/mod/rem/quot on the x86, using the machine
1831    instruction's two results (without clumsily recomputing the remainder)
1832    directly where appropriate.
1833    
1834    Some more extensive power-of-two support was added to the x86 instruction
1835    selector (avoiding expensive divs, mods, and muls where they can be
1836    replaced with cheaper shifts and masks).  However, this sort of thing
1837    ought to be done earlier, e.g., within the CPS optimizer so that
1838    all architectures benefit from it.
1839    
1840    The compiler compiles to a fixed point, but changes might be somewhat
1841    fragile nevertheless.  Please, report any strange things that you might
1842    see wrt. div/mod/quot/rem...
1843    
1844    ----------------------------------------------------------------------
1845    Name: Matthias Blume
1846    Date: 2002/03/29 17:22:00
1847    Tag: blume-20020329-div
1848    Description:
1849    
1850    Fixed my broken div/mod logic.  Unfortunately, this means that the
1851    inline code for div/mod now has one more comparison than before.
1852    Fast paths (quotient > 0 or remainder = 0) are not affected, though.
1853    The problem was with quotient = 0, because that alone does not tell
1854    us which way the rounding went.  One then has to look at whether
1855    remainder and divisor have the same sign...  :(
1856    
1857    Anyway, I replaced the bootfiles with fresh ones...
1858    
1859    ----------------------------------------------------------------------
1860    Name: Matthias Blume
1861    Date: 2002/03/29 14:10:00 EST
1862    Tag: blume-20020329-inlprims
1863    Description:
1864    
1865    NEW BOOTFILES!!!    Version number bumped to 110.39.3.
1866    
1867    Primops have changed. This means that the bin/boot-file formats have
1868    changed as well.
1869    
1870    To make sure that there is no confusion, I made a new version.
1871    
1872    
1873    CHANGES:
1874    
1875    * removed REMT from mltree (remainder should never overflow).
1876    
1877    * added primops to deal with divisions of all flavors to the frontend
1878    
1879    * handled these primops all the way through so they map to their respective
1880      MLRISC support
1881    
1882    * used these primops in the implementation of Int, Int32, Word, Word32
1883    
1884    * removed INLDIV, INLMOD, and INLREM as they are no longer necessary
1885    
1886    * parameterized INLMIN, INLMAX, and INLABS by a numkind
1887    
1888    * translate.sml now deals with all flavors of INL{MIN,MAX,ABS}, including
1889      floating point
1890    
1891    * used INL{MIN,MAX,ABS} in the implementation of Int, Int32, Word, Word32,
1892      and Real (but Real.abs maps to a separate floating-point-only primop)
1893    
1894    
1895    TODO items:
1896    
1897    * Hacked Alpha32 instruction selection, disabling the selection of REMx
1898      instructions because the machine instruction encoder cannot handle
1899      them.  (Hppa, PPC, and Sparc instruction selection did not handle
1900      REM in the first place, and REM is supported by the x86 machine coder.)
1901    
1902    * Handle DIV and MOD with DIV_TO_NEGINF directly in the x86 instruction
1903      selection phase.  (The two can be streamlined because the hardware
1904      delivers both quotient and remainder at the same time anyway.)
1905    
1906    * Think about what to do with "valOf(Int32.minInt) div ~1" and friends.
1907      (Currently the behavior is inconsistent both across architectures and
1908      wrt. the draft Basis spec.)
1909    
1910    * Word8 should eventually be handled natively, too.
1911    
1912    * There seems to be one serious bug in mltree-gen.sml.  It appears, though,
1913      as if there currently is no execution path that could trigger it in
1914      SML/NJ.  (The assumptions underlying functions arith and promotable do not
1915      hold for things like multiplication and division.)
1916    
1917    ----------------------------------------------------------------------
1918    Name: Matthias Blume
1919    Date: 2002/03/27 16:27:00 EST
1920    Tag: blume-20020327-mlrisc-divisions
1921    Description:
1922    
1923    Added support for all four division operations (ML's div, mod, quot,
1924    and rem) to MLRISC.  In the course of doing so, I also rationalized
1925    the naming (no more annoying switch-around of DIV and QUOT), by
1926    parameterizing the operation by div_rounding_mode (which can be either
1927    DIV_TO_ZERO or DIV_TO_NEGINF).
1928    
1929    The generic MLTreeGen functor takes care of compiling all four
1930    operations down to only round-to-zero div.
1931    
1932    Missing pieces:
1933    
1934      * Doing something smarter than relying on MLTreeGen on architectures
1935        like, e.g., the x86 where hardware division delivers both quotient and
1936        remainder at the same time.  With this, the implementation of the
1937        round-to-neginf operations could be further streamlined.
1938    
1939      * Remove inlining support for div/mod/rem from the frontend and replace it
1940        with primops that get carried through to the backend.  Do this for all
1941        int and word types.
1942    
1943    ----------------------------------------------------------------------
1944    Name: Matthias Blume
1945    Date: 2002/03/25 17:25:00 EST
1946    Tag: blume-20020325-divmod
1947    Description:
1948    
1949    I improved (hopefully without breaking them) the implementation of Int.div,
1950    Int.mod, and Int.rem.   For this, the code in translate.sml now takes
1951    advantage of the following observations:
1952    
1953      Let  q = x quot y      r = x rem y
1954           d = x div  y      m = x mod y
1955    
1956    where "quot" is the round-to-zero version of integer division that
1957    hardware usually provides.  Then we have:
1958    
1959         r = x - q * y        where neither the * nor the - will overflow
1960         d = if q >= 0 orelse x = q * y then q else q - 1
1961                              where neither the * nor the - will overflow
1962         m = if q >= 0 orelse r = 0 then r else r + y
1963                              where the + will not overflow
1964    
1965    This results in substantial simplification of the generated code.
1966    The following table shows the number of CFG nodes and edges generated
1967    for
1968            fun f (x, y) = x OPER y
1969            (* with OPER \in div, mod, quot, rem *)
1970    
1971    
1972        OPER | nodes(old) | edges(old) | nodes(new) | edges(new)
1973        --------------------------------------------------------
1974         div |         24 |         39 |         12 |         16
1975         mod |         41 |         71 |         12 |         16
1976        quot |          8 |         10 |          8 |         10
1977         rem |         10 |         14 |          8 |         10
1978    
1979    
1980    ----------------------------------------------------------------------
1981    Name: Matthias Blume
1982    Date: 2002/03/25 22:06:00 EST
1983    Tag: blume-20020325-cprotobug
1984    Description:
1985    
1986    Fixed a bug in cproto (c prototype decoder).
1987    
1988    ----------------------------------------------------------------------
1989    Name: Matthias Blume
1990    Date: 2002/03/25 16:00:00 EST
1991    Tag: blume-20020325-raw-primops
1992    Description:
1993    
1994    I did some cleanup to Allen's new primop code and
1995    replaced yesterday's bootfiles with new ones.
1996    (But they are stored in the same place.)
1997    
1998    ----------------------------------------------------------------------
1999    Name: Matthias Blume
2000    Date: 2002/03/24 22:40:00 EST
2001    Tag: blume-20020324-bootfiles
2002    Description:
2003    
2004    Made the bootfiles that Allen asked for.
2005    
2006    ----------------------------------------------------------------------
2007    Name: Allen Leung
2008    Date: 2002/03/23 15:50:00 EST
2009    Tag: leunga-20020323-flint-cps-rcc-primops
2010    Description:
2011    
2012      1. Changes to FLINT primops:
2013    
2014        (* make a call to a C-function;
2015         * The primop carries C function prototype information and specifies
2016         * which of its (ML-) arguments are floating point. C prototype
2017         * information is for use by the backend, ML information is for
2018         * use by the CPS converter. *)
2019      | RAW_CCALL of { c_proto: CTypes.c_proto,
2020                       ml_args: ccall_type list,
2021                       ml_res_opt: ccall_type option,
2022                       reentrant : bool
2023                     } option
2024       (* Allocate uninitialized storage on the heap.
2025        * The record is meant to hold short-lived C objects, i.e., they
2026        * are not ML pointers.  With the tag, the representation is
2027        * the same as RECORD with tag tag_raw32 (sz=4), or tag_fblock (sz=8)
2028        *)
2029      | RAW_RECORD of {tag:bool,sz:int}
2030      and ccall_type = CCALL_INT32 | CCALL_REAL64 | CCALL_ML_PTR
2031    
2032      2.  These CPS primops are now overloaded:
2033    
2034           rawload of {kind:numkind}
2035           rawstore of {kind:numkind}
2036    
2037          The one argument form is:
2038    
2039             rawload {kind} address
2040    
2041          The two argument form is:
2042    
2043             rawload {kind} [ml object, byte-offset]
2044    
2045      3. RAW_CCALL/RCC now takes two extra arguments:
2046    
2047         a. The first is whether the C call is reentrant, i.e., whether
2048            ML state should be saved and restored.
2049         b. The second argument is a string argument specifying the name of
2050            library and the C function.
2051    
2052         These things are currently not handled in the code generator, yet.
2053    
2054      4. In CProto,
2055    
2056         An encoding type of "bool" means "ml object" and is mapped into
2057         C prototype of PTR.  Note that "bool" is different than "string",
2058         even though "string" is also mapped into PTR, because "bool"
2059         is assigned an CPS type of BOGt, while "string" is assigned INT32t.
2060    
2061      5. Pickler/unpicker
2062    
2063         Changed to handle RAW_RECORD and newest RAW_CCALL
2064    
2065      6. MLRiscGen,
2066    
2067         1. Changed to handle the new rawload/rawstore/rawrecord operators.
2068         2. Code for handling C Calls has been moved to a new module CPSCCalls,
2069            in the file CodeGen/cpscompile/cps-c-calls.sml
2070    
2071      7. Added the conditional move operator
2072    
2073             condmove of branch
2074    
2075         to cps.  Generation of this is still buggy so it is currently
2076         disabled.
2077    
2078    ----------------------------------------------------------------------
2079  Name: Lal George  Name: Lal George
2080  Date: 2002/03/22 14:18:25 EST  Date: 2002/03/22 14:18:25 EST
2081  Tag: george-20020322-cps-branch-prob  Tag: george-20020322-cps-branch-prob

Legend:
Removed from v.1171  
changed lines
  Added in v.1652

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0