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

SCM Repository

[smlnj] View of /sml/trunk/src/cm/Install
ViewVC logotype

View of /sml/trunk/src/cm/Install

Parent Directory Parent Directory | Revision Log Revision Log

Revision 344 - (download) (annotate)
Sun Jun 20 03:14:57 1999 UTC (23 years, 3 months ago) by blume
File size: 3951 byte(s)
installation instructions; keep_going off by default
If you want to test-drive this new version of CM, please follow these

A. Setting up the files:

1. You need the latest working version of the SML/NJ compiler.

   * As of the time of this writing, the latest working version is
     110.17.  If you are using that version, you must patch the
     compiler sources according to the instructions in file

   * Beginning with version 110.18, patching should no longer be

2. In addition to the sources for CM, you need the source code for the
   compiler, for MLRISC, for ml-yacc, for the SML/NJ library, and for
   comp-lib.  The sources all hang off a main source directory called
   "src".  So you should have 

     .../src/compiler		- the compiler sources
     .../src/MLRISC		- the MLRISC sources
     .../src/ml-yacc		- the ml-yacc sources
     .../src/comp-lib		- the comp-lib sources
     .../src/smlnj-lib		- the SML/NJ library sources


     .../src/new-cm		- the sources for the new CM

3. You must change the line that reads




   in file .../src/compiler/all-files.cm.

B. Compiling:

1. Go to the compiler source directory:

      cd .../src/compiler

2. Run the ML system:


3. Invoke the batch compiler:

      CMB.make ();

The first time around, step 3 will take around 10 minutes (or so --
depending on the speed of your machine).  Later, if you make
modifications to the sources and want to recompile, then CMB.make ()
should take significantly less time.

C. Bootstrap:

Once you have successfully compiled the compiler sources (including CM
etc.) in step B.3 above, then you are ready to bootstrap.  Step B.3
has created a directory


    (i.e., on a Sparc running Unix .../src/compiler/bin.sparc-unix)

which contains all the binfiles necessary to build a new compiler heap
image.  To do the building, run the "makeml" script that you find in
the compiler directory:

    ./makeml -boot bin.<arch>-<os> -o newcm

The -boot option specifies the binfile directory, the -o option
specifies the name of the heap image file to be created.  In this
case, I have chosen "newcm" as the heap image file name (the actual
file name will be newcm.sparc-solaris or such - depending on the OS
you are running).

D. Running sml using the new heap image:

To test the new heap image, run sml with the @SMLload=... option:

   sml @SMLload=newcm

If you are running sml from a different directory (e.g., the
"src/new-cm/Tests" directory), then you must specify the correct path
to the new heap image:

   cd ../new-cm/Tests
   sml @SMLload=../../compiler/newcm

E. Testing the new CM:

The user interface to the new CM is still in flux, so take the
following with a grain of salt:

- To compile a group/library:

    CM.recomp "sources.cm";

  The argument specifies the group/library's description file.  It
  does not necessarily have to be "sources.cm".

- To compile a group/library and execute its code (resulting in actual
  top-level bindings):

    CM.make "sources.cm";

- To stabilize a library (assuming that all its sub-libraries are
  already stable):

    CM.stabilize false "sources.cm";

  (The boolean flag "false" indicates that you do not wish to have
   stabilization applied recursively to sub-libraries).

- To stabilize a library and all of its sub-libraries:

    CM.stabilize true "sources.cm";

F. Bootstrap compilation:

The new CM is not yet able to compile the compiler's sources.  I am
working on this part right now.  Something is working, but it requires
a very different organization of the compiler's sources.  To play with
that, you can try to invoke

   CMB.make ();

but you'll need my experimental new compiler source tree for that.
(Ask me if you are interested.)

ViewVC Help
Powered by ViewVC 1.0.0