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