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

SCM Repository

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

Annotation of /sml/trunk/src/cm/Install

Parent Directory Parent Directory | Revision Log Revision Log


Revision 344 - (view) (download)

1 : blume 344 If you want to test-drive this new version of CM, please follow these
2 :     instructions:
3 :    
4 :     A. Setting up the files:
5 :     ------------------------
6 :    
7 :     1. You need the latest working version of the SML/NJ compiler.
8 :    
9 :     * As of the time of this writing, the latest working version is
10 :     110.17. If you are using that version, you must patch the
11 :     compiler sources according to the instructions in file
12 :     Patch-compiler-110.17
13 :    
14 :     * Beginning with version 110.18, patching should no longer be
15 :     necessary.
16 :    
17 :     2. In addition to the sources for CM, you need the source code for the
18 :     compiler, for MLRISC, for ml-yacc, for the SML/NJ library, and for
19 :     comp-lib. The sources all hang off a main source directory called
20 :     "src". So you should have
21 :    
22 :     .../src/compiler - the compiler sources
23 :     .../src/MLRISC - the MLRISC sources
24 :     .../src/ml-yacc - the ml-yacc sources
25 :     .../src/comp-lib - the comp-lib sources
26 :     .../src/smlnj-lib - the SML/NJ library sources
27 :    
28 :     and
29 :    
30 :     .../src/new-cm - the sources for the new CM
31 :    
32 :     3. You must change the line that reads
33 :    
34 :     ../cm/cm-lib.cm
35 :    
36 :     to
37 :    
38 :     ../new-cm/cm-lib.cm
39 :    
40 :     in file .../src/compiler/all-files.cm.
41 :    
42 :     B. Compiling:
43 :     -------------
44 :    
45 :     1. Go to the compiler source directory:
46 :    
47 :     cd .../src/compiler
48 :    
49 :     2. Run the ML system:
50 :    
51 :     sml
52 :    
53 :     3. Invoke the batch compiler:
54 :    
55 :     CMB.make ();
56 :    
57 :     The first time around, step 3 will take around 10 minutes (or so --
58 :     depending on the speed of your machine). Later, if you make
59 :     modifications to the sources and want to recompile, then CMB.make ()
60 :     should take significantly less time.
61 :    
62 :     C. Bootstrap:
63 :     -------------
64 :    
65 :     Once you have successfully compiled the compiler sources (including CM
66 :     etc.) in step B.3 above, then you are ready to bootstrap. Step B.3
67 :     has created a directory
68 :    
69 :     .../src/compiler/bin.<arch>-<os>
70 :    
71 :     (i.e., on a Sparc running Unix .../src/compiler/bin.sparc-unix)
72 :    
73 :     which contains all the binfiles necessary to build a new compiler heap
74 :     image. To do the building, run the "makeml" script that you find in
75 :     the compiler directory:
76 :    
77 :     ./makeml -boot bin.<arch>-<os> -o newcm
78 :    
79 :     The -boot option specifies the binfile directory, the -o option
80 :     specifies the name of the heap image file to be created. In this
81 :     case, I have chosen "newcm" as the heap image file name (the actual
82 :     file name will be newcm.sparc-solaris or such - depending on the OS
83 :     you are running).
84 :    
85 :     D. Running sml using the new heap image:
86 :     ----------------------------------------
87 :    
88 :     To test the new heap image, run sml with the @SMLload=... option:
89 :    
90 :     sml @SMLload=newcm
91 :    
92 :     If you are running sml from a different directory (e.g., the
93 :     "src/new-cm/Tests" directory), then you must specify the correct path
94 :     to the new heap image:
95 :    
96 :     cd ../new-cm/Tests
97 :     sml @SMLload=../../compiler/newcm
98 :    
99 :     E. Testing the new CM:
100 :     ----------------------
101 :    
102 :     The user interface to the new CM is still in flux, so take the
103 :     following with a grain of salt:
104 :    
105 :     - To compile a group/library:
106 :    
107 :     CM.recomp "sources.cm";
108 :    
109 :     The argument specifies the group/library's description file. It
110 :     does not necessarily have to be "sources.cm".
111 :    
112 :     - To compile a group/library and execute its code (resulting in actual
113 :     top-level bindings):
114 :    
115 :     CM.make "sources.cm";
116 :    
117 :     - To stabilize a library (assuming that all its sub-libraries are
118 :     already stable):
119 :    
120 :     CM.stabilize false "sources.cm";
121 :    
122 :     (The boolean flag "false" indicates that you do not wish to have
123 :     stabilization applied recursively to sub-libraries).
124 :    
125 :     - To stabilize a library and all of its sub-libraries:
126 :    
127 :     CM.stabilize true "sources.cm";
128 :    
129 :     F. Bootstrap compilation:
130 :     -------------------------
131 :    
132 :     The new CM is not yet able to compile the compiler's sources. I am
133 :     working on this part right now. Something is working, but it requires
134 :     a very different organization of the compiler's sources. To play with
135 :     that, you can try to invoke
136 :    
137 :     CMB.make ();
138 :    
139 :     but you'll need my experimental new compiler source tree for that.
140 :     (Ask me if you are interested.)

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