12 |
Tag: <post-commit CVS tag> |
Tag: <post-commit CVS tag> |
13 |
Description: |
Description: |
14 |
---------------------------------------------------------------------- |
---------------------------------------------------------------------- |
15 |
|
Name: Matthias Blume |
16 |
|
Date: 2000/09/07 14:45:00 JST |
17 |
|
Tag: blume-20000907-cmerrmsg |
18 |
|
Description: |
19 |
|
|
20 |
|
Small tweak to CM to avoid getting ML syntax error messages twice. |
21 |
|
|
22 |
|
---------------------------------------------------------------------- |
23 |
|
Name: Matthias Blume |
24 |
|
Date: 2000/08/31 18:00:00 JST |
25 |
|
Tag: blume-20000831-cvsbootfiles |
26 |
|
Description: |
27 |
|
|
28 |
|
New URL for boot files (because the 110.29 files on the BL server do |
29 |
|
now work correctly with my updated install scripts for yacc and lex). |
30 |
|
|
31 |
|
---------------------------------------------------------------------- |
32 |
|
Name: Matthias Blume |
33 |
|
Date: 2000/08/08 12:33:00 JST |
34 |
|
Tag: blume-20000808-manual |
35 |
|
Description: |
36 |
|
|
37 |
|
Tiny update to CM manual. |
38 |
|
|
39 |
|
---------------------------------------------------------------------- |
40 |
|
Name: Allen Leung |
41 |
|
Date: 2000/08/7 19:31:00 |
42 |
|
Tag: leunga-20000807-a-whole-bunch-of-stuff |
43 |
|
|
44 |
|
Moby, C--, SSA, x86, machine descriptions etc. Should only affect C-- |
45 |
|
and Mobdy. |
46 |
|
|
47 |
|
1. x86 |
48 |
|
|
49 |
|
a. Fixes to peephole module by John and Dan. |
50 |
|
b. Assembly fix to SETcc by Allen. |
51 |
|
c. Fix to c-call by John. |
52 |
|
d. Fix to spilling by John. (This one deals with the missing FSTPT case) |
53 |
|
e. Instruction selection optimization to SETcc as suggested by John. |
54 |
|
|
55 |
|
For example, |
56 |
|
|
57 |
|
MV(32, x, COND(32, CMP(32, LT, a, b), LI 1, LI 0)) |
58 |
|
|
59 |
|
should generate: |
60 |
|
|
61 |
|
MOVL a, x |
62 |
|
SUBL b, x |
63 |
|
SHRL 31, x |
64 |
|
|
65 |
|
2. IR stuff |
66 |
|
|
67 |
|
A bunch of new DJ-graph related algorithms added. These |
68 |
|
speed up SSA construction. |
69 |
|
|
70 |
|
3. SSA + Scheduling |
71 |
|
|
72 |
|
Added code for SSA and scheduling to the repository |
73 |
|
|
74 |
|
---------------------------------------------------------------------- |
75 |
|
Name: Lal George |
76 |
|
Date: 2000/07/27 11:53:14 EDT |
77 |
|
|
78 |
|
Tag: lal-20000727-linux-ppc |
79 |
|
Description: |
80 |
|
|
81 |
|
Made changes to support Linux PPC. |
82 |
|
p.s. I have confirmation that the 110.29 boot files work fine. |
83 |
|
|
84 |
|
---------------------------------------------------------------------- |
85 |
|
Name: Matthias Blume |
86 |
|
Date: 2000/07/27 17:40:00 JST |
87 |
|
Tag: blume-20000727-scripts |
88 |
|
Description: |
89 |
|
|
90 |
|
!!!! WARNING !!!! |
91 |
|
You must recompile the runtime system! |
92 |
|
!!!! WARNING !!!! |
93 |
|
|
94 |
|
This is basically another round of script-enhancements: |
95 |
|
|
96 |
|
1. sml, ml-build, and ml-makedepend accept options -D and -U to define |
97 |
|
and undefine CM preprocessor symbols. |
98 |
|
|
99 |
|
2. ml-build avoids generating a new heap image if it finds that the |
100 |
|
existing one is still ok. (The condition is that no ML file had to |
101 |
|
be recompiled and all ML files are found to be older that the heap |
102 |
|
file.) |
103 |
|
|
104 |
|
To make this work smoothly, I also hacked the runtime system as |
105 |
|
well as SMLofNJ.SysInfo to get access to the heap image suffix |
106 |
|
(.sparc-solaris, ...) that is currently being used. |
107 |
|
|
108 |
|
Moreover, the signature of CM.mk_standalone has changed. See the |
109 |
|
CM manual. |
110 |
|
|
111 |
|
3. ml-makedepend accepts additional options -n, -a, and -o. (See the |
112 |
|
CM manual for details.) |
113 |
|
|
114 |
|
4. More CM manual updates: |
115 |
|
- all of the above has been documented. |
116 |
|
- there is now a section describing the (CM-related) command line |
117 |
|
arguments that are accepted by the "sml" command |
118 |
|
|
119 |
|
---------------------------------------------------------------------- |
120 |
|
Name: Matthias Blume |
121 |
|
Date: 2000/07/25 16:20:00 JST |
122 |
|
Tag: blume-20000725-makedepend |
123 |
|
Description: |
124 |
|
|
125 |
|
Added a script called ml-makedepend. This can be used in makefiles |
126 |
|
for Unix' make in a way very similar to the "makedepend" command for |
127 |
|
C. |
128 |
|
|
129 |
|
The script internally uses function CM.sources. |
130 |
|
|
131 |
|
Synopsis: |
132 |
|
|
133 |
|
ml-makedepend [-f makefile] cmfile targetname |
134 |
|
|
135 |
|
The default for the makefile is "makefile" (or "Makefile" should |
136 |
|
"makefile" not exist). |
137 |
|
|
138 |
|
ml-makedepend adds a cmfile/targetname-specific section to this |
139 |
|
makefile (after removing the previous version of this section). The |
140 |
|
section contains a single dependency specification with targetname on |
141 |
|
the LHS (targetname is an arbitrary name), and a list of files derived |
142 |
|
from the cmfile on the RHS. Some of the files on the RHS are |
143 |
|
ARCH/OPSYS-specific. Therefore, ml-makedepend inserts references to |
144 |
|
"make" variables $(ARCH) and $(OPSYS) in place of the corresponding |
145 |
|
path names. The makefile writer is responsible for making sure that |
146 |
|
these variables have correct at the time "make" is invoked. |
147 |
|
|
148 |
|
---------------------------------------------------------------------- |
149 |
|
Name: Matthias Blume |
150 |
|
Date: 2000/07/22 23:30:00 JST |
151 |
|
Tag: blume-20000722-urlupdate |
152 |
|
Description: |
153 |
|
|
154 |
|
Changed BOOT and config/srcarchiveurl to point to BL server: |
155 |
|
|
156 |
|
ftp://ftp.research.bell-labs.com/dist/smlnj/working/110.29/ |
157 |
|
|
158 |
|
---------------------------------------------------------------------- |
159 |
|
Name: Matthias Blume |
160 |
|
Date: 2000/07/18 18:00:00 JST |
161 |
|
Tag: blume-20000718-Version_110_29 |
162 |
|
Description: |
163 |
|
|
164 |
|
1. Updated src/compiler/TopLevel/main/version.sml to version 110.29 |
165 |
|
|
166 |
|
2. Updated config/version to 110.29 |
167 |
|
|
168 |
|
3. Updated config/srcarchiveurl |
169 |
|
|
170 |
|
3. New boot files! |
171 |
|
ftp://ftp.cs.princeton.edu/pub/people/blume/sml/110.29-autofetch |
172 |
|
|
173 |
|
---------------------------------------------------------------------- |
174 |
|
Name: Matthias Blume |
175 |
|
Date: 2000/07/11 13:58:00 JST |
176 |
|
Tag: blume-20000711-doctypo |
177 |
|
Description: |
178 |
|
|
179 |
|
Fixed a few typos in CM manual. |
180 |
|
|
181 |
|
---------------------------------------------------------------------- |
182 |
|
Name: Allen Leung |
183 |
|
Date: 2000/06/15 00:38:00 |
184 |
|
Tag: leunga-20000704-sparc-x86 |
185 |
|
|
186 |
|
1. x86 peephole improvement sp += k; sp -= k => nop [from John] |
187 |
|
2. fix to x86 RET bug [found by Dan Grossman] |
188 |
|
3. sparc assembly bug fix for ticc instructions [found by Fermin] |
189 |
|
|
190 |
|
Affects c-- and moby only |
191 |
|
|
192 |
|
---------------------------------------------------------------------- |
193 |
|
Name: Matthias Blume |
194 |
|
Date: 2000/07/04 15:26:00 |
195 |
|
Tag: blume-20000704-trigger |
196 |
|
Description: |
197 |
|
|
198 |
|
1. Improvements to CM manual. |
199 |
|
2. SMLofNJ.Internals.BTrace.trigger reinstated as an alternative way |
200 |
|
of getting a back-trace. The function, when called, raises an |
201 |
|
internal exception which explicitly carries the full back-trace history, |
202 |
|
so it is unaffected by any intervening handle-raise pairs ("trivial" |
203 |
|
or not). The interactive loop will print that history once it arrives |
204 |
|
at top level. |
205 |
|
Short of having all exceptions implicitly carry the full history, the |
206 |
|
recommended way of using this facility is: |
207 |
|
- compile your program with instrumentation "on" |
208 |
|
- run it, when it raises an exception, look at the history |
209 |
|
- if the history is "cut off" because of some handler, go and modify |
210 |
|
your program so that it explicitly calls BTrace.trigger |
211 |
|
- recompile (still instrumented), and rerun; look at the full history |
212 |
|
|
213 |
|
---------------------------------------------------------------------- |
214 |
|
Name: Matthias Blume |
215 |
|
Date: 2000/07/03 15:36:00 JST |
216 |
|
Tag: blume-20000702-manual |
217 |
|
Description: |
218 |
|
|
219 |
|
Small corrections and updates to CM manual. |
220 |
|
|
221 |
|
---------------------------------------------------------------------- |
222 |
|
Name: Matthias Blume |
223 |
|
Date: 2000/06/29 16:04:00 JST |
224 |
|
Tag: blume-20000629-yacctool |
225 |
|
Description: |
226 |
|
|
227 |
|
Changes: |
228 |
|
|
229 |
|
1. Class "mlyacc" now takes separate arguments to pass options to |
230 |
|
generated .sml- and .sig-files independently. |
231 |
|
2. Corresponding CM manual updates. |
232 |
|
3. BTrace module now also reports call sites. (However, for loop clusters |
233 |
|
it only shows from where the cluster was entered.) There are associated |
234 |
|
modifications to core.sml, internals.{sig,sml}, btrace.sml, and btimp.sml. |
235 |
|
|
236 |
|
---------------------------------------------------------------------- |
237 |
|
Name: Matthias Blume |
238 |
|
Date: 2000/06/27 16:51:00 JST |
239 |
|
Tag: blume-20000627-noweb |
240 |
|
Description: |
241 |
|
|
242 |
|
Changes: |
243 |
|
|
244 |
|
1. Implemented "subdir" and "witness" options for noweb tool. |
245 |
|
This caused some slight internal changes in CM's tool implementation. |
246 |
|
2. Fixed bug in "tool plugin" mechanism. This is essentially cleaning |
247 |
|
some remaining issues from earlier path anchor changes. |
248 |
|
3. Updated CM manual accordingly. |
249 |
|
|
250 |
|
4. Changed implementation of back-tracing so that I now consider it |
251 |
|
ready for prime-time. |
252 |
|
|
253 |
|
In particular, you don't have to explicitly trigger the back-trace |
254 |
|
anymore. Instead, if you are running BTrace-instrumented code and |
255 |
|
there is an uncaught exception (regardless of whether or not it was |
256 |
|
raised in instrumented code), the top-level evalloop will print |
257 |
|
the back-trace. |
258 |
|
|
259 |
|
Features: |
260 |
|
|
261 |
|
- Instrumented and uninstrumented code work together seemlessly. |
262 |
|
(Of course, uninstrumented code is never mentioned in actual |
263 |
|
back-traces.) |
264 |
|
|
265 |
|
- Asymptotic time- and space-complexity of instrumented code is |
266 |
|
equal to that of uninstrumented code. (This means that |
267 |
|
tail-recursion is preserved by the instrumentation phase.) |
268 |
|
|
269 |
|
- Modules whose code has been instrumented in different sessions |
270 |
|
work together without problem. |
271 |
|
|
272 |
|
- There is no penalty whatsoever on uninstrumented code. |
273 |
|
|
274 |
|
- There is no penalty on "raise" expressions, even in |
275 |
|
instrumented code. |
276 |
|
|
277 |
|
A potential bug (or perhaps it is a feature, too): |
278 |
|
|
279 |
|
A back-trace reaches no further than the outermost instrumented |
280 |
|
non-trivial "raise". Here, a "trivial" raise is one that is the |
281 |
|
sole RHS of a "handle" rule. Thus, back-traces reach trough |
282 |
|
|
283 |
|
<exp> handle e => raise e |
284 |
|
|
285 |
|
and even |
286 |
|
|
287 |
|
<exp> handle Foo => raise Bar |
288 |
|
|
289 |
|
and, of course, through |
290 |
|
|
291 |
|
<exp> handle Foo => ... |
292 |
|
|
293 |
|
if the exception was not Foo. |
294 |
|
|
295 |
|
Back-traces always reach right through any un-instrumented code |
296 |
|
including any of its "handle" expressions, trivial or not. |
297 |
|
|
298 |
|
To try this out, do the following: |
299 |
|
|
300 |
|
- Erase all existing binfiles for your program. |
301 |
|
(You may keep binfiles for those modules where you think you |
302 |
|
definitely don't need back-tracing.) |
303 |
|
- Turn on back-trace instrumentation: |
304 |
|
SMLofNJ.Internals.BTrace.mode (SOME true); |
305 |
|
- Recompile your program. (I.e., run "CM.make" or "use".) |
306 |
|
- You may now turn instrumentation off again (if you want): |
307 |
|
SMLofNJ.Internals.BTrace.mode (SOME false); |
308 |
|
- Run your program as usual. If it raises an exception that |
309 |
|
reaches the interactive toplevel, then a back-trace will |
310 |
|
automatically be printed. After that, the toplevel loop |
311 |
|
will print the exception history as usual. |
312 |
|
|
313 |
|
---------------------------------------------------------------------- |
314 |
|
Name: Matthias Blume |
315 |
|
Date: 2000/06/26 09:56:46 JST |
316 |
|
Tag: blume-20000626-setup |
317 |
|
Description: |
318 |
|
|
319 |
|
CM: - setup-parameter to "sml" added; this can be used to run arbitrary |
320 |
|
ML code before and after compiling a file (e.g., to set compiler |
321 |
|
flags) |
322 |
|
|
323 |
|
Compiler: - improved btrace API (in core.sml, internals.{sig,sml}) |
324 |
|
- associated changes to btrace.sml (BTrace instrumentation pass) |
325 |
|
- cleaner implementation of btimp.sml (BTrace tracing and report |
326 |
|
module) |
327 |
|
|
328 |
|
CM manual: * new path encoding documented |
329 |
|
* description of setup-parameter to "sml" added |
330 |
|
|
331 |
|
The biggest user-visible change to back-tracing is that it is no |
332 |
|
longer necessary to compile all traced modules within the same |
333 |
|
session. (This was a real limitation.) |
334 |
|
|
335 |
|
---------------------------------------------------------------------- |
336 |
|
Name: Matthias Blume |
337 |
|
Date: 2000/06/24 12:40:00 JST |
338 |
|
Tag: blume-20000624-startup |
339 |
|
Description: |
340 |
|
|
341 |
|
Fixes startup slowdown problem. (I was calling SrcPath.sync a _tad_ |
342 |
|
bit too often -- to put it mildly. :) |
343 |
|
|
344 |
|
---------------------------------------------------------------------- |
345 |
|
Name: Matthias Blume |
346 |
|
Date: 2000/06/23 18:20:00 JST |
347 |
|
Tag: blume-20000623-btrace |
348 |
|
Description: |
349 |
|
|
350 |
|
This updates adds a backtrace facility to aid programmers in debugging |
351 |
|
their programs. This involves the following changes: |
352 |
|
|
353 |
|
1. Module system/smlnj/init/core.sml (structure _Core) now has hooks for |
354 |
|
keeping track of the current call stack. When programs are compiled |
355 |
|
in a special mode, the compiler will insert calls to these hooks |
356 |
|
into the user program. |
357 |
|
"Hook" means that it is possible for different implementations of |
358 |
|
back-tracing to register themselves (at different times). |
359 |
|
|
360 |
|
2. compiler/MiscUtil/profile/btrace.sml implements the annotation phase |
361 |
|
as an Absyn.dec->Absyn.dec rewrite. Normally this phase is turned off. |
362 |
|
It can be turned on using this call: |
363 |
|
SMLofNJ.Internals.BTrace.mode (SOME true); |
364 |
|
Turning it off again: |
365 |
|
SMLofNJ.Internals.BTrace.mode (SOME false); |
366 |
|
Querying the current status: |
367 |
|
SMLofNJ.Internals.BTrace.mode NONE; |
368 |
|
Annotated programs are about twice as big as normal ones, and they |
369 |
|
run a factor of 2 to 4 slower with a dummy back-trace plugin (one |
370 |
|
where all hooks do nothing). The slowdown with a plugin that is |
371 |
|
actually useful (such as the one supplied by default) is even greater, |
372 |
|
but in the case of the default plugin it is still only an constant |
373 |
|
factor (amortized). |
374 |
|
|
375 |
|
3. system/Basis/Implementation/NJ/internals.{sig,sml} have been augmented |
376 |
|
with a sub-structure BTrace for controlling back-tracing. In particular, |
377 |
|
the above-mentioned function "mode" controls whether the annotation |
378 |
|
phase is invoked by the compiler. Another important function is |
379 |
|
"trigger": when called it aborts the current execution and causes |
380 |
|
the top-level loop to print a full back-trace. |
381 |
|
|
382 |
|
4. compiler/MiscUtil/profile/btimp.sml is the current default plugin |
383 |
|
for back-tracing. It keeps track of the dynamic call stack and in |
384 |
|
addition to that it keeps a partial history at each "level" of that |
385 |
|
stack. For example, if a tail-calls b, b tail-calls c, and c tail-calls |
386 |
|
d and b (at separate times, dynamically), then the report will show: |
387 |
|
|
388 |
|
GOTO d |
389 |
|
/c |
390 |
|
GOTO \b |
391 |
|
CALL a |
392 |
|
|
393 |
|
This shows that there was an initial non-tail call of a, then a |
394 |
|
tail-call to b or c, looping behavior in a cluster of functions that |
395 |
|
consist of b and c, and then a goto from that cluster (i.e., either from |
396 |
|
b or from c) to d. |
397 |
|
|
398 |
|
Note that (depending on the user program) the amount of information |
399 |
|
that the back-trace module has to keep track of at each level is bounded |
400 |
|
by a constant. Thus, the whole implementation has the same asymptotical |
401 |
|
complexity as the original program (both in space and in time). |
402 |
|
|
403 |
|
5. compiler/TopLevel/interact/evalloop.sml has been modified to |
404 |
|
handle the special exception SMLofNJ.Internals.BTrace.BTrace |
405 |
|
which is raised by the "trigger" function mentioned above. |
406 |
|
|
407 |
|
Notes on usage: |
408 |
|
|
409 |
|
- Annotated code works well together with unannotated code: |
410 |
|
Unannotated calls simply do not show up at all in the backtrace. |
411 |
|
|
412 |
|
- It is not a good idea to let modules that were annotated during |
413 |
|
different sessions run at the same time. This is because the compiler |
414 |
|
chooses small integers to identify individual functions, and there |
415 |
|
will be clashes if different modules were compiled in separate sessions. |
416 |
|
(Nothing will crash, and you will even be told about the clashes, but |
417 |
|
back-trace information will in general not be useful.) |
418 |
|
|
419 |
|
- Back-tracing can be confused by callcc and capture. |
420 |
|
|
421 |
|
- The only way of getting a back-trace right now is to explicitly |
422 |
|
invoke the "trigger" function from your user program. Eventually, we |
423 |
|
should make every exception carry back-trace information (if |
424 |
|
available). But since this creates more overhead at "raise"-time |
425 |
|
(similar to the current exnHistory overhead), I have not yet |
426 |
|
implemented this. (The implementation will be rather easy.) With |
427 |
|
exceptions carrying back-trace information, this facility will be even |
428 |
|
more useful because users don't need to modify their programs... |
429 |
|
|
430 |
|
- While it is possible to compile the compiler with back-trace |
431 |
|
annotations turned on (I did it to get some confidence in |
432 |
|
correctness), you must make absolutely sure that core.sml and |
433 |
|
btimp.sml are compiled WITHOUT annotation! (core.sml cannot actually |
434 |
|
be compiled with annotation because there is no core access yet, but |
435 |
|
if you compile btimp.sml with annotation, then the system will go into |
436 |
|
an infinite recursion and crash.) |
437 |
|
Since CM currently does not know about BTrace, the only way to turn |
438 |
|
annotations on and off for different modules of the compiler is to |
439 |
|
interrupt CMB.make, change the settings, and re-invoke it. Of course, |
440 |
|
this is awkward and clumsy. |
441 |
|
|
442 |
|
Sample sessions: |
443 |
|
|
444 |
|
Standard ML of New Jersey v110.28.1 [FLINT v1.5], June 5, 2000 |
445 |
|
- SMLofNJ.Internals.BTrace.mode (SOME true); |
446 |
|
[autoloading] |
447 |
|
[autoloading done] |
448 |
|
val it = false : bool |
449 |
|
- structure X = struct |
450 |
|
- fun main n = let |
451 |
|
- fun a (x, 0) = d x |
452 |
|
- | a (x, n) = b (x, n - 1) |
453 |
|
- and b (x, n) = c (x, n) |
454 |
|
- and c (x, n) = a (x, n) |
455 |
|
- and d x = e (x, 3) |
456 |
|
- and e (x, 0) = f x |
457 |
|
- | e (x, n) = e (x, n - 1) |
458 |
|
- and f 0 = SMLofNJ.Internals.BTrace.trigger () |
459 |
|
- | f n = n * g (n - 1) |
460 |
|
- and g n = a (n, 3) |
461 |
|
- in |
462 |
|
- f n |
463 |
|
- end |
464 |
|
- end; |
465 |
|
structure X : sig val main : int -> int end |
466 |
|
- X.main 3; |
467 |
|
*** BACK-TRACE *** |
468 |
|
GOTO stdIn:4.2-13.20: X.main[2].f |
469 |
|
GOTO-( stdIn:4.2-13.20: X.main[2].e |
470 |
|
GOTO stdIn:4.2-13.20: X.main[2].d |
471 |
|
/ stdIn:4.2-13.20: X.main[2].a |
472 |
|
| stdIn:4.2-13.20: X.main[2].b |
473 |
|
GOTO-\ stdIn:4.2-13.20: X.main[2].c |
474 |
|
CALL stdIn:4.2-13.20: X.main[2].g |
475 |
|
GOTO stdIn:4.2-13.20: X.main[2].f |
476 |
|
GOTO-( stdIn:4.2-13.20: X.main[2].e |
477 |
|
GOTO stdIn:4.2-13.20: X.main[2].d |
478 |
|
/ stdIn:4.2-13.20: X.main[2].a |
479 |
|
| stdIn:4.2-13.20: X.main[2].b |
480 |
|
GOTO-\ stdIn:4.2-13.20: X.main[2].c |
481 |
|
CALL stdIn:4.2-13.20: X.main[2].g |
482 |
|
GOTO stdIn:4.2-13.20: X.main[2].f |
483 |
|
GOTO-( stdIn:4.2-13.20: X.main[2].e |
484 |
|
GOTO stdIn:4.2-13.20: X.main[2].d |
485 |
|
/ stdIn:4.2-13.20: X.main[2].a |
486 |
|
| stdIn:4.2-13.20: X.main[2].b |
487 |
|
GOTO-\ stdIn:4.2-13.20: X.main[2].c |
488 |
|
CALL stdIn:4.2-13.20: X.main[2].g |
489 |
|
GOTO stdIn:4.2-13.20: X.main[2].f |
490 |
|
CALL stdIn:2.15-17.4: X.main[2] |
491 |
|
- |
492 |
|
|
493 |
|
(Note that because of a FLINt bug the above code currently does not |
494 |
|
compile without BTrace turned on.) |
495 |
|
|
496 |
|
Here is another example, using my modified Tiger compiler: |
497 |
|
|
498 |
|
Standard ML of New Jersey v110.28.1 [FLINT v1.5], June 5, 2000 |
499 |
|
- SMLofNJ.Internals.BTrace.mode (SOME true); |
500 |
|
[autoloading] |
501 |
|
[autoloading done] |
502 |
|
val it = false : bool |
503 |
|
- CM.make "sources.cm"; |
504 |
|
[autoloading] |
505 |
|
... |
506 |
|
[autoloading done] |
507 |
|
[scanning sources.cm] |
508 |
|
[parsing (sources.cm):parse.sml] |
509 |
|
[creating directory CM/SKEL ...] |
510 |
|
[parsing (sources.cm):tiger.lex.sml] |
511 |
|
... |
512 |
|
[wrote CM/sparc-unix/semant.sml] |
513 |
|
[compiling (sources.cm):main.sml] |
514 |
|
[wrote CM/sparc-unix/main.sml] |
515 |
|
[New bindings added.] |
516 |
|
val it = true : bool |
517 |
|
- Main.compile ("../testcases/merge.tig", "foo.out"); |
518 |
|
*** BACK-TRACE *** |
519 |
|
CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trvar |
520 |
|
CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp |
521 |
|
CALL lib/semant.sml:289.3-295.22: SemantFun[2].transExp.trexp.check[2] |
522 |
|
GOTO lib/semant.sml:289.3-295.22: SemantFun[2].transExp.trexp.check[2] |
523 |
|
CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp |
524 |
|
CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp |
525 |
|
CALL lib/semant.sml:488.3-505.6: SemantFun[2].transDec.trdec[2].transBody[2] |
526 |
|
/ lib/semant.sml:411.65-543.8: SemantFun[2].transDec |
527 |
|
CALL-\ lib/semant.sml:413.2-540.9: SemantFun[2].transDec.trdec[2] |
528 |
|
CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp |
529 |
|
CALL lib/semant.sml:8.52-558.4: SemantFun[2].transProg[2] |
530 |
|
CALL main.sml:1.18-118.4: Main.compile[2] |
531 |
|
- |
532 |
|
|
533 |
|
---------------------------------------------------------------------- |
534 |
|
Name: Matthias Blumen |
535 |
|
Date: 2000/06/21 18:00:00 JST |
536 |
|
Tag: blume-20000621-manual |
537 |
|
Description: |
538 |
|
|
539 |
|
CM manual update: Path environments documented. |
540 |
|
|
541 |
|
---------------------------------------------------------------------- |
542 |
|
Name: Matthias Blume |
543 |
|
Date: 2000/06/19 13:40:00 |
544 |
|
Tag: blume-20000619-manual |
545 |
|
Description: |
546 |
|
|
547 |
|
CM manual and system/README update. This only covers the fact that |
548 |
|
there are no more implicit anchors. (Path environments and the "bind" |
549 |
|
option to "cm" have yet to be documented.) |
550 |
|
|
551 |
|
---------------------------------------------------------------------- |
552 |
|
Name: Matthias Blume |
553 |
|
Date: 2000/06/19 11:05:00 JST |
554 |
|
Tag: blume-20000619-chdir-bugfix |
555 |
|
Description: |
556 |
|
|
557 |
|
Fixed a bug in new SrcPath module that sometimes led to a bad chDir call. |
558 |
|
|
559 |
|
---------------------------------------------------------------------- |
560 |
|
Name: Matthias Blume |
561 |
|
Date: 2000/06/18 22:00:10 JST |
562 |
|
Tag: blume-20000618-implicit-anchors-really-gone |
563 |
|
Description: |
564 |
|
|
565 |
|
I updates the previous HISTORY entry where I forgot to mention that |
566 |
|
implicit anchors are no longer with us. |
567 |
|
|
568 |
|
The current update also gets rid of the (now useless) controller |
569 |
|
CM.Control.implicit_anchors. |
570 |
|
|
571 |
|
---------------------------------------------------------------------- |
572 |
|
Name: Matthias Blume |
573 |
|
Date: 2000/06/16 17:30:00 JST |
574 |
|
Tag: blume-20000616-anchorenv |
575 |
|
Description: |
576 |
|
|
577 |
|
This patch implements the long anticipated (just kidding :) "anchor |
578 |
|
environment" mechanism. In the course of doing this, I also |
579 |
|
re-implemented CM's internal "SrcPath" module from scratch. The new |
580 |
|
one should be more robust in certain boundary cases. In any case, it |
581 |
|
is a lot cleaner than its predecessor (IMHO). |
582 |
|
|
583 |
|
This time, although there is yet another boot file format change, I |
584 |
|
kept the unpickler backward-compatible. As a result, no new bootfiles |
585 |
|
are necessary and bootstrapping is straightforward. (You cannot read |
586 |
|
new bootfiles into an old system, but the other way around is no |
587 |
|
problem.) |
588 |
|
|
589 |
|
Visible changes: |
590 |
|
|
591 |
|
** 0. Implicit path anchors (without the leading $-symbol) are no |
592 |
|
longer recognized at all. This means that such path names are not |
593 |
|
illegal either. For example, the name basis.cm simply refers to a |
594 |
|
local file called "basis.cm" (i.e, the name is an ordinary path |
595 |
|
relative to .cm-files directory). Or, to put it differently, only |
596 |
|
names that start with $ are anchored paths. |
597 |
|
|
598 |
|
** 1. The $<singlearc> abbreviation for $/<singlearc> has finally |
599 |
|
vanished. |
600 |
|
|
601 |
|
John (Reppy) had critizised this as soon as I originally proposed and |
602 |
|
implemented it, but at that time I did not really deeply believe |
603 |
|
him. :) Now I came full-circle because I need the $<singlearc> syntax |
604 |
|
in another place where it cannot be seen as an abbreviation for |
605 |
|
$/<singlearc>. To avoid the confusion, $<singlearc> now means what it |
606 |
|
seems to mean (i.e., it "expands" into the corresponding anchor |
607 |
|
value). |
608 |
|
|
609 |
|
However, when paths are used as members in CM description files, it |
610 |
|
continues to be true that there must be at least another arc after the |
611 |
|
anchor. This is now enforced separately during semantic analysis |
612 |
|
(i.e., from a lexical/syntactical point of view, the notation is ok.) |
613 |
|
|
614 |
|
** 2. The "cm" class now accepts an option "bind". The option's value |
615 |
|
is a sub-option list of precisely two items -- one labeled "anchor" |
616 |
|
and the other one labeled "value". As you might expect, "anchor" is |
617 |
|
used to specify an anchor name to be bound, and "value" specifies what |
618 |
|
the anchor is being bound to. |
619 |
|
|
620 |
|
The value must be a directory name and can be given in either standard |
621 |
|
syntax (including the possibility that it is itself an anchored path) |
622 |
|
or native syntax. |
623 |
|
|
624 |
|
Examples: |
625 |
|
|
626 |
|
foo.cm (bind:(anchor:bar value:$mystuff/bar)) |
627 |
|
lib.cm (bind:(anchor:a value:"H:\\x\\y\\z")) (* only works under windows *) |
628 |
|
|
629 |
|
and so on. |
630 |
|
|
631 |
|
The meaning of this is that the .cm-file will be processed with an |
632 |
|
augmented anchor environment where the given anchor(s) is/are bound to |
633 |
|
the given values(s). |
634 |
|
|
635 |
|
The rationale for having this feature is this: Suppose you are trying |
636 |
|
to use two different (already stable) libraries a.cm and b.cm (that |
637 |
|
you perhaps didn't write yourself). Further, suppose each of these |
638 |
|
two libraries internally uses its own auxiliary library $aux/lib.cm. |
639 |
|
Normally you would now have a problem because the anchor "lib" can not |
640 |
|
be bound to more than one value globally. Therefore, the project that |
641 |
|
uses both a.cm and b.cm must locally redirect the anchor to some other |
642 |
|
place: |
643 |
|
|
644 |
|
a.cm (bind:(anchor:lib value:/usr/lib/smlnj/a-stuff)) |
645 |
|
b.cm (bind:(anchor:lib value:/usr/lib/smlnj/b-stuff)) |
646 |
|
|
647 |
|
This hard-wires $lib/aux.cm to /usr/lib/smlnj/a-stuff/aux.cm or |
648 |
|
/usr/lib/smlnj/b-stuff/aux.cm, respectively. |
649 |
|
|
650 |
|
Hard-wiring path names is a bit inflexible (and CM will verbosely warn |
651 |
|
you when you do so at the time of CM.stabilize). Therefore, you can |
652 |
|
also use an anchored path as the value: |
653 |
|
|
654 |
|
a.cm (bind:(anchor:lib value:$a-lib)) |
655 |
|
b.cm (bind:(anchor:lib value:$b-lib)) |
656 |
|
|
657 |
|
Now you can globally configure (using the usual CM.Anchor.anchor or |
658 |
|
pathconfig machinery) bindings for "a-lib" and "b-lib". Since "lib" |
659 |
|
itself is always locally bound, setting it globally is no longer |
660 |
|
meaningful or necessary (but it does not hurt either). In fact, "lib" |
661 |
|
can still be used as a global anchor for separate purposes. As a |
662 |
|
matter of fact, one can locally define "lib" in terms of a global |
663 |
|
"lib": |
664 |
|
|
665 |
|
a.cm (bind:(anchor:lib value:$lib/a)) |
666 |
|
b.cm (bind:(anchor:lib value:$lib/b)) |
667 |
|
|
668 |
|
** 3: The encoding of path names has changed. This affects the way |
669 |
|
path names are shown in CM's progress report and also the internal |
670 |
|
protocol encoding used for parallel make. |
671 |
|
|
672 |
|
The encoding now uses one or more ':'-separated segments. Each |
673 |
|
segments corresponds to a file that has been specified relative to the |
674 |
|
file given by its preceding segment. The first segment is either |
675 |
|
relative to the CWD, absolute, or anchored. Each segment itself is |
676 |
|
basically a Unix pathname; all segments but the first are relative. |
677 |
|
|
678 |
|
Example: |
679 |
|
|
680 |
|
$foo/bar/baz.cm:a/b/c.sml |
681 |
|
|
682 |
|
This path denotes the file bar/a/b/c.sml relative to the directory |
683 |
|
denoted by anchor "foo". Notice that the encoding also includes |
684 |
|
baz.cm which is the .cm-file that listed a/b/c.sml. As usual, such |
685 |
|
paths are resolved relative to the .cm-files directory, so baz.cm must |
686 |
|
be ignored to get the "real" pathname. |
687 |
|
|
688 |
|
To make this fact more obvious, CM puts the names of such "virtual |
689 |
|
arcs" into parentheses when they appear in progress reports. (No |
690 |
|
parentheses will appear in the internal protocol encoding.) Thus, |
691 |
|
what you really see is: |
692 |
|
|
693 |
|
$foo/bar/(baz.cm):a/b/c.sml |
694 |
|
|
695 |
|
I find this notation to be much more informative than before. |
696 |
|
|
697 |
|
Another new feature of the encoding is that special characters |
698 |
|
including parentheses, colons, (back)slashes, and white space are |
699 |
|
written as \ddd (where ddd is the decimal encoding of the character). |
700 |
|
|
701 |
|
*** The CM manual still needs to be updated. |
702 |
|
|
703 |
|
---------------------------------------------------------------------- |
704 |
Name: Allen Leung |
Name: Allen Leung |
705 |
Date: 2000/06/15 00:38:00 |
Date: 2000/06/15 00:38:00 |
706 |
Tag: leunga-20000615-x86-peephole |
Tag: leunga-20000615-x86-peephole |