13 |
Description: |
Description: |
14 |
|
|
15 |
---------------------------------------------------------------------- |
---------------------------------------------------------------------- |
16 |
|
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 |
430 |
|
Tag: blume-20010625-x86pc |
431 |
|
Description: |
432 |
|
|
433 |
|
Fixed a nasty bug in the X86 assembly code that caused signal |
434 |
|
handlers to fail (crash) randomly. |
435 |
|
|
436 |
|
---------------------------------------------------------------------- |
437 |
|
Name: Matthias Blume |
438 |
|
Date: 2001/06/25 12:05:00 EDT |
439 |
|
Tag: blume-20010625-nlffigen |
440 |
|
Description: |
441 |
|
|
442 |
|
This update fixes a number of minor bugs in ml-nlffigen as reported by |
443 |
|
Nick Carter <nbc@andrew.cmu.edu>. |
444 |
|
|
445 |
|
1. Silly but ok typedefs of the form "typedef void myvoid;" are now accepted. |
446 |
|
2. Default names for generated files are now derived from the name of |
447 |
|
the C file *without its directory*. In particular, this causes generated |
448 |
|
files to be placed locally even if the C file is in some system directory. |
449 |
|
3. Default names for generated signatures and structures are also derived |
450 |
|
from the C file name without its directory. This avoids silly things |
451 |
|
like "structure GL/GL". |
452 |
|
(Other silly names are still possible because ml-nlffigen does not do |
453 |
|
a thorough check of whether generated names are legal ML identifiers. |
454 |
|
When in doubt, use command line arguments to force particular names.) |
455 |
|
|
456 |
|
---------------------------------------------------------------------- |
457 |
|
Name: Matthias Blume |
458 |
|
Date: 2001/06/21 12:25:00 EDT |
459 |
|
Tag: blume-20010621-eXene |
460 |
|
Description: |
461 |
|
|
462 |
|
eXene now compiles and (sort of) works again. |
463 |
|
|
464 |
|
The library name (for version > 110.33) is $/eXene.cm. |
465 |
|
|
466 |
|
I also added an new example in src/eXene/examples/nbody. See the |
467 |
|
README file there for details. |
468 |
|
|
469 |
|
---------------------------------------------------------------------- |
470 |
|
Name: Matthias Blume |
471 |
|
Date: 2001/06/20 16:40:00 EDT |
472 |
|
Tag: blume-20010620-cml |
473 |
|
Description: |
474 |
|
|
475 |
|
CML now compiles and works again. |
476 |
|
|
477 |
|
Libraries (for version > 110.33): |
478 |
|
|
479 |
|
$cml/cml.cm Main CML library. |
480 |
|
$cml/basis.cm CML's version of $/basis.cm. |
481 |
|
$cml/cml-internal.cm Internal helper library. |
482 |
|
$cml/core-cml.cm Internal helper library. |
483 |
|
$cml-lib/trace-cml.cm Tracing facility. |
484 |
|
$cml-lib/smlnj-lib.cm CML's version of $/smlnj-lib.cm |
485 |
|
|
486 |
|
The installer (config/install.sh) has been taught how to properly |
487 |
|
install this stuff. |
488 |
|
|
489 |
|
---------------------------------------------------------------------- |
490 |
|
Name: Matthias Blume |
491 |
|
Date: 2001/06/19 17:55:00 EDT |
492 |
|
Tag: blume-20010619-instantiate |
493 |
|
Description: |
494 |
|
|
495 |
|
This un-breaks the fix for bug 1432. |
496 |
|
(The bug was originally fixed in 110.9 but I broke it again some |
497 |
|
time after that.) |
498 |
|
|
499 |
|
---------------------------------------------------------------------- |
500 |
|
Name: Matthias Blume |
501 |
|
Date: 2001/06/19 17:25:00 EDT |
502 |
|
Tag: blume-20010619-signals |
503 |
|
Description: |
504 |
|
|
505 |
|
This should (hopefully) fix the long-standing signal handling bug. |
506 |
|
(The runtime system was constructing a continuation record with an |
507 |
|
incorrect descriptor which would cause the GC to drop data on the floor...) |
508 |
|
|
509 |
|
---------------------------------------------------------------------- |
510 |
|
Name: Matthias Blume |
511 |
|
Date: 2001/06/15 15:05:00 EDT |
512 |
|
Tag: blume-20010615-moresparc |
513 |
|
Description: |
514 |
|
|
515 |
|
Here is a short late-hour update related to Sparc c-calls: |
516 |
|
|
517 |
|
-- made handling of double-word arguments a bit smarter |
518 |
|
|
519 |
|
-- instruction selection phase tries to collapse certain clumsily |
520 |
|
constructed ML-Trees; typical example: |
521 |
|
|
522 |
|
ADD(ty,ADD(_,e,LI d1),LI d2) -> ADD(ty,e,LI(d1+d2)) |
523 |
|
|
524 |
|
This currently has no further impact on SML/NJ since mlriscGen does |
525 |
|
not seem to generate such patterns in the first place, and c-calls |
526 |
|
(which did generate them in the beginning) has meanwhile been fixed |
527 |
|
so as to avoid them as well. |
528 |
|
|
529 |
|
---------------------------------------------------------------------- |
530 |
|
Name: Matthias Blume |
531 |
|
Date: 2001/06/15 15:05:00 EDT |
532 |
|
Tag: blume-20010615-sparc |
533 |
|
Description: |
534 |
|
|
535 |
|
The purpose of this update is to provide an implementation of NLFFI |
536 |
|
on Sparc machines. |
537 |
|
|
538 |
|
Here are the changes in detail: |
539 |
|
|
540 |
|
* src/MLRISC/sparc/c-calls/sparc-c-calls.sml is a new file containing |
541 |
|
the Sparc implementation of the c-calls API. |
542 |
|
* The Sparc backend of SML/NJ has been modified to uniformely use %fp |
543 |
|
for accessing the ML frame. Thus, we have a real frame pointer and |
544 |
|
can freely modify %sp without need for an omit-frame-ptr phase. |
545 |
|
The vfp logic in src/compiler/CodeGen/* has been changed to accomodate |
546 |
|
this case. |
547 |
|
* ml-nlffigen has been taught to produce code for different architectures |
548 |
|
and calling conventions. |
549 |
|
* In a way similar to what was done in the x86 case, the Sparc |
550 |
|
backend uses its own specific extension to mltree. (For example, |
551 |
|
it needs to be able to generate UNIMP instructions which are part |
552 |
|
of the calling convention.) |
553 |
|
* ml-nlffi-lib was reorganized to make it more modular (in particular, |
554 |
|
to make it easier to plug in new machine- and os-dependent parts). |
555 |
|
|
556 |
|
There are some other fairly unrelated bug fixes and cleanups as well: |
557 |
|
|
558 |
|
* I further hacked the .cm files for MLRISC tools (like MDLGen) so |
559 |
|
that they properly share their libraries with existing SML/NJ libraries. |
560 |
|
* I fixed a minor cosmetic bug in CM, supressing certain spurious |
561 |
|
follow-up error messages. |
562 |
|
* Updates to CM/CMB documentation. |
563 |
|
|
564 |
|
TODO items: |
565 |
|
|
566 |
|
* MLRISC should use a different register as its asmTemp on the Sparc. |
567 |
|
(The current %o2 is a really bad choice because it is part of the |
568 |
|
calling conventions, so things might interfere in unexpected ways.) |
569 |
|
|
570 |
|
---------------------------------------------------------------------- |
571 |
|
Name: Matthias Blume |
572 |
|
Date: 2001/06/07 |
573 |
|
Tag: blume-20010607-calls |
574 |
|
Description: |
575 |
|
|
576 |
|
A number of internal changes related to C calls and calling conventions: |
577 |
|
|
578 |
|
1. ML-Tree CALL statements now carry a "pops" field. It indicates the |
579 |
|
number of bytes popped implicitly (by the callee). In most cases |
580 |
|
this field is 0 but on x86/win32 it is some non-zero value. This |
581 |
|
is information provided for the benefit of the "omit-frameptr" pass. |
582 |
|
2. The CALL instruction on the x86 carries a similar "pops" field. |
583 |
|
The instruction selection phase copies its value from the ML-Tree |
584 |
|
CALL statement. |
585 |
|
3. On all other architectures, the instruction selection phase checks |
586 |
|
whether "pops=0" and complains if not. |
587 |
|
4. The c-calls implementation for x86 now accepts two calling conventions: |
588 |
|
"ccall" and "stdcall". When "ccall" is selected, the caller cleans |
589 |
|
up after the call and pops is set to 0. For "stdcall", the caller |
590 |
|
does nothing, leaving the cleanup to the callee; pops is set to |
591 |
|
the number of bytes that were pushed onto the stack. |
592 |
|
5. The cproto decoder (compiler/Semant/types/cproto.sml) now can |
593 |
|
distinguish between "ccall" and "stdcall". |
594 |
|
6. The UNIMP instruction has been added to the supported Sparc instruction |
595 |
|
set. (This is needed for implementing the official C calling convention |
596 |
|
on this architecture.) |
597 |
|
7. I fixed some of the .cm files under src/MLRISC/Tools to make them |
598 |
|
work with the latest CM. |
599 |
|
|
600 |
|
---------------------------------------------------------------------- |
601 |
|
Name: Matthias Blume |
602 |
|
Date: 2001/06/05 15:10:00 EDT |
603 |
|
Tag: blume-20010605-cm-index |
604 |
|
Description: |
605 |
|
|
606 |
|
0. The "lambdasplit" parameter for class "sml" in CM has been documented. |
607 |
|
|
608 |
|
1. CM can now generate "index files". These are human-readable files |
609 |
|
that list on a per-.cm-file basis each toplevel symbol defined or |
610 |
|
imported. The location of the index file for |
611 |
|
<p>/<d>.cm is <p>/CM/INDEX/<d>.cm. |
612 |
|
To enable index-file generation, set CM.Control.generate_index to true |
613 |
|
or export an environment-symbol: export CM_GENERATE_INDEX=true. |
614 |
|
|
615 |
|
The CM manual has been updated accordingly. |
616 |
|
|
617 |
|
2. I made some slight modifications to the c-calls API in MLRISC. |
618 |
|
|
619 |
|
a) There is now a callback to support saving/restoring of |
620 |
|
dedicated but caller-save registers around the actual call |
621 |
|
instruction. |
622 |
|
b) One can optionally specify a comment-annotation for the |
623 |
|
call instruction. |
624 |
|
|
625 |
|
3. SML/NJ (mlriscGen.sml) uses this new API for the rawccall primop. |
626 |
|
(For example, the comment annotation shows the C prototype of |
627 |
|
the function being called.) |
628 |
|
|
629 |
|
---------------------------------------------------------------------- |
630 |
|
Name: Matthias Blume |
631 |
|
Date: 2001/06/01 13:30:00 EDT |
632 |
|
Tag: blume-20010601-nlffi-cleanup |
633 |
|
Description: |
634 |
|
|
635 |
|
This is mostly a cleanup of MLFFI stuff: |
636 |
|
|
637 |
|
- some signature files have been put into a more exposed place |
638 |
|
- the ugly 'f type parameter is gone (simplifies types tremendously!) |
639 |
|
- ml-nlffigen changed accordingly |
640 |
|
- tutorial updated |
641 |
|
|
642 |
|
Other changes: |
643 |
|
|
644 |
|
- author's affiliation in CM manual(s) updated |
645 |
|
- some more recognized keywords added to Allen's sml.sty |
646 |
|
|
647 |
|
---------------------------------------------------------------------- |
648 |
|
Name: Matthias Blume |
649 |
|
Date: 2001/05/25 15:30:00 EDT |
650 |
|
Tag: blume-20010525-iptr |
651 |
|
Description: |
652 |
|
|
653 |
|
- put the official 110.33-README (as it appears on the ftp server) under |
654 |
|
CVS |
655 |
|
- fixed a small bug related to incomplete pointer types in |
656 |
|
ml-nlffigen |
657 |
|
- small cosmetic change to the ml-nlffi-lib's "arr" type constructor |
658 |
|
(it does not need the 'f type parameter) |
659 |
|
|
660 |
|
---------------------------------------------------------------------- |
661 |
|
Name: Matthias Blume |
662 |
|
Date: 2001/05/23 14:30:00 EDT |
663 |
|
Tag: Release_110_33 |
664 |
|
Description: |
665 |
|
|
666 |
|
New version number (110.33). New bootfiles. |
667 |
|
|
668 |
|
---------------------------------------------------------------------- |
669 |
|
Name: Matthias Blume |
670 |
|
Date: 2001/05/22 18:06:00 EDT |
671 |
|
Tag: blume-20010522-targets |
672 |
|
Description: |
673 |
|
|
674 |
|
Made install.sh use file config/targets.customized if it exists, falling |
675 |
|
back to config/targets if it doesn't. This way one can have a customized |
676 |
|
version of the targets file without touching the "real thing", thus |
677 |
|
eliminating the constant fear of accidentally checking something bogus |
678 |
|
back into the CVS repository... (File config/targets.customized must |
679 |
|
not be added to the repository!) |
680 |
|
|
681 |
|
---------------------------------------------------------------------- |
682 |
|
Name: Matthias Blume |
683 |
|
Date: 2001/05/22 16:30:00 EDT |
684 |
|
Tag: blume-20010522-minitut |
685 |
|
Description: |
686 |
|
|
687 |
|
1. Bug fix in ml-nlffigen; now (hopefully) correctly handling |
688 |
|
struct returns. |
689 |
|
2. Added src/ml-nlffi-lib/Doc/mini-tutorial.txt. This is some very |
690 |
|
incomplete, preliminary documentation for NLFFI. |
691 |
|
|
692 |
|
---------------------------------------------------------------------- |
693 |
|
Name: Matthias Blume |
694 |
|
Date: 2001/05/14 11:30:00 EDT |
695 |
|
Tag: blume-20010514-script |
696 |
|
Description: |
697 |
|
|
698 |
|
Some bugs in install script fixed. |
699 |
|
|
700 |
|
In addition to that I also made a slight change to the NLFFI API: |
701 |
|
Functors generated by ml-nlffigen now take the dynamic library as a |
702 |
|
straight functor argument, not as a suspended one. (The original |
703 |
|
functor code used to force the suspension right away anyway, so there |
704 |
|
was nothing gained by this complication of the interface.) |
705 |
|
|
706 |
|
---------------------------------------------------------------------- |
707 |
|
Name: Matthias Blume |
708 |
|
Date: 2001/05/11 14:35:00 EDT |
709 |
|
Tag: blume-20010511-ml-nlffi |
710 |
|
Description: |
711 |
|
|
712 |
|
I finally took the plunge and added my new FFI code to the main |
713 |
|
repository. For x86-linux it is now ready for prime-time. |
714 |
|
|
715 |
|
There are two new subdirectories of "src": |
716 |
|
|
717 |
|
- ml-nlffi-lib: |
718 |
|
The utility library for programs using the FFI interface. |
719 |
|
Here is the implementation of $/c.cm and its associated low-level |
720 |
|
partners $/c-int.cm and $/memory.cm. |
721 |
|
- ml-nlffigen: |
722 |
|
A stand-alone program for generating ML glue code from C source |
723 |
|
code. |
724 |
|
|
725 |
|
Building ml-nlffigen requires $/ckit-lib.cm. |
726 |
|
|
727 |
|
The config/install.sh script has been updates to do the Right Thing |
728 |
|
(hopefully). |
729 |
|
|
730 |
|
Notice that the source tree for the C-Kit will not be put under "src" |
731 |
|
but directly under the installation root directory. (This is the |
732 |
|
structure that currently exists on the CVS server when you check out |
733 |
|
module "sml".) Fortunately, config/install.sh knows about this oddity. |
734 |
|
|
735 |
|
Bugs: No documentation yet. |
736 |
|
|
737 |
|
---------------------------------------------------------------------- |
738 |
|
Name: Matthias Blume |
739 |
|
Date: 2001/05/09 16:35:00 EDT |
740 |
|
Tag: blume-20010509-cpscontract |
741 |
|
Description: |
742 |
|
|
743 |
|
Fixed a bug in the accounting code in cpsopt/contract.sml. (The |
744 |
|
wrapper/unwrapper elimination did not decrement usage counts and some |
745 |
|
dead variables got overlooked by the dead-up logic.) |
746 |
|
|
747 |
|
---------------------------------------------------------------------- |
748 |
|
Name: Lal George |
749 |
|
Date: 2001/05/08 17:26:09 EDT |
750 |
|
Tag: george-20010508-omit-frameptr |
751 |
|
Description: |
752 |
|
|
753 |
|
Changes to implement the omit-frame-pointer optimization to support |
754 |
|
raw C calls. For now, there is only support on the Intel x86, but |
755 |
|
other architectures will follow as more experience is gained with this. |
756 |
|
|
757 |
|
|
758 |
|
---------------------------------------------------------------------- |
759 |
|
Name: Matthias Blume |
760 |
|
Date: 2001/05/07 14:40:00 EDT |
761 |
|
Tag: blume-20010507-proxies |
762 |
|
Description: |
763 |
|
|
764 |
|
I made into "proxy libraries" all libraries that qualify for such a |
765 |
|
change. (A qualifying library is a library that has another library or |
766 |
|
groups as its sole member and repeats that member's export list |
767 |
|
verbatim. A proxy library avoids this repetition by omitting its export |
768 |
|
list, effectively inheriting the list that its (only) member exports. |
769 |
|
See the CM manual for more explanation.) |
770 |
|
The main effect is that explicit export lists for these libraries |
771 |
|
do not have to be kepts in sync, making maintenance a bit easier. |
772 |
|
|
773 |
|
I also added copyright notices to many .cm-files. |
774 |
|
|
775 |
|
Last but not least, I made a new set of bootfiles. |
776 |
|
|
777 |
|
---------------------------------------------------------------------- |
778 |
|
Name: Matthias Blume |
779 |
|
Date: 2001/05/04 17:00:00 EDT |
780 |
|
Tag: blume-20010504-cm-lsplit |
781 |
|
Description: |
782 |
|
|
783 |
|
0. John merged pending changes to $/smlnj-lib.cm |
784 |
|
|
785 |
|
1. Allen's previous change accidentally backed out of one of Lal's |
786 |
|
earlier changes. I undid this mistake (re-introducing Lal's change). |
787 |
|
|
788 |
|
2. I used the new topOrder' function from graph-scc.sml (from $/smlnj-lib.cm) |
789 |
|
within the compiler where applicable. There is some code simplification |
790 |
|
because of that. |
791 |
|
|
792 |
|
3. The "split" phase (in FLINT) is now part of the default list of phases. |
793 |
|
Compiler.Control.LambdaSplitting.* can be used to globally control the |
794 |
|
lambda-splitting (cross-module-inlining) engine. In addition to that, |
795 |
|
it can now also be controlled on a per-source basis: CM has been taught |
796 |
|
a new tool parameter applicable to ML source files. |
797 |
|
|
798 |
|
- To turn lambda-splitting off completely: |
799 |
|
local open Compiler.Control.LambdaSplitting in |
800 |
|
val _ = set Off |
801 |
|
end |
802 |
|
- To make "no lambda-splitting" the global default (but allow per-source |
803 |
|
overriding); this is the initial setting: |
804 |
|
local open Compiler.Control.LambdaSplitting in |
805 |
|
val _ = set (Default NONE) |
806 |
|
end |
807 |
|
- To make "lambda-splitting with aggressiveness a" the global default |
808 |
|
(and allow per-source overriding): |
809 |
|
local open Compiler.Control.LambdaSplitting in |
810 |
|
val _ = set (Default (SOME a)) |
811 |
|
end |
812 |
|
|
813 |
|
- To turn lambda-splitting off for a given ML souce file (say: a.sml) |
814 |
|
write (in the respective .cm-file): |
815 |
|
a.sml (lambdasplitting:off) |
816 |
|
- To turn lambda-splitting for a.sml on with minimal aggressiveness: |
817 |
|
a.sml (lambdasplitting:on) |
818 |
|
- To turn lambda-splitting for a.sml on with aggressiveness <a> (where |
819 |
|
<a> is a decimal non-negative integer): |
820 |
|
a.sml (lambdasplitting:<a>) |
821 |
|
- To turn lambda-splitting for a.sml on with maximal aggressiveness: |
822 |
|
a.sml (lambdasplitting:infinity) |
823 |
|
- To use the global default for a.sml: |
824 |
|
a.sml (lambdasplitting:default) |
825 |
|
or simply |
826 |
|
a.sml |
827 |
|
|
828 |
|
---------------------------------------------------------------------- |
829 |
|
Name: Allen Leung |
830 |
|
Date: 2001/05/04 01:57:00 EDT |
831 |
|
Tag: leunga-20010504-sync |
832 |
|
Description: |
833 |
|
|
834 |
|
MLRISC features. |
835 |
|
|
836 |
|
1. Fix to CMPXCHG instructions. |
837 |
|
2. Changed RA interface to allow annotations in callbacks. |
838 |
|
3. Added a new method to the stream interface to allow annotations updates. |
839 |
|
|
840 |
|
---------------------------------------------------------------------- |
841 |
|
Name: Matthias Blume |
842 |
|
Date: 2001/05/01 11:45:00 EDT |
843 |
|
Tag: blume-20010501-pcedittmp |
844 |
|
Description: |
845 |
|
|
846 |
|
Changed install.sh to use the current working directory instead of |
847 |
|
/usr/tmp for a temporary file (pcedittmp). The previous choice |
848 |
|
of /usr/tmp caused trouble with MacOS X because of file premission |
849 |
|
problems. |
850 |
|
|
851 |
|
---------------------------------------------------------------------- |
852 |
|
Name: Matthias Blume |
853 |
|
Date: 2001/04/20 11:10:00 EDT |
854 |
|
Tag: blume-20010420-inMLflag |
855 |
|
Description: |
856 |
|
|
857 |
|
- added vp_limitPtrMask to vproc-state.h |
858 |
|
(for use by the raw-C-calls mechanism to implement proper interrupt |
859 |
|
handling) |
860 |
|
- made the ML compiler aware of various data-structure offsets so it |
861 |
|
can generate code for accessing the vp_inML flag and vp_limitPtrMask |
862 |
|
- tweaked mlriscGen.sml to have it emit interrupt-handling code for |
863 |
|
raw C-calls |
864 |
|
|
865 |
|
---------------------------------------------------------------------- |
866 |
|
Name: Lal George |
867 |
|
Date: 2001/04/20 09:15:28 EDT |
868 |
|
Tag: george-20010420-macosX |
869 |
|
Description: |
870 |
|
|
871 |
|
- Changes to port to Mac OS X; Darwin. |
872 |
|
|
873 |
|
- In the process I found that sqrt was broken on the PPC, because the |
874 |
|
fsqrt instruction is not implemented. |
875 |
|
|
876 |
|
---------------------------------------------------------------------- |
877 |
|
Name: Matthias Blume |
878 |
|
Date: 2001/04/18 12:45:00 EDT |
879 |
|
Tag: blume-20010418-ccalls |
880 |
|
Description: |
881 |
|
|
882 |
|
- fixed two off-by-4 errors in the x86-specific c-calls implementation |
883 |
|
(this bug prevented structure arguments containing pointers from being |
884 |
|
passed correctly) |
885 |
|
- changed the raw-C-call code in mlriscGen.sml in such a way that |
886 |
|
structure arguments are represented as a pointer to the beginning |
887 |
|
of the structure (instead of having a series of synthesized arguments, |
888 |
|
one for each structure member) |
889 |
|
|
890 |
|
- made makeml script's verbosity level configurable via environment |
891 |
|
variable (MAKEML_VERBOSITY) |
892 |
|
|
893 |
|
- eliminated placeholder implementations for f32l, w16s, i16s, and f32s |
894 |
|
in rawmem-x86.sml; we are now using the real thing |
895 |
|
|
896 |
|
---------------------------------------------------------------------- |
897 |
|
Name: Matthias Blume |
898 |
|
Date: 2001/03/22 16:25:00 EST |
899 |
|
Tag: blume-20010322-bootfiles |
900 |
|
Description: |
901 |
|
|
902 |
|
Created a new set of bootfiles (for your automatic installation convenience). |
903 |
|
|
904 |
|
---------------------------------------------------------------------- |
905 |
|
Name: Matthias Blume |
906 |
|
Date: 2001/03/22 15:10:00 EST |
907 |
|
Tag: blume-20010322-rawmem-parcm |
908 |
|
Description: |
909 |
|
|
910 |
|
1. All "raw memory access" primitives for the new FFI are implemented now |
911 |
|
(at least on the x86). |
912 |
|
2. Some further cleanup of CM's parallel make mechanism. |
913 |
|
|
914 |
|
---------------------------------------------------------------------- |
915 |
|
Name: Matthias Blume |
916 |
|
Date: 2001/03/19 17:53:00 EST |
917 |
|
Tag: blume-20010319-parallel |
918 |
|
Description: |
919 |
|
|
920 |
|
Parallel make (using compile servers) now works again. |
921 |
|
|
922 |
|
To this end, CM.stabilize and CMB.make have been modified to work in |
923 |
|
two passes when compile servers are attached: |
924 |
|
1. Compile everything, do not perform stabilization; this pass |
925 |
|
uses compile servers |
926 |
|
2. Stabilize everything; this pass does not use compile servers |
927 |
|
If there are no compile servers, the two passes are combined into one |
928 |
|
(as before). Splitting the passes increases the inherent parallelism |
929 |
|
in the dependency graph because the entire graph including all |
930 |
|
libraries is available at the same time. This, in turn, improves |
931 |
|
server utilization. The downside is that the master process will |
932 |
|
have to do some extra work after compilation is done (because for |
933 |
|
technical reasons it must re-read all the binfiles during stabilization). |
934 |
|
|
935 |
|
---------------------------------------------------------------------- |
936 |
|
Name: Matthias Blume |
937 |
|
Date: 2001/03/16 12:22:00 EST |
938 |
|
Tag: blume-20010316-bootfiles |
939 |
|
Description: |
940 |
|
|
941 |
|
Created a new set of bootfiles (for your automatic installation convenience). |
942 |
|
|
943 |
|
---------------------------------------------------------------------- |
944 |
|
Name: Matthias Blume |
945 |
|
Date: 2001/03/16 11:00:00 EST |
946 |
|
Tag: blume-20010316-MLTREE-fixup |
947 |
|
Description: |
948 |
|
|
949 |
|
This is a minor fixup for an (untagged) earlier commit by Allen. |
950 |
|
(A file was missing). |
951 |
|
|
952 |
|
---------------------------------------------------------------------- |
953 |
|
Name: Allen Leung |
954 |
|
Date: Mon Mar 5 18:54:57 EST 2001 |
955 |
|
Tag: leunga-20010305-cut-support |
956 |
|
|
957 |
|
1. New support for alternative control-flow in MLTREE. |
958 |
|
Currently we support |
959 |
|
|
960 |
|
FLOW_TO(CALL ...., [k1,...,kn]) |
961 |
|
|
962 |
|
This is needed for 'cuts to' in C-- and try/handle-like constructs |
963 |
|
in Moby |
964 |
|
|
965 |
|
New assembler flag "asm-show-cutsto" to turn on control-flow debugging. |
966 |
|
|
967 |
|
2. Register Allocator |
968 |
|
|
969 |
|
Changes in interface [from Fermin, John] |
970 |
|
|
971 |
|
3. Alpha 8-bit SLL support [Fermin] |
972 |
|
|
973 |
|
4. All architectures |
974 |
|
|
975 |
|
A new module (ClusterExpandCopies) for expanding parallel copies. |
976 |
|
|
977 |
|
---------------------------------------------------------------------- |
978 |
|
Name: Allen Leung |
979 |
|
Date: 2001/02/27 23:07:00 EST |
980 |
|
Tag: leunga-20010227-minor-stuff |
981 |
|
|
982 |
|
1. Alpha bug fix for CMOVNE |
983 |
|
2. Handle mltree COND(..,FCMP ...,...) |
984 |
|
3. Bug fix in simplifier |
985 |
|
|
986 |
|
---------------------------------------------------------------------- |
987 |
|
Name: Matthias Blume |
988 |
|
Date: 2001/01/30 17:50:00 EST |
989 |
|
Tag: blume-20010130-sync |
990 |
|
Description: |
991 |
|
|
992 |
|
This is just a minor update to sync my devel branch with the main brach. |
993 |
|
The only visible change is the addition of some README files. |
994 |
|
|
995 |
|
---------------------------------------------------------------------- |
996 |
|
Name: Matthias Blume |
997 |
|
Date: 2001/01/12 23:30:00 JST |
998 |
|
Tag: blume-20010112-bootfiles |
999 |
|
Description: |
1000 |
|
|
1001 |
|
Made a new set of bootfiles that goes with the current state of the |
1002 |
|
repository. |
1003 |
|
|
1004 |
|
---------------------------------------------------------------------- |
1005 |
|
Name: Matthias Blume |
1006 |
|
Date: 2001/01/12 21:20:00 JST |
1007 |
|
Tag: blume-20010112-sync |
1008 |
|
Description: |
1009 |
|
|
1010 |
|
I am just flushing out some minor changes that had accumulated in |
1011 |
|
my private branch in order to sync with the main tree. (This is |
1012 |
|
mainly because I had CVS trouble when trying to merge _into_ my |
1013 |
|
private branch.) |
1014 |
|
|
1015 |
|
Most people should be completely unaffected by this. |
1016 |
|
|
1017 |
|
---------------------------------------------------------------------- |
1018 |
|
Name: Allen Leung |
1019 |
|
Date: Thu Jan 11 21:03:00 EST 2001 |
1020 |
|
Tag: leunga-20010111-labexp=mltree |
1021 |
|
Description: |
1022 |
|
|
1023 |
|
1. Removed the type LabelExp and replace it by MLTree. |
1024 |
|
2. Rewritten mltree-simplify with the pattern matcher tool. |
1025 |
|
3. There were some bugs in alpha code generator which would break |
1026 |
|
64-bit code generation. |
1027 |
|
4. Redo the tools to generate code with the |
1028 |
|
5. The CM files in MLRISC (and in src/system/smlnj/MLRISC) |
1029 |
|
are now generated by perl scripts. |
1030 |
|
|
1031 |
|
---------------------------------------------------------------------- |
1032 |
|
Name: Matthias Blume |
1033 |
|
Date: 2001/01/10 21:55:00 JST |
1034 |
|
Tag: blume-20010110-rcc |
1035 |
|
Description: |
1036 |
|
|
1037 |
|
The RCC stuff now seems to work (but only on the x86). |
1038 |
|
This required hacking of the c-calls interface (and -implementation) in |
1039 |
|
MLRISC. |
1040 |
|
|
1041 |
|
Normal compiler users should be unaffected. |
1042 |
|
|
1043 |
|
---------------------------------------------------------------------- |
1044 |
|
Name: Matthias Blume |
1045 |
|
Date: 2001/01/09 01:20:00 JST |
1046 |
|
Tag: blume-20010109-rcc |
1047 |
|
Description: |
1048 |
|
|
1049 |
|
This is a fairly big patch, flushing out a large number of pending |
1050 |
|
changes that I made to my development copy over the last couple of days. |
1051 |
|
|
1052 |
|
Of practical relevance at this moment is a workaround for a pickling |
1053 |
|
bug that Allen ran into the other day. The cause of the bug itself is |
1054 |
|
still unknown and it might be hard to fix it properly, but the |
1055 |
|
workaround has some merits of its own (namely somewhat reducing pickling |
1056 |
|
overhead for certain libraries). Therefore, I think this solution should |
1057 |
|
be satisfactory at this time. |
1058 |
|
|
1059 |
|
The rest of the changes (i.e., the vast majority) has to do with my |
1060 |
|
ongoing efforts of providing direct support for C function calls from |
1061 |
|
ML. At the moment there is a new primop "RAW_CCALL", typing magic |
1062 |
|
in types/cproto.sml (invoked from FLINT/trans/translate.sml), a new |
1063 |
|
case in the FLINT CPS datatype (RCC), changes to cps/convert.sml to |
1064 |
|
translate uses of RAW_CCALL into RCC, and changes to mlriscGen.sml to |
1065 |
|
handle RCC. |
1066 |
|
|
1067 |
|
The last part (the changes to mlriscGen.sml) are still known to be |
1068 |
|
wrong on the x86 and not implemented on all other architectures. But |
1069 |
|
the infrastructure is in place. I had to change a few functor |
1070 |
|
signatures in the backend to be able to route the CCalls interface |
1071 |
|
from MLRISC there, and I had to specialize the mltree type (on the |
1072 |
|
x86) to include the necessary extensions. (The extensions themselves |
1073 |
|
were already there and redy to go in MLRISC/x86). |
1074 |
|
|
1075 |
|
Everything should be very happy as soon as someone helps me with |
1076 |
|
mlriscGen.sml... |
1077 |
|
|
1078 |
|
In any case, nothing of this should matter to anyone as long as the |
1079 |
|
new primop is not being used (which is going to be the case unless you |
1080 |
|
find it where I hid it :). The rest of the compiler is completely |
1081 |
|
unaffected. |
1082 |
|
|
1083 |
|
---------------------------------------------------------------------- |
1084 |
|
Name: Matthias Blume |
1085 |
|
Date: 2001/01/05 00:30:00 JST |
1086 |
|
Tag: blume-20010105-primops |
1087 |
|
Description: |
1088 |
|
|
1089 |
|
Added some experimental support for work that I am doing right now. |
1090 |
|
These changes mostly concern added primops, but there is also a new |
1091 |
|
experimental C library in the runtime system (but currently not enabled |
1092 |
|
anywhere except on Linux/X86). |
1093 |
|
|
1094 |
|
In the course of adding primops (and playing with them), I discovered that |
1095 |
|
Zhong's INL_PRIM hack (no type info for certain primops) was, in fact, badly |
1096 |
|
broken. (Zhong was very right he labeled this stuff as "major gross hack".) |
1097 |
|
To recover, I made type information in INL_PRIM mandatory and changed |
1098 |
|
prim.sml as well as built-in.sml accordingly. The InLine structure now |
1099 |
|
has complete, correct type information (i.e., no bottom types). |
1100 |
|
|
1101 |
|
Since all these changes mean that we need new binfiles, I also bumped the |
1102 |
|
version number to 110.32.1. |
1103 |
|
|
1104 |
|
---------------------------------------------------------------------- |
1105 |
|
Name: Matthias Blume |
1106 |
|
Date: 2000/12/30 22:10:00 JST |
1107 |
|
Tag: blume-20001230-various |
1108 |
|
Description: |
1109 |
|
|
1110 |
|
Added proxy libraries for MLRISC and let MLRISC libraries refer |
1111 |
|
to each other using path anchors. (See CM manual for explanation.) |
1112 |
|
|
1113 |
|
Updated CM documentation. |
1114 |
|
|
1115 |
|
Fixed some bugs in CM. |
1116 |
|
|
1117 |
|
Implemented "proxy" libraries (= syntactic sugar for CM). |
1118 |
|
|
1119 |
|
Added "-quiet" option to makeml and changed runtime system accordingly. |
1120 |
|
|
1121 |
|
Added cleanup handler for exportML to reset timers and compiler stats. |
1122 |
|
|
1123 |
|
---------------------------------------------------------------------- |
1124 |
|
Name: Lal George |
1125 |
|
Date: 2000/12/22 22:22:58 EST 2000 |
1126 |
|
Tag: Release_110_32 |
1127 |
|
Description: |
1128 |
|
|
1129 |
|
Infinite precision used throughout MLRISC. |
1130 |
|
see MLRISC/mltree/machine-int.sig |
1131 |
|
|
1132 |
|
---------------------------------------------------------------------- |
1133 |
|
Name: Matthias Blume |
1134 |
|
Date: 2000/12/22 23:16:00 JST |
1135 |
|
Tag: blume-20001222-warn |
1136 |
|
Description: |
1137 |
|
|
1138 |
|
Corrected wording and formatting of some CM warning message which I |
1139 |
|
broke in my previous patch. |
1140 |
|
|
1141 |
|
---------------------------------------------------------------------- |
1142 |
|
Name: Matthias Blume |
1143 |
|
Date: 2000/12/22 21:20:00 JST |
1144 |
|
Tag: blume-20001222-anchorenv |
1145 |
|
Description: |
1146 |
|
|
1147 |
|
Fixed CM's handling of anchor environments in connection with CMB.make. |
1148 |
|
|
1149 |
|
---------------------------------------------------------------------- |
1150 |
|
Name: Matthias Blume |
1151 |
|
Date: 2000/12/22 13:15:00 JST |
1152 |
|
Tag: blume-20001222-cleanup |
1153 |
|
Description: |
1154 |
|
|
1155 |
|
Removed src/cm/ffi which does not (and did not) belong here. |
1156 |
|
|
1157 |
|
---------------------------------------------------------------------- |
1158 |
|
Name: Matthias Blume |
1159 |
|
Date: 2000/12/21 23:55:00 JST |
1160 |
|
Tag: blume-20001221-exn |
1161 |
|
Description: |
1162 |
|
|
1163 |
|
Probably most important: CM no longer silently swallows all exceptions |
1164 |
|
in the compiler. |
1165 |
|
Plus: some other minor CM changes. For example, CM now reports some |
1166 |
|
sizes for generated binfiles (code, data, envpickle, lambdapickle). |
1167 |
|
|
1168 |
|
---------------------------------------------------------------------- |
1169 |
|
Name: Matthias Blume |
1170 |
|
Date: 2000/12/15 00:01:05 JST |
1171 |
|
Tag: blume-20001215-dirtool |
1172 |
|
Description: |
1173 |
|
|
1174 |
|
- "dir" tool added. |
1175 |
|
- improvements and cleanup to Tools structure |
1176 |
|
- documentation updates |
1177 |
|
|
1178 |
|
---------------------------------------------------------------------- |
1179 |
|
Name: Allen Leung |
1180 |
|
Date: Thu Dec 14 03:45:24 EST 2000 |
1181 |
|
Description: |
1182 |
|
Tag: leunga-20001214-int-inf |
1183 |
|
Description: |
1184 |
|
|
1185 |
|
In IntInf, added these standard functions, which are missing from our |
1186 |
|
implementation: |
1187 |
|
|
1188 |
|
andb : int * int -> int |
1189 |
|
xorb : int * int -> int |
1190 |
|
orb : int * int -> int |
1191 |
|
notb : int -> int |
1192 |
|
<< : int * word -> int |
1193 |
|
~>> : int * word -> int |
1194 |
|
|
1195 |
|
Not tested, I hope they are correct. |
1196 |
|
|
1197 |
|
---------------------------------------------------------------------- |
1198 |
|
Name: Allen Leung |
1199 |
|
Date: Fri Dec 8 19:23:26 EST 2000 |
1200 |
|
Description: |
1201 |
|
Tag: leunga-20001208-nowhere |
1202 |
|
Description: |
1203 |
|
|
1204 |
|
Slight improvements to the 'nowhere' tool to handle OR-patterns, |
1205 |
|
to generate better error messages etc. Plus a brief manual. |
1206 |
|
|
1207 |
|
---------------------------------------------------------------------- |
1208 |
|
Name: Lal George |
1209 |
|
Date: 2000/12/08 09:54:02 EST 2000 |
1210 |
|
Tag: Release_110_31 |
1211 |
|
Description: |
1212 |
|
|
1213 |
|
- Version 110.31 |
1214 |
|
---------------------------------------------------------------------- |
1215 |
|
Name: Allen Leung |
1216 |
|
Date: Thu Dec 7 22:01:04 EST 2000 |
1217 |
|
Tag: leunga-20001207-cell-monster-hack |
1218 |
|
Description: |
1219 |
|
|
1220 |
|
Major MLRISC internal changes. Affect all clients. |
1221 |
|
Summary: |
1222 |
|
|
1223 |
|
1. Type CELLS.cell = int is now replaced by a datatype. |
1224 |
|
As a result, the old regmap is now gone. Almost all interfaces |
1225 |
|
in MLRISC change as a consequence. |
1226 |
|
|
1227 |
|
2. A new brand version of machine description tool (v3.0) that generates |
1228 |
|
modules expecting the new interface. The old version is removed. |
1229 |
|
|
1230 |
|
3. The RA interface has been further abstracted into two new functors. |
1231 |
|
RISC_RA and X86RA. These functors have much simpler interfaces. |
1232 |
|
[See also directory MLRISC/demo.] |
1233 |
|
|
1234 |
|
4. Some other new source->source code generation tools are available: |
1235 |
|
|
1236 |
|
a. MLRISC/Tools/RewriteGen -- generate rewriters from rules. |
1237 |
|
b. MLRISC/Tools/WhereGen -- expands conditional pattern matching rules. |
1238 |
|
I use this tool to generate the peephole optimizers---with the new |
1239 |
|
cell type changes, peephole rules are becoming difficult to write |
1240 |
|
without conditional pattern matching. |
1241 |
|
|
1242 |
|
5. More Intmap -> IntHashTable change. Previous changes by Matthias didn't |
1243 |
|
cover the entire MLRISC source tree so many things broke. |
1244 |
|
|
1245 |
|
6. CM files have been moved to the subdirectory MLRISC/cm. |
1246 |
|
They are moved because there are a lot of them and they clutter up the |
1247 |
|
root dir. |
1248 |
|
|
1249 |
|
7. More detailed documentation to come... |
1250 |
|
|
1251 |
|
NOTE: To rebuild from 110.30 (ftp distribution), you'll have to do |
1252 |
|
a makeml -rebuild first. This is because of other other |
1253 |
|
changes that Matthias has made (see below). |
1254 |
|
|
1255 |
|
|
1256 |
|
---------------------------------------------------------------------- |
1257 |
|
Name: Matthias Blume |
1258 |
|
Date: 2000/11/30 23:12:00 JST |
1259 |
|
Tag: blume-20001130-filereorg |
1260 |
|
Description: |
1261 |
|
|
1262 |
|
Some manual updates and some file reorganizations in CM. |
1263 |
|
|
1264 |
|
---------------------------------------------------------------------- |
1265 |
|
Name: Matthias Blume |
1266 |
|
Date: 2000/11/24 17:45:00 JST |
1267 |
|
Tag: blume-20001124-link |
1268 |
|
Description: |
1269 |
|
|
1270 |
|
Drastically improved link traversal code for the case that the dynamic |
1271 |
|
value was already loaded at bootstrap time. As a result, CM and CMB |
1272 |
|
now both load blazingly fast -- even on a very slow machine. Also, |
1273 |
|
memory consumption has been further reduced by this. |
1274 |
|
|
1275 |
|
Warning: The format of the PIDMAP file has changed. THerefore, to |
1276 |
|
bootstrap you have to do this: |
1277 |
|
|
1278 |
|
1. Run CMB.make |
1279 |
|
2. Make a symbolic link for the boot directory: |
1280 |
|
ln -s sml.boot.ARCH-OS xxx |
1281 |
|
3. "Rebuild" the boot directory: |
1282 |
|
./makeml -boot xxx -rebuild sml ; rm xxx |
1283 |
|
4. Boot normally: |
1284 |
|
./makeml |
1285 |
|
|
1286 |
|
---------------------------------------------------------------------- |
1287 |
|
Name: Matthias Blume |
1288 |
|
Date: 2000/11/21 21:20:00 JST |
1289 |
|
Tag: blume-20001121-tools |
1290 |
|
Description: |
1291 |
|
|
1292 |
|
Continued hacking on autoloading problem -- with success this time. |
1293 |
|
Also changed tool-plugin mechanism. See new CM manual. |
1294 |
|
|
1295 |
|
---------------------------------------------------------------------- |
1296 |
|
Name: Matthias Blume |
1297 |
|
Date: 2000/11/19 14:30:00 JST |
1298 |
|
Tag: blume-20001119-autoload |
1299 |
|
Description: |
1300 |
|
|
1301 |
|
Some hacking to make autoloading faster. Success for CMB, no success |
1302 |
|
so far for CM. There is a reduced structure CM' that autoloads faster. |
1303 |
|
(This is a temporary, non-documented hack to be eliminated again when |
1304 |
|
the general problem is solved.) |
1305 |
|
|
1306 |
|
---------------------------------------------------------------------- |
1307 |
|
Name: Matthias Blume |
1308 |
|
Date: 2000/11/17 14:10:00 JST |
1309 |
|
Tag: blume-20001117-pickle-lib |
1310 |
|
Description: |
1311 |
|
|
1312 |
|
1. Eliminated comp-lib.cm |
1313 |
|
2. Made pickle-lib.cm |
1314 |
|
3. Eliminated all uses of intset.sml (from comp-lib.cm) |
1315 |
|
4. Replaced all uses of intmap.{sig,sml} (from comp-lib.cm) with |
1316 |
|
equivalent constructs from smlnj-lib.cm (INtHashTable). |
1317 |
|
5. Point 4. also goes for those uses of intmap.* in MLRISC. |
1318 |
|
Duplicated intmap modules thrown out. |
1319 |
|
6. Hunted down all duplicated SCC code and replaced it with |
1320 |
|
equivalent stuff (GraphSCCFn from smlnj-lib.cm). |
1321 |
|
7. Rewrote Feedback module. |
1322 |
|
8. Moved sortedlist.sml into viscomp-lib.cm. Eventually it |
1323 |
|
should be thrown out and equivalent modules from smlnj-lib.cm |
1324 |
|
should be used (IntRedBlackSet, IntListSet, ...). |
1325 |
|
|
1326 |
|
Confirmed that compiler compiles to fixpoint. |
1327 |
|
|
1328 |
|
---------------------------------------------------------------------- |
1329 |
|
Name: Allen Leung |
1330 |
|
Date: 2000/11/10 18:00:00 |
1331 |
|
Tag: leunga-20001110-new-x86-fp |
1332 |
|
|
1333 |
|
A new x86 floating point code generator has been added. |
1334 |
|
By default this is turned off. To turn this on, do: |
1335 |
|
|
1336 |
|
CM.autoload "$smlnj/compiler.cm"; |
1337 |
|
Compiler.Control.MLRISC.getFlag "x86-fast-fp" := true; |
1338 |
|
|
1339 |
|
Changes: |
1340 |
|
|
1341 |
|
1. Changed FTAN to FPTAN so that the assembly output is correct. |
1342 |
|
2. Changed the extension callback for FTANGENT to generate: |
1343 |
|
|
1344 |
|
fptan |
1345 |
|
fstp %st(0) |
1346 |
|
instead of |
1347 |
|
fptan |
1348 |
|
fstpl ftempmem |
1349 |
|
|
1350 |
|
3. Numerous assembly fixes for x86. |
1351 |
|
|
1352 |
|
5. Cleaned up the machine code output module x86/x86MC.sml and added |
1353 |
|
support for a whole bunch of instructions and addressing modes: |
1354 |
|
|
1355 |
|
fadd/fsub/fsubr/fmul/fdiv/fdivr %st, %st(n) |
1356 |
|
faddp/fsubp/fsubrp/fmulp/fdivp/fdivrp %st, %st(n) |
1357 |
|
fadd/fsub/fsubr/fmul/fdiv/fdivr %st(n), %st |
1358 |
|
fiadd/fisub/fisubr/fimul/fidiv/fidivr mem |
1359 |
|
fxch %st(n) |
1360 |
|
fld %st(n) |
1361 |
|
fst %st(n) |
1362 |
|
fst mem |
1363 |
|
fstp %st(n) |
1364 |
|
fucom %st(n) |
1365 |
|
fucomp %st(n) |
1366 |
|
|
1367 |
|
All these are now generated when the fast fp mode is turned on. |
1368 |
|
|
1369 |
|
6. Removed the dedicated registers %st(0), ..., %st(7) from X86CpsRegs |
1370 |
|
|
1371 |
|
---------------------------------------------------------------------- |
1372 |
|
Name: Matthias Blume |
1373 |
|
Date: 2000/11/09 11:20:00 JST |
1374 |
|
Tag: blume-20001109-scc |
1375 |
|
Description: |
1376 |
|
|
1377 |
|
Eliminated some code duplication: |
1378 |
|
|
1379 |
|
1. Added "where" clause to GraphSCCFn in SML/NJ Library. |
1380 |
|
(Otherwise the functor is useless.) |
1381 |
|
2. Used GraphSCCFn where SCCUtilFun was used previously. |
1382 |
|
3. Got rid of SCCUtilFun (in comp-lib.cm). |
1383 |
|
|
1384 |
|
---------------------------------------------------------------------- |
1385 |
Name: Lal George |
Name: Lal George |
1386 |
Date: 2000/11/06 09:02:21 EST 2000 |
Date: 2000/11/06 09:02:21 EST 2000 |
1387 |
Tag: Release_110_30 |
Tag: Release_110_30 |