If you want to test-drive this new version of CM, please follow these instructions: 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 Patch-compiler-110.17 * Beginning with version 110.18, patching should no longer be necessary. 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 and .../src/new-cm - the sources for the new CM 3. You must change the line that reads ../cm/cm-lib.cm to ../new-cm/cm-lib.cm in file .../src/compiler/all-files.cm. B. Compiling: ------------- 1. Go to the compiler source directory: cd .../src/compiler 2. Run the ML system: sml 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 .../src/compiler/bin.- (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.- -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.)
Click to toggle
does not end with </html> tag
does not end with </body> tag
The output has ended thus: but you'll need my experimental new compiler source tree for that. (Ask me if you are interested.)