377 |
|
|
378 |
The default of n is 3. |
The default of n is 3. |
379 |
|
|
|
---------------------------------------------------------------------- |
|
|
|
|
380 |
====================================================================== |
====================================================================== |
381 |
CM |
Boot code and glue scripts |
382 |
====================================================================== |
====================================================================== |
383 |
|
|
384 |
Name: Matthias Blume |
Size info in BOOTLIST |
|
Date: 2000/03/07 04:01:04 |
|
|
Tag: blume_main_v110_26_2 |
|
|
Description: |
|
|
- size info in BOOTLIST |
|
|
* no fixed upper limits for number of bootfiles or length of |
|
|
bootfile names in runtime |
|
|
* falling back to old behavior if no BOOTLIST size info found |
|
|
- allocation size heuristics in .run-sml |
|
|
* tries to read cache size from /proc/cpuinfo (this is important for |
|
|
small-cache Celeron systems!) |
|
|
- install.sh robustified |
|
|
- CM manual updates |
|
|
- paranoid mode |
|
|
* no more CMB.deliver() (i.e., all done by CMB.make()) |
|
|
* can re-use existing sml.boot.* files |
|
|
* init.cmi now treated as library |
|
|
* library stamps for consistency checks |
|
|
- sml.boot.<arch>-<os>/PIDMAP file |
|
|
* This file is read by the CM startup code. This is used to minimize |
|
|
the amount of dynamic state that needs to be stowed away for the |
|
|
purpose of sharing between interactive system and user code. |
|
|
- CM.Anchor.anchor instead of CM.Anchor.{set,cancel} |
|
|
* Upon request by Elsa. Anchors now controlled by get-set-pair |
|
|
like most other CM state variables. |
|
|
- Compiler.CMSA eliminated |
|
|
* No longer supported by CM anyway. |
|
|
- fixed bugs in pickler that kept biting Stefan |
|
|
* past refs to past refs (was caused by the possibility that |
|
|
ad-hoc sharing is more discriminating than hash-cons sharing) |
|
|
* integer overflow on LargeInt.minInt |
|
|
- ml-{lex,yacc} build scripts now use new mechanism |
|
|
for building standalone programs |
|
|
- fixed several gcc -Wall warnings that were caused by missing header |
|
|
files, missing initializations, etc., in runtime (not all warnings |
|
|
eliminated, though) |
|
385 |
|
|
386 |
---------------------------------------------------------------------- |
The BOOTLIST file now has an optional first line that specifies an |
387 |
Name: Matthias Blume |
upper bound on the number of boot files and an upper bound on the |
388 |
Date: 2000/03/09 10:23:53 |
length of each individual name. With this, there are no longer |
389 |
Tag: blume_main_v110p26p1_0 |
hard-wired restrictions on these values in the runtime system. |
390 |
Description: |
(If the specification is missing in BOOTLIST, the runtime system |
391 |
|
falls back to its old behavior, i.e., hard-wired defaults.) |
392 |
* Complete re-organization of library names. Many libraries have been |
|
393 |
consolidated so that they share the same path anchor. For example, |
Allocation-size heuristics in .run-sml |
394 |
all MLRISC-related libraries are anchored at MLRISC, most libraries that |
|
395 |
are SML/NJ-specific are under "smlnj". Notice that names like |
The .run-sml scripts tries to read processor cache size from |
396 |
host-cmb.cm or host-compiler.cm no longer exist. See system/README |
/proc/cpuinfo. This works on Linux and is important for small-cache |
397 |
for a complete description of the new naming scheme. Quick reference: |
Celeron systems that suffer badly when allocation size is set too |
398 |
|
high. |
399 |
|
|
400 |
|
Install script |
401 |
|
|
402 |
|
- Written in a more modular fashion (using shell functions). |
403 |
|
- Made more robust. |
404 |
|
- Automagically fetches archive files over the network if they do not |
405 |
|
exist locally. Thus, you only need to fetch config.tar.gz yourself. |
406 |
|
Unpack it and go! |
407 |
|
(Requires "wget" or "lynx" to be installed on the system and a |
408 |
|
live connection to the internet. Moreover, the contents of |
409 |
|
config/srcarchiveurl must be set properly.) |
410 |
|
For CVS users, this may be convenient when fetching new sets of binfiles. |
411 |
|
- Handles archive files with or without version number and compressed |
412 |
|
with one of "gzip", "compress", or "bzip2". Recognized suffixes are |
413 |
|
".tar.gz", ".tgz", ".tar", ".tar.Z", and ".tar.bz2". |
414 |
|
|
415 |
|
PIDMAP file |
416 |
|
|
417 |
|
There is a file called PIDMAP in the bootfile directory. |
418 |
|
It is used to minimize the amount of dynamic state that needs to be |
419 |
|
stowed away for the purpose of sharing between interactive system |
420 |
|
and user code. |
421 |
|
|
422 |
|
Building standalone programs |
423 |
|
|
424 |
|
The command ml-build can be used to build standalone programs. |
425 |
|
ml-build takes three arguments: |
426 |
|
|
427 |
|
1. the name of the CM library that implements and exports the "main" |
428 |
|
function of your program |
429 |
|
2. the name of the "main" function of your program as exported by 1. |
430 |
|
(The function must have a type that makes it suitable as an argument |
431 |
|
to SMLofNJ.exportFn.) |
432 |
|
3. the name of the heapfile to be generated |
433 |
|
|
434 |
host-cmb.cm -> smlnj/cmb.cm |
Other build scripts |
|
host-compiler.cm -> smlnj/compiler.cm |
|
|
full-cm.cm -> smlnj/cm.cm |
|
|
<arch>-<os>.cm -> smlnj/cmb/<arch>-<os>.cm |
|
|
<arch>-compiler.cm -> smlnj/compiler/<arch>.cm |
|
435 |
|
|
436 |
* Bug fixes in CM. |
ml-{lex,yacc} build scripts now make use of the new mechanism for |
437 |
- exceptions in user code are being passed through (i.e., reach top level) |
building standalone programs. |
|
- more bugs in paranoia mode fixed |
|
|
- bug related to checking group owners fixed |
|
438 |
|
|
439 |
* New install.sh script that automagically fetches archive files: |
Fixpoint script |
|
The new file config/srcarchiveurl must contain the URL of the |
|
|
(remote) directory that contains bin files (or other source archives). |
|
|
If install.sh does not find the archive locally, it tries to get |
|
|
it from that remote directory. |
|
|
This should simplify installation further: For machines that have |
|
|
access to the internet, just fetch <version>-config.tgz, unpack it, |
|
|
edit config/targets, and go (run config/install.sh). The scipt will |
|
|
fetch everything else that it might need all by itself. |
|
|
|
|
|
For CVS users, this mechanism is not relevant for source archives, but |
|
|
it is convenient for getting new sets of binfiles. |
|
|
|
|
|
Archives should be tar files compressed with either gzip, compress, or |
|
|
bzip2. The script recognizes .tgz, .tar, tar.gz, tz, .tar.Z, and .tar.bz2. |
|
|
|
|
|
---------------------------------------------------------------------- |
|
|
Name: Matthias Blume |
|
|
Date: 2000/03/10 07:48:34 |
|
|
Tag: blume_main_v110p26p1_1 |
|
|
Description: |
|
440 |
|
|
441 |
I added a re-written version of Dave's fixpt script to src/system. |
I added a re-written version of Dave's fixpt script to src/system. |
442 |
Changes relative to the original version: |
Changes relative to the original version: |
470 |
move through what exists before continuing where it left off earlier, |
move through what exists before continuing where it left off earlier, |
471 |
and, thus, saves a lot of time. |
and, thus, saves a lot of time. |
472 |
|
|
473 |
---------------------------------------------------------------------- |
Runtime system code |
474 |
Name: Matthias Blume |
|
475 |
Date: 2000/03/14 14:15:32 |
- fixed several gcc -Wall warnings that were caused by missing header |
476 |
Tag: blume_main_v110p26p1_2 |
files, missing initializations, etc., in runtime (not all warnings |
477 |
Description: |
eliminated, though) |
478 |
|
- hand to "un-fix" some of them later because they broke the HPPA compile |
479 |
1. Tools.registerStdShellCmdTool (from smlnj/cm/tool.cm) takes an |
|
480 |
additional argument called "template" which is an optional string that |
====================================================================== |
481 |
specifiel the layout of the tool command line. See the CM manual for |
CM |
482 |
explanation. |
====================================================================== |
483 |
|
|
484 |
2. A special-purpose tool can be "regisitered" by simply dropping the |
Several manual updates |
485 |
corresponding <...>-tool.cm (and/or <...>-ext.cm) into the same |
|
486 |
directory where the .cm file lives that uses this tool. (The |
I always try to keep the manual in sync with CM's latest features. |
487 |
behavior/misfeature until now was to look for the tool description |
|
488 |
files in the current working directory.) As before, tool description |
Bootstrap compilation |
|
files could also be anchored -- in which case they can live anywhere |
|
|
they like. Following the recent e-mail discussion, this change should |
|
|
make it easier to have special-purpose tools that are shipped together |
|
|
with the sources of the program that uses them. |
|
|
|
|
|
---------------------------------------------------------------------- |
|
|
Name: Matthias Blume |
|
|
Date: 2000/03/30 18:00:00 JST |
|
|
Tag: blume_main_v110p26p2_0 |
|
|
Description: |
|
|
|
|
|
!!!!! WARNING !!!!!! |
|
|
!! New binfiles !! |
|
|
!!!!!!!!!!!!!!!!!!!! |
|
|
|
|
|
This update contains: |
|
|
|
|
|
1. Moderate changes to CM: |
|
|
|
|
|
- Changes to CM's tools mechanism. In particular, it is now possible |
|
|
to have tools that accept additional "command line" parameters |
|
|
(specified in the .cm file at each instance where the tool's class is |
|
|
used). |
|
|
|
|
|
This was done to accomodate the new "make" and "shell" tools which |
|
|
facilitate fairly seemless hookup to portions of code managed using |
|
|
Makefiles or Shell scripts. |
|
|
|
|
|
There are no classes "shared" or "private" anymore. Instead, the |
|
|
sharing annotation is now a parameter to the "sml" class. |
|
|
|
|
|
There is a bit of generic machinery for implementing one's own |
|
|
tools that accept command-line parameters. However, I am not yet fully |
|
|
satisfied with that part, so expect changes here in the future. |
|
489 |
|
|
490 |
All existing tools are described in the CM manual. |
No more "CMB.deliver" |
491 |
|
|
492 |
- Slightly better error handling. (CM now surpresses many followup |
- All work is done by CMB.make (as it used to be in the old CM). |
493 |
error messages that tended to be more annoying than helpful.) |
- CMB.make can be used even with existing bootfiles, i.e., bootfiles do |
494 |
|
not have to be removed beforehand. |
495 |
|
- In "paranoid mode" CM checks a stable libraries CRC checksum to |
496 |
|
verify that it is "valid". (In "normal mode", such checks do not |
497 |
|
occur.) Paranoid mode is used for bootstrap compilation. This is |
498 |
|
what makes it possible to re-use existing bootfiles. |
499 |
|
|
500 |
|
Initial glue code (init.cmi) |
501 |
|
|
502 |
|
- treated as a genuine library now |
503 |
|
- there are no more "built-in" modules |
504 |
|
|
505 |
|
CM API |
506 |
|
|
507 |
|
CM.Anchor.anchor instead of CM.Anchor.{set,cancel} |
508 |
|
- Upon request by Elsa. Anchors now controlled by get-set-pair |
509 |
|
like most other CM state variables. |
510 |
|
|
511 |
|
CM tools: |
512 |
|
- It is now possible to have tools that accept additional |
513 |
|
"command line" parameters (specified in the .cm file at each |
514 |
|
instance where the tool's class is used). |
515 |
|
|
516 |
|
- The parser understands named parameters and recursive options. |
517 |
|
|
518 |
2. Major changes to the compiler's static environment data structures. |
- new "make" and "shell" tools added |
519 |
|
* facilitate fairly seemless hookup to portions of code |
520 |
|
managed using Makefiles or Shell scripts. |
521 |
|
|
522 |
|
- There are no classes "shared" or "private" anymore. Instead, |
523 |
|
the sharing annotation is now a parameter to the "sml" class. |
524 |
|
|
525 |
|
- Tools.registerStdShellCmdTool (from smlnj/cm/tool.cm) takes an |
526 |
|
additional argument called "template" which is an optional |
527 |
|
string that specifiel the layout of the tool command line. See |
528 |
|
the CM manual for explanation. |
529 |
|
|
530 |
|
- A special-purpose tool can be "registered" by simply dropping |
531 |
|
the corresponding <...>-tool.cm (and/or <...>-ext.cm) into the |
532 |
|
same directory where the .cm file lives that uses this tool. |
533 |
|
(The behavior/misfeature until now was to look for the tool |
534 |
|
description files in the current working directory.) As |
535 |
|
before, tool description files could also be anchored -- in |
536 |
|
which case they can live anywhere they like. Following the |
537 |
|
recent e-mail discussion, this change should make it easier to |
538 |
|
have special-purpose tools that are shipped together with the |
539 |
|
sources of the program that uses them. |
540 |
|
Bug: such a tool does not get un-registered after being done |
541 |
|
|
542 |
|
Library names |
543 |
|
|
544 |
|
Library names have been completely re-organized. |
545 |
|
Many libraries have been consolidated so that they share the same |
546 |
|
path anchor. For example, all MLRISC-related libraries are |
547 |
|
anchored at MLRISC, most libraries that are SML/NJ-specific are |
548 |
|
under "smlnj". Notice that names like host-cmb.cm or |
549 |
|
host-compiler.cm no longer exist. See system/README for a |
550 |
|
complete description of the new naming scheme. Quick reference: |
551 |
|
|
552 |
- no CMStaticEnv anymore. |
host-cmb.cm -> smlnj/cmb.cm |
553 |
|
host-compiler.cm -> smlnj/compiler.cm |
554 |
|
full-cm.cm -> smlnj/cm.cm |
555 |
|
<arch>-<os>.cm -> smlnj/cmb/<arch>-<os>.cm |
556 |
|
<arch>-compiler.cm -> smlnj/compiler/<arch>.cm |
557 |
|
|
558 |
|
CM bug fixes |
559 |
|
|
560 |
|
- exceptions in user code are being passed through (i.e., reach top level) |
561 |
|
- more bugs in paranoia mode fixed |
562 |
|
- bug related to checking group owners fixed |
563 |
|
- better error handling (suppresses many followup-messages) |
564 |
|
|
565 |
|
Internals |
566 |
|
|
567 |
|
"Global" modmap: |
568 |
|
CM now maintains one "global" modmap that is used for all stable |
569 |
|
libraries. The use of such a global modmap maximizes sharing and |
570 |
|
minimizes the need for re-traversing parts of environments during |
571 |
|
modmap construction. (However, this has minor impact since modmap |
572 |
|
construction seems to account for just one percent or less of total |
573 |
|
compile time.) |
574 |
|
|
575 |
|
====================================================================== |
576 |
|
Compiler Internals |
577 |
|
====================================================================== |
578 |
|
|
579 |
|
Environment data structures: major changes |
580 |
|
|
581 |
|
No CMStaticEnv anymore. |
582 |
- no CMEnv, no "BareEnvironment" (actually, _only_ BareEnvironment, |
- no CMEnv, no "BareEnvironment" (actually, _only_ BareEnvironment, |
583 |
but it is called Environment), no conversions between different |
but it is called Environment), no conversions between different |
584 |
kinds of static environments |
kinds of static environments |
597 |
As a result, modtrees never hang on to parts of an environment that |
As a result, modtrees never hang on to parts of an environment that |
598 |
has already been rendered "stale" by filtering or rebinding. |
has already been rendered "stale" by filtering or rebinding. |
599 |
|
|
600 |
- I went through many, many trials and errors before arriving at the |
- all files that I touched now compile without warnings (other than |
|
current solution. (The initial idea of "linkpaths" did not work.) |
|
|
But the result of all this is that I have touched a lot of files that |
|
|
depend on the "modules" and "types" data structures (most of the |
|
|
elaborator). There were a lot of changes during my "linkpath" trials |
|
|
that could have been reverted to their original state but weren't. |
|
|
Please, don't be too harsh on me for messing with this code a bit more |
|
|
than what was strictly necessary... (I _did_ resist the tempation |
|
|
of doing any "global reformatting" to avoid an untimely death at |
|
|
Dave's hands. :) |
|
|
|
|
|
- One positive aspect of the previous point: At least I made sure that |
|
|
all files that I touched now compile without warnings (other than |
|
601 |
"polyEqual"). |
"polyEqual"). |
602 |
|
|
603 |
- compiler now tends to run "leaner" (i.e., ties up less memory in |
- compiler now tends to run "leaner" (i.e., ties up less memory in |
604 |
redundant modmaps) |
redundant modmaps) |
605 |
|
|
606 |
---------------------------------------------------------------------- |
Stats phase "genmap" added |
|
Name: Matthias Blume |
|
|
Date: 2000/03/31 18:00:00 JST |
|
|
Tag: blume_main_v110p26p2_1 |
|
|
Description: |
|
607 |
|
|
608 |
This update contains: |
- measures time spent during on-the-fly modmap generation |
609 |
|
|
610 |
1. A small change to CM's handling of stable libraries: |
Changes on behalf of CM |
|
CM now maintains one "global" modmap that is used for all stable |
|
|
libraries. The use of such a global modmap maximizes sharing and |
|
|
minimizes the need for re-traversing parts of environments during |
|
|
modmap construction. (However, this has minor impact since modmap |
|
|
construction seems to account for just one percent or less of total |
|
|
compile time.) |
|
611 |
|
|
612 |
2. I added a "genmap" phase to the statistics. This is where I got the |
Compiler.CMSA eliminated |
613 |
"one percent" number (see above). |
- No longer supported by CM anyway. |
614 |
|
|
615 |
3. CM's new tool parameter mechanism just became _even_ better. :) |
Fixed bugs in pickler that kept biting Stefan |
616 |
- The parser understands named parameters and recursive options. |
- past refs to past refs (was caused by the possibility that |
617 |
- The "make" and "shell" tools use these new features. |
ad-hoc sharing is more discriminating than hash-cons sharing) |
618 |
(This makes it a lot easier to cascade these tools.) |
- integer overflow on LargeInt.minInt |
619 |
- There is a small syntax change: named parameters use a |
|
620 |
|
Handling of "core" environment: |
|
<name> : ( <option> ... ) or |
|
|
<name> : <string> |
|
|
|
|
|
syntax. Previously, named parameters were implemented in an |
|
|
ad-hoc fashion by each tool individually (by parsing strings) |
|
|
and had the form |
|
|
|
|
|
<name>=<string> |
|
|
|
|
|
See the CM manual for a full description of these issues. |
|
|
|
|
|
---------------------------------------------------------------------- |
|
|
Name: Matthias Blume |
|
|
Date: 2000/04/03 16:05:00 JST |
|
|
Tag: blume_main_v110p26p2_2 |
|
|
Description: |
|
|
|
|
|
I eliminated coreEnv from compInfo. Access to the "Core" structure is |
|
|
now done via the ordinary static environment that is context to each |
|
|
compilation unit. |
|
|
|
|
|
To this end, I arranged that instead of "structure Core" as "structure |
|
|
_Core" is bound in the pervasive environment. Core access is done via |
|
|
_Core (which can never be accidentially rebound because _Core is not a |
|
|
legal surface-syntax symbol). |
|
|
|
|
|
The current solution is much cleaner because the core environment is |
|
|
now simply part of the pervasive environment which is part of every |
|
|
compilation unit's context anyway. In particular, this eliminates all |
|
|
special-case handling that was necessary until now in order to deal |
|
|
with dynamic and symbolic parts of the core environment. |
|
|
|
|
|
Remaining hackery (to bind the "magic" symbol _Core) is localized in the |
|
|
compilation mananger's bootstrap compiler (actually: in the "init group" |
|
|
handling). See the comments in src/system/smlnj/init/init.cmi for |
|
|
more details. |
|
|
|
|
|
I also tried to track down all mentions of "Core" (as string argument |
|
|
to Symbol.strSymbol) in the compiler and replaced them with a |
|
|
reference to the new CoreSym.coreSym. Seems cleaner since the actual |
|
|
name appears in one place only. |
|
|
|
|
|
Binfile and bootfile format have not changed, but the switchover from |
|
|
the old "init.cmi" to the new one is a bit tricky, so I supplied new |
|
|
bootfiles anyway. |
|
621 |
|
|
622 |
|
I eliminated coreEnv from compInfo. Access to the "Core" |
623 |
|
structure is now done via the ordinary static environment that is |
624 |
|
context to each compilation unit. |
625 |
|
|
626 |
|
To this end, I arranged that instead of "structure Core" a |
627 |
|
"structure _Core" is bound in the pervasive environment. Core |
628 |
|
access is done via _Core (which can never be accidentially rebound |
629 |
|
because _Core is not a legal surface-syntax symbol). |
630 |
|
|
631 |
|
The current solution is much cleaner because the core environment |
632 |
|
is now simply part of the pervasive environment which is part of |
633 |
|
every compilation unit's context anyway. In particular, this |
634 |
|
eliminates all special-case handling that was necessary until now |
635 |
|
in order to deal with dynamic and symbolic parts of the core |
636 |
|
environment. |
637 |
|
|
638 |
|
Remaining hackery (to bind the "magic" symbol _Core) is localized |
639 |
|
in the compilation mananger's bootstrap compiler (actually: in the |
640 |
|
"init group" handling). See the comments in |
641 |
|
src/system/smlnj/init/init.cmi for more details. |
642 |
|
|
643 |
|
I also tried to track down all mentions of "Core" (as string |
644 |
|
argument to Symbol.strSymbol) in the compiler and replaced them |
645 |
|
with a reference to the new CoreSym.coreSym. Seems cleaner since |
646 |
|
the actual name appears in one place only. |