14 |
|
|
15 |
---------------------------------------------------------------------- |
---------------------------------------------------------------------- |
16 |
Name: Matthias Blume |
Name: Matthias Blume |
17 |
|
Date: 2001/09/20 17:20:00 EDT |
18 |
|
Tag: blume-20010920-canonicalpaths |
19 |
|
Description: |
20 |
|
|
21 |
|
0. Updated the BOOT file (something that I forgot to do earlier). |
22 |
|
|
23 |
|
1. Small internal change to CM so that it avoids "/../" in filenames |
24 |
|
as much as possible (but only where it is safe). |
25 |
|
|
26 |
|
2. Changed config/_run-sml (resulting in a changed bin/.run-sml) so |
27 |
|
that arguments that contain delimiters are passed through correctly. |
28 |
|
This change also means that all "special" arguments of the form |
29 |
|
@SMLxxx... must come first. |
30 |
|
|
31 |
|
3. Changed install script to put relative anchor names for tool commands |
32 |
|
into pathconfig. |
33 |
|
|
34 |
|
---------------------------------------------------------------------- |
35 |
|
Name: Matthias Blume |
36 |
|
Date: 2001/09/18 15:35:00 EDT |
37 |
|
Tag: blume-20010918-readme11036 |
38 |
|
Description: |
39 |
|
|
40 |
|
Added README files. |
41 |
|
|
42 |
|
---------------------------------------------------------------------- |
43 |
|
Name: Matthias Blume |
44 |
|
Date: 2001/09/18 11:45:00 EDT |
45 |
|
Tag: Release_110_36 (retag) |
46 |
|
Description: |
47 |
|
|
48 |
|
Fixed mistake in config/preloads. Retagged as 110.36. |
49 |
|
|
50 |
|
---------------------------------------------------------------------- |
51 |
|
Name: Matthias Blume |
52 |
|
Date: 2001/09/18 09:40:00 EDT |
53 |
|
Tag: Release_110_36_orig (tag changed) |
54 |
|
Description: |
55 |
|
|
56 |
|
New version (110.36). New bootfiles. |
57 |
|
|
58 |
|
---------------------------------------------------------------------- |
59 |
|
Name: Matthias Blume |
60 |
|
Date: 2001/09/14 16:15:00 EDT |
61 |
|
Tag: blume-20010914-x86fastfp |
62 |
|
Description: |
63 |
|
|
64 |
|
John committed some changes that Allen made, in particular a (hopefully) |
65 |
|
correctly working version of the x86-fp module. |
66 |
|
|
67 |
|
I changed the default setting of the Control.MLRISC.getFlag "x86-fast-fp" |
68 |
|
flag to "true". Everything seems to compile to a fixpoint ok, and |
69 |
|
"mandelbrot" speeds up by about 15%. |
70 |
|
|
71 |
|
---------------------------------------------------------------------- |
72 |
|
Name: Matthias Blume |
73 |
|
Date: 2001/09/13 11:20:00 EDT |
74 |
|
Tag: blume-20010913-minimal |
75 |
|
Description: |
76 |
|
|
77 |
|
1. Stefan Monnier's patch to fix a miscompilation problem that |
78 |
|
was brought to light by John Reppy's work on Moby. |
79 |
|
|
80 |
|
2. Implemented a minimal "structure Compiler" that contains just |
81 |
|
"version" and "architecture". The minimal version will be |
82 |
|
available when the full version is not. This is for backward- |
83 |
|
compatibility with code that wants to test Compiler.version. |
84 |
|
|
85 |
|
---------------------------------------------------------------------- |
86 |
|
Name: Matthias Blume |
87 |
|
Date: 2001/08/28 14:03:00 EDT |
88 |
|
Tag: blume-20010828-ml-lex |
89 |
|
Description: |
90 |
|
|
91 |
|
Fix for bug 1581, received from Neophytos Michael. |
92 |
|
|
93 |
|
---------------------------------------------------------------------- |
94 |
|
Name: Matthias Blume |
95 |
|
Date: 2001/08/27 11:20:00 EDT |
96 |
|
Tag: blume-20010827-readme11035 |
97 |
|
Description: |
98 |
|
|
99 |
|
Fleshed out the README file for 110.35. |
100 |
|
|
101 |
|
---------------------------------------------------------------------- |
102 |
|
Name: Matthias Blume |
103 |
|
Date: 2001/08/24 17:10:00 EDT |
104 |
|
Tag: Release_110_35 |
105 |
|
Description: |
106 |
|
|
107 |
|
New version number (110.35). New bootfiles. |
108 |
|
|
109 |
|
---------------------------------------------------------------------- |
110 |
|
Name: Lal George |
111 |
|
Date: 2001/08/24 13:47:18 EDT 2001 |
112 |
|
Tag: george-20010824-MLRISC-graphs |
113 |
|
Description: |
114 |
|
|
115 |
|
removed clusters from MLRISC completely and replaced with graphs. |
116 |
|
|
117 |
|
---------------------------------------------------------------------- |
118 |
|
Name: Matthias Blume |
119 |
|
Date: 2001/08/23 17:50:00 EDT |
120 |
|
Tag: blume-20010823-toplevel |
121 |
|
Description: |
122 |
|
|
123 |
|
- some reorganization of the code that implements various kinds of |
124 |
|
environments in the compiler (static, dynamic, symbolic, combined) |
125 |
|
- re-implemented the EnvRef module so that evalStream works properly |
126 |
|
(if the stream contains references to "use", "CM.make", etc.) |
127 |
|
- cleaned up evalloop.sml and interact.sml (but they need more cleaning) |
128 |
|
|
129 |
|
---------------------------------------------------------------------- |
130 |
|
Name: Matthias Blume |
131 |
|
Date: 2001/08/20 15:50 EDT |
132 |
|
Tag: blume20010820-slipup |
133 |
|
Description: |
134 |
|
|
135 |
|
I forgot to commit a few files. Here they are... |
136 |
|
|
137 |
|
---------------------------------------------------------------------- |
138 |
|
Name: Matthias Blume |
139 |
|
Date: 2001/08/20 15:35:00 EDT |
140 |
|
Tag: blume-20010820-debugprof |
141 |
|
Description: |
142 |
|
|
143 |
|
!!!! NEW BOOTFILES !!!! |
144 |
|
|
145 |
|
This is another round of reorganizing the compiler sources. This |
146 |
|
time the main goal was to factor out all the "instrumentation" |
147 |
|
passes (for profiling and backtracing) into their own library. |
148 |
|
The difficulty was to do it in such a way that it does not depend |
149 |
|
on elaborate.cm but only on elabdata.cm. |
150 |
|
|
151 |
|
Therefore there have been further changes to both elaborate.cm and |
152 |
|
elabdata.cm -- more "generic" things have been moved from the former |
153 |
|
to the latter. As a result, I was forced to split the assignment |
154 |
|
of numbers indicating "primtyc"s into two portions: SML-generic and |
155 |
|
SML/NJ-specific. Since it would have been awkward to maintain, |
156 |
|
I bit the bullet and actually _changed_ the mapping between these |
157 |
|
numbers and primtycs. The bottom line of this is that you need |
158 |
|
a new set of bin- and bootfiles. |
159 |
|
|
160 |
|
I have built new bootfiles for all architectures, so doing a fresh |
161 |
|
checkout and config/install.sh should be all you need. |
162 |
|
|
163 |
|
The newly created library's name is |
164 |
|
|
165 |
|
$smlnj/viscomp/debugprof.cm |
166 |
|
|
167 |
|
and its sources live under |
168 |
|
|
169 |
|
src/compiler/DebugProf |
170 |
|
|
171 |
|
---------------------------------------------------------------------- |
172 |
|
Name: Matthias Blume |
173 |
|
Date: 2001/08/15 17:15:00 EDT |
174 |
|
Tag: blume-20010815-compreorg |
175 |
|
Description: |
176 |
|
|
177 |
|
This is a first cut at reorganizing the CM libraries that make up the |
178 |
|
core of the compiler. The idea is to separate out pieces that could |
179 |
|
be used independently by tools, e.g., the parser, the typechecker, etc. |
180 |
|
|
181 |
|
The current status is a step in this direction, but it is not quite |
182 |
|
satisfactory yet. Expect more changes in the future. |
183 |
|
|
184 |
|
Here is the current (new) organization... |
185 |
|
|
186 |
|
What used to be $smlnj/viscomp/core.cm is now divided into |
187 |
|
six CM libraries: |
188 |
|
|
189 |
|
$smlnj/viscomp/basics.cm |
190 |
|
/parser.cm |
191 |
|
/elabdata.cm |
192 |
|
/elaborate.cm |
193 |
|
/execute.cm |
194 |
|
/core.cm |
195 |
|
|
196 |
|
The CM files for these libraries live under src/system/smlnj/viscomp. |
197 |
|
All these libraries are proxy libraries that contain precisely |
198 |
|
one CM library component. Here are the locations of the components |
199 |
|
(all within the src/compiler tree): |
200 |
|
|
201 |
|
Basics/basics.cm |
202 |
|
Parse/parser.cm |
203 |
|
ElabData/elabdata.cm |
204 |
|
Elaborator/elaborate.cm |
205 |
|
Execution/execute.cm |
206 |
|
core.cm |
207 |
|
|
208 |
|
[This organization is the same that has been used already |
209 |
|
for a while for the architecture-specific parts of the visible |
210 |
|
compiler and for the old version of core.cm.] |
211 |
|
|
212 |
|
As you will notice, many source files have been moved from their |
213 |
|
respective original locations to a new home in one of the above |
214 |
|
subtrees. |
215 |
|
|
216 |
|
The division of labor between the new libraries is the following: |
217 |
|
|
218 |
|
basics.cm: |
219 |
|
- Simple, basic definitions that pertain to many (or all) of |
220 |
|
the other libraries. |
221 |
|
parser.cm: |
222 |
|
- The SML parser, producing output of type Ast.dec. |
223 |
|
- The type family for Ast is also defined and exported here. |
224 |
|
elabdata.cm: |
225 |
|
- The datatypes that describe input and output of the elaborator. |
226 |
|
This includes types, absyn, and static environments. |
227 |
|
elaborator.cm: |
228 |
|
- The SML/NJ type checker and elaborator. |
229 |
|
This maps an Ast.dec (with a given static environment) to |
230 |
|
an Absyn.dec (with a new static environment). |
231 |
|
- This libraries implements certain modules that used to be |
232 |
|
structures as functors (to remove dependencies on FLINT). |
233 |
|
execute.cm: |
234 |
|
- Everything having to do with executing binary code objects. |
235 |
|
- Dynamic environments. |
236 |
|
core.cm: |
237 |
|
- SML/NJ-specific instantiations of the elaborator and MLRISC. |
238 |
|
- Top-level modules. |
239 |
|
- FLINT (this should eventually become its own library) |
240 |
|
|
241 |
|
Notes: |
242 |
|
|
243 |
|
I am not 100% happy with the way I separated the elaborator (and its |
244 |
|
data structures) from FLINT. Two instances of the same problem: |
245 |
|
|
246 |
|
1. Data structures contain certain fields that carry FLINT-specific |
247 |
|
information. I hacked around this using exn and the property list |
248 |
|
module from smlnj-lib. But the fact that there are middle-end |
249 |
|
specific fields around at all is a bit annoying. |
250 |
|
|
251 |
|
2. The elaborator calculates certain FLINT-related information. I tried |
252 |
|
to make this as abstract as I could using functorization, but, again, |
253 |
|
the fact that the elaborator has to perform calculations on behalf |
254 |
|
of the middle-end at all is not nice. |
255 |
|
|
256 |
|
3. Having to used exn and property lists is unfortunate because it |
257 |
|
weakens type checking. The other alternative (parameterizing |
258 |
|
nearly *everything*) is not appealing, though. |
259 |
|
|
260 |
|
I removed the "rebinding =" warning hack because due to the new organization |
261 |
|
it was awkward to maintain it. As a result, the compiler now issues some of |
262 |
|
these warnings when compiling init.cmi during bootstrap compilation. On |
263 |
|
the plus side, you also get a warning when you do, for example: |
264 |
|
val op = = Int32.+ |
265 |
|
which was not the case up to now. |
266 |
|
|
267 |
|
I placed "assign" and "deref" into the _Core structure so that the |
268 |
|
code that deals with the "lazy" keyword can find them there. This |
269 |
|
removes the need for having access to the primitive environment |
270 |
|
during elaboration. |
271 |
|
|
272 |
|
---------------------------------------------------------------------- |
273 |
|
Name: Matthias Blume |
274 |
|
Date: 2001/08/13 |
275 |
|
Tag: blume-20010813-closures |
276 |
|
Description: |
277 |
|
|
278 |
|
This fix was sent to us by Zhong Shao. It is supposed to improve the |
279 |
|
performance of certain loops by avoiding needless closure allocation. |
280 |
|
|
281 |
|
---------------------------------------------------------------------- |
282 |
|
Name: Lal George |
283 |
|
Date: 2001/07/31 10:03:23 EDT 2001 |
284 |
|
Tag: george-20010731-x86-fmalloc |
285 |
|
Description: Fixed bug in x86 calls |
286 |
|
|
287 |
|
There was a bug where call instructions would mysteriously |
288 |
|
vanish. The call instruction had to be one that returned |
289 |
|
a floating point value. |
290 |
|
|
291 |
|
---------------------------------------------------------------------- |
292 |
|
Name: Lal George |
293 |
|
Date: 2001/07/19 16:36:29 EDT 2001 |
294 |
|
Tag: george-20010719-simple-cells |
295 |
|
Description: |
296 |
|
|
297 |
|
I have dramatically simplified the interface for CELLS in MLRISC. |
298 |
|
|
299 |
|
In summary, the cells interface is broken up into three parts: |
300 |
|
|
301 |
|
1. CellsBasis : CELLS_BASIS |
302 |
|
|
303 |
|
CellsBasis is a top level structure and common for all |
304 |
|
architectures. it contains the definitions of basic datatypes |
305 |
|
and utility functions over these types. |
306 |
|
|
307 |
|
2. functor Cells() : CELLS |
308 |
|
|
309 |
|
Cells generates an interface for CELLS that incorporates the |
310 |
|
specific resources on the target architecture, such as the |
311 |
|
presence of special register classes, their number and size, |
312 |
|
and various useful substructures. |
313 |
|
|
314 |
|
3. <ARCH>CELLS |
315 |
|
|
316 |
|
e.g. SparcCells: SPARCCELLS |
317 |
|
|
318 |
|
<ARCH>CELLS usually contains additional bindings for special |
319 |
|
registers on the architecture, such as: |
320 |
|
|
321 |
|
val r0 : cell (* register zero *) |
322 |
|
val y : cell (* Y register *) |
323 |
|
val psr : cell (* processor status register *) |
324 |
|
... |
325 |
|
|
326 |
|
The structure returned by applying the Cells functor is opened |
327 |
|
in this interface. |
328 |
|
|
329 |
|
The main implication of all this is that the datatypes for cells is |
330 |
|
split between CellsBasis and CELLS -- a fairly simple change for user |
331 |
|
code. |
332 |
|
|
333 |
|
In the old scheme the CELLS interface had a definitional binding of |
334 |
|
the form: |
335 |
|
|
336 |
|
signature CELLS = sig |
337 |
|
|
338 |
|
structure CellsBasis = CellsBasis |
339 |
|
|
340 |
|
... |
341 |
|
|
342 |
|
end |
343 |
|
|
344 |
|
With all the sharing constraints that goes on in MLRISC, this old |
345 |
|
design quickly leads to errors such as: |
346 |
|
|
347 |
|
"structure definition spec inside of sharing ... " |
348 |
|
|
349 |
|
|
350 |
|
and appears to require an unacceptable amount of sharing and where |
351 |
|
constraint hackery. |
352 |
|
|
353 |
|
I think this error message (the interaction of definitional specs and |
354 |
|
sharing) requires more explanation on our web page. |
355 |
|
|
356 |
|
---------------------------------------------------------------------- |
357 |
|
Name: Matthias Blume |
358 |
|
Date: 2001/07/19 15:00:00 EDT |
359 |
|
Tag: blume-20010719-libreorg |
360 |
|
Description: |
361 |
|
|
362 |
|
This update puts together a fairly extensive but straightforward change |
363 |
|
to the way the libraries that implement the interactive system are |
364 |
|
organized: |
365 |
|
|
366 |
|
The biggest change is the elimination of structure Compiler. As a |
367 |
|
replacement for this structure, there is now a CM library |
368 |
|
(known as $smlnj/compiler.cm or $smlnj/compiler/current.cm) |
369 |
|
that exports all the substructures of the original structure Compiler |
370 |
|
directly. So instead of saying Compiler.Foo.bar one now simply |
371 |
|
says Foo.bar. (The CM libraries actually export a collection of |
372 |
|
structures that is richer than the collection of substructures of |
373 |
|
structure Compiler.) |
374 |
|
|
375 |
|
To make the transition smooth, there is a separate library called |
376 |
|
$smlnj/compiler/compiler.cm which puts together and exports the |
377 |
|
original structure Compiler (or at least something very close to it). |
378 |
|
|
379 |
|
There are five members of the original structure Compiler |
380 |
|
that are not exported directly but which instead became members |
381 |
|
of a new structure Backend (described by signature BACKEND). These are: |
382 |
|
structure Profile (: PROFILE), structure Compile (: COMPILE), structure |
383 |
|
Interact (: INTERACT), structure Machine (: MACHINE), and val |
384 |
|
architecture (: string). |
385 |
|
|
386 |
|
Structure Compiler.Version has become structure CompilerVersion. |
387 |
|
|
388 |
|
Cross-compilers for alpha32, hppa, ppc, sparc, and x86 are provided |
389 |
|
by $smlnj/compiler/<arch>.cm where <arch> is alpha32, hppa, ppc, sparc, |
390 |
|
or x86, respectively. |
391 |
|
Each of these exports the same frontend structures that |
392 |
|
$smlnj/compiler.cm exports. But they do not have a structure Backend |
393 |
|
and instead export some structure <Arch>Backend where <Arch> is Alpha32, |
394 |
|
Hppa, PPC, Sparc, or X86, respectively. |
395 |
|
|
396 |
|
Library $smlnj/compiler/all.cm exports the union of the exports of |
397 |
|
$smlnj/compiler/<arch>.cm |
398 |
|
|
399 |
|
There are no structures <Arch>Compiler anymore, use |
400 |
|
$smlnj/compiler/<arch>.cm instead. |
401 |
|
|
402 |
|
Library host-compiler-0.cm is gone. Instead, the internal library |
403 |
|
that instantiates CM is now called cm0.cm. Selection of the host |
404 |
|
compiler (backend) is no longer done here but. (Responsibility for it |
405 |
|
now lies with $smlnj/compiler/current.cm. This seems to be more |
406 |
|
logical.) |
407 |
|
|
408 |
|
Many individual files have been moved or renamed. Some files have |
409 |
|
been split into multiple files, and some "dead" files have been deleted. |
410 |
|
|
411 |
|
Aside from these changes to library organization, there are also changes |
412 |
|
to the way the code itself is organized: |
413 |
|
|
414 |
|
Structure Binfile has been re-implemented in such a way that it no |
415 |
|
longer needs any knowledge of the compiler. It exclusively deals |
416 |
|
with the details of binfile layout. It no longer invokes the |
417 |
|
compiler (for the purpose of creating new prospective binfile |
418 |
|
content), and it no longer has any knowledge of how to interpret |
419 |
|
pickles. |
420 |
|
|
421 |
|
Structure Compile (: COMPILE) has been stripped down to the bare |
422 |
|
essentials of compilation. It no longer deals with linking/execution. |
423 |
|
The interface has been cleaned up considerably. |
424 |
|
|
425 |
|
Utility routines for dealing with linking and execution have been |
426 |
|
moved into their own substructures. |
427 |
|
|
428 |
|
(The ultimate goal of these changes is to provide a light-weight |
429 |
|
binfile loader/linker (at least for, e.g., stable libraries) that |
430 |
|
does not require CM or the compiler to be present.) |
431 |
|
|
432 |
|
CM documentation has been updated to reflect the changes to library |
433 |
|
organization. |
434 |
|
|
435 |
|
---------------------------------------------------------------------- |
436 |
|
Name: Matthias Blume |
437 |
Date: 2001/07/10 17:30:00 EDT |
Date: 2001/07/10 17:30:00 EDT |
438 |
Tag: Release_110_34 |
Tag: Release_110_34 |
439 |
Description: |
Description: |
3009 |
elaborator). There were a lot of changes during my "linkpath" trials |
elaborator). There were a lot of changes during my "linkpath" trials |
3010 |
that could have been reverted to their original state but weren't. |
that could have been reverted to their original state but weren't. |
3011 |
Please, don't be too harsh on me for messing with this code a bit more |
Please, don't be too harsh on me for messing with this code a bit more |
3012 |
than what was strictly necessary... (I _did_ resist the tempation |
than what was strictly necessary... (I _did_ resist the temptation |
3013 |
of doing any "global reformatting" to avoid an untimely death at |
of doing any "global reformatting" to avoid an untimely death at |
3014 |
Dave's hands. :) |
Dave's hands. :) |
3015 |
|
|