--- sml/trunk/HISTORY 2000/06/15 04:40:56 660 +++ sml/trunk/HISTORY 2000/12/30 13:06:09 771 @@ -12,6 +12,1041 @@ Tag: Description: ---------------------------------------------------------------------- +Name: Matthias Blume +Date: 2000/12/30 22:10:00 JST +Tag: blume-20001230-various +Description: + +Added proxy libraries for MLRISC and let MLRISC libraries refer +to each other using path anchors. (See CM manual for explanation.) + +Updated CM documentation. + +Fixed some bugs in CM. + +Implemented "proxy" libraries (= syntactic sugar for CM). + +Added "-quiet" option to makeml and changed runtime system accordingly. + +Added cleanup handler for exportML to reset timers and compiler stats. + +---------------------------------------------------------------------- +Name: Lal George +Date: 2000/12/22 22:22:58 EST 2000 +Tag: Release_110_32 +Description: + + Infinite precision used throughout MLRISC. + see MLRISC/mltree/machine-int.sig + +---------------------------------------------------------------------- +Name: Matthias Blume +Date: 2000/12/22 23:16:00 JST +Tag: blume-20001222-warn +Description: + +Corrected wording and formatting of some CM warning message which I +broke in my previous patch. + +---------------------------------------------------------------------- +Name: Matthias Blume +Date: 2000/12/22 21:20:00 JST +Tag: blume-20001222-anchorenv +Description: + +Fixed CM's handling of anchor environments in connection with CMB.make. + +---------------------------------------------------------------------- +Name: Matthias Blume +Date: 2000/12/22 13:15:00 JST +Tag: blume-20001222-cleanup +Description: + +Removed src/cm/ffi which does not (and did not) belong here. + +---------------------------------------------------------------------- +Name: Matthias Blume +Date: 2000/12/21 23:55:00 JST +Tag: blume-20001221-exn +Description: + +Probably most important: CM no longer silently swallows all exceptions +in the compiler. +Plus: some other minor CM changes. For example, CM now reports some +sizes for generated binfiles (code, data, envpickle, lambdapickle). + +---------------------------------------------------------------------- +Name: Matthias Blume +Date: 2000/12/15 00:01:05 JST +Tag: blume-20001215-dirtool +Description: + +- "dir" tool added. +- improvements and cleanup to Tools structure +- documentation updates + +---------------------------------------------------------------------- +Name: Allen Leung +Date: Thu Dec 14 03:45:24 EST 2000 +Description: +Tag: leunga-20001214-int-inf +Description: + + In IntInf, added these standard functions, which are missing from our +implementation: + + andb : int * int -> int + xorb : int * int -> int + orb : int * int -> int + notb : int -> int + << : int * word -> int + ~>> : int * word -> int + + Not tested, I hope they are correct. + +---------------------------------------------------------------------- +Name: Allen Leung +Date: Fri Dec 8 19:23:26 EST 2000 +Description: +Tag: leunga-20001208-nowhere +Description: + + Slight improvements to the 'nowhere' tool to handle OR-patterns, +to generate better error messages etc. Plus a brief manual. + +---------------------------------------------------------------------- +Name: Lal George +Date: 2000/12/08 09:54:02 EST 2000 +Tag: Release_110_31 +Description: + +- Version 110.31 +---------------------------------------------------------------------- +Name: Allen Leung +Date: Thu Dec 7 22:01:04 EST 2000 +Tag: leunga-20001207-cell-monster-hack +Description: + +Major MLRISC internal changes. Affect all clients. +Summary: + +1. Type CELLS.cell = int is now replaced by a datatype. + As a result, the old regmap is now gone. Almost all interfaces + in MLRISC change as a consequence. + +2. A new brand version of machine description tool (v3.0) that generates + modules expecting the new interface. The old version is removed. + +3. The RA interface has been further abstracted into two new functors. + RISC_RA and X86RA. These functors have much simpler interfaces. + [See also directory MLRISC/demo.] + +4. Some other new source->source code generation tools are available: + + a. MLRISC/Tools/RewriteGen -- generate rewriters from rules. + b. MLRISC/Tools/WhereGen -- expands conditional pattern matching rules. + I use this tool to generate the peephole optimizers---with the new + cell type changes, peephole rules are becoming difficult to write + without conditional pattern matching. + +5. More Intmap -> IntHashTable change. Previous changes by Matthias didn't + cover the entire MLRISC source tree so many things broke. + +6. CM files have been moved to the subdirectory MLRISC/cm. + They are moved because there are a lot of them and they clutter up the + root dir. + +7. More detailed documentation to come... + + NOTE: To rebuild from 110.30 (ftp distribution), you'll have to do + a makeml -rebuild first. This is because of other other + changes that Matthias has made (see below). + + +---------------------------------------------------------------------- +Name: Matthias Blume +Date: 2000/11/30 23:12:00 JST +Tag: blume-20001130-filereorg +Description: + +Some manual updates and some file reorganizations in CM. + +---------------------------------------------------------------------- +Name: Matthias Blume +Date: 2000/11/24 17:45:00 JST +Tag: blume-20001124-link +Description: + +Drastically improved link traversal code for the case that the dynamic +value was already loaded at bootstrap time. As a result, CM and CMB +now both load blazingly fast -- even on a very slow machine. Also, +memory consumption has been further reduced by this. + +Warning: The format of the PIDMAP file has changed. THerefore, to +bootstrap you have to do this: + +1. Run CMB.make +2. Make a symbolic link for the boot directory: + ln -s sml.boot.ARCH-OS xxx +3. "Rebuild" the boot directory: + ./makeml -boot xxx -rebuild sml ; rm xxx +4. Boot normally: + ./makeml + +---------------------------------------------------------------------- +Name: Matthias Blume +Date: 2000/11/21 21:20:00 JST +Tag: blume-20001121-tools +Description: + +Continued hacking on autoloading problem -- with success this time. +Also changed tool-plugin mechanism. See new CM manual. + +---------------------------------------------------------------------- +Name: Matthias Blume +Date: 2000/11/19 14:30:00 JST +Tag: blume-20001119-autoload +Description: + +Some hacking to make autoloading faster. Success for CMB, no success +so far for CM. There is a reduced structure CM' that autoloads faster. +(This is a temporary, non-documented hack to be eliminated again when +the general problem is solved.) + +---------------------------------------------------------------------- +Name: Matthias Blume +Date: 2000/11/17 14:10:00 JST +Tag: blume-20001117-pickle-lib +Description: + +1. Eliminated comp-lib.cm +2. Made pickle-lib.cm +3. Eliminated all uses of intset.sml (from comp-lib.cm) +4. Replaced all uses of intmap.{sig,sml} (from comp-lib.cm) with + equivalent constructs from smlnj-lib.cm (INtHashTable). +5. Point 4. also goes for those uses of intmap.* in MLRISC. + Duplicated intmap modules thrown out. +6. Hunted down all duplicated SCC code and replaced it with + equivalent stuff (GraphSCCFn from smlnj-lib.cm). +7. Rewrote Feedback module. +8. Moved sortedlist.sml into viscomp-lib.cm. Eventually it + should be thrown out and equivalent modules from smlnj-lib.cm + should be used (IntRedBlackSet, IntListSet, ...). + +Confirmed that compiler compiles to fixpoint. + +---------------------------------------------------------------------- +Name: Allen Leung +Date: 2000/11/10 18:00:00 +Tag: leunga-20001110-new-x86-fp + +A new x86 floating point code generator has been added. +By default this is turned off. To turn this on, do: + + CM.autoload "$smlnj/compiler.cm"; + Compiler.Control.MLRISC.getFlag "x86-fast-fp" := true; + +Changes: + +1. Changed FTAN to FPTAN so that the assembly output is correct. +2. Changed the extension callback for FTANGENT to generate: + + fptan + fstp %st(0) + instead of + fptan + fstpl ftempmem + +3. Numerous assembly fixes for x86. + +5. Cleaned up the machine code output module x86/x86MC.sml and added + support for a whole bunch of instructions and addressing modes: + + fadd/fsub/fsubr/fmul/fdiv/fdivr %st, %st(n) + faddp/fsubp/fsubrp/fmulp/fdivp/fdivrp %st, %st(n) + fadd/fsub/fsubr/fmul/fdiv/fdivr %st(n), %st + fiadd/fisub/fisubr/fimul/fidiv/fidivr mem + fxch %st(n) + fld %st(n) + fst %st(n) + fst mem + fstp %st(n) + fucom %st(n) + fucomp %st(n) + + All these are now generated when the fast fp mode is turned on. + +6. Removed the dedicated registers %st(0), ..., %st(7) from X86CpsRegs + +---------------------------------------------------------------------- +Name: Matthias Blume +Date: 2000/11/09 11:20:00 JST +Tag: blume-20001109-scc +Description: + +Eliminated some code duplication: + +1. Added "where" clause to GraphSCCFn in SML/NJ Library. + (Otherwise the functor is useless.) +2. Used GraphSCCFn where SCCUtilFun was used previously. +3. Got rid of SCCUtilFun (in comp-lib.cm). + +---------------------------------------------------------------------- +Name: Lal George +Date: 2000/11/06 09:02:21 EST 2000 +Tag: Release_110_30 +Description: + +- Version 110.30 +---------------------------------------------------------------------- +Name: Matthias Blume +Date: 2000/11/04 14:45:00 +Tag: blume-20001104-mlbuild +Description: + +- Made ml-build faster on startup. +- Documentation fixes. + +---------------------------------------------------------------------- +Name: Matthias Blume +Date: 2000/11/02 17:00:00 JST +Tag: blume-20001102-condcomp +Description: + +- Small tweaks to pickler -- new BOOTFILES! +- Version bumped to 110.29.2. +- Added conditional compilation facility to init.cmi (see comment there). +---------------------------------------------------------------------- +Name: Allen Leung +Date: 2000/10/23 19:31:00 +Tag: leunga-20001023-demo-ra + +1. Minor RA changes that improves spilling on x86 (affects Moby and C-- only) +2. Test programs for the graph library updated +3. Some new MLRISC demo programs added + +---------------------------------------------------------------------- +Name: Matthias Blume +Date: 2000/08/31 22:15:00 JST +Tag: blume-20001017-errmsg +Description: + +More error message grief: Where there used to be no messages, there +now were some that had bogus error regions. Fixed. + +---------------------------------------------------------------------- +Name: Matthias Blume +Date: 2000/08/31 17:30:00 JST +Tag: blume-20001017-v110p29p1 +Description: + +I made a version 110.29.1 with new bootfiles. + +Changes: Modified pickler/unpickler for faster and leaner unpickling. + CM documentation changes and a small bugfix in CM's error reporting. + +---------------------------------------------------------------------- +Name: Lal George +Date: 2000/09/27 14:42:35 EDT +Tag: george-20000927-nodestatus +Description: + +Changed the type of the nodestatus, so that: + + SPILLED(~1) is now SPILLED + SPILLED(m) where m>=0 is now MEMREG(m) + SPILLED(s) where s<~1 is now SPILL_LOC(~s) + +---------------------------------------------------------------------- +Name: Matthias Blume +Date: 2000/09/07 14:45:00 JST +Tag: blume-20000907-cmerrmsg +Description: + +Small tweak to CM to avoid getting ML syntax error messages twice. + +---------------------------------------------------------------------- +Name: Matthias Blume +Date: 2000/08/31 18:00:00 JST +Tag: blume-20000831-cvsbootfiles +Description: + +New URL for boot files (because the 110.29 files on the BL server do +now work correctly with my updated install scripts for yacc and lex). + +---------------------------------------------------------------------- +Name: Matthias Blume +Date: 2000/08/08 12:33:00 JST +Tag: blume-20000808-manual +Description: + +Tiny update to CM manual. + +---------------------------------------------------------------------- +Name: Allen Leung +Date: 2000/08/7 19:31:00 +Tag: leunga-20000807-a-whole-bunch-of-stuff + + Moby, C--, SSA, x86, machine descriptions etc. Should only affect C-- +and Mobdy. + +1. x86 + + a. Fixes to peephole module by John and Dan. + b. Assembly fix to SETcc by Allen. + c. Fix to c-call by John. + d. Fix to spilling by John. (This one deals with the missing FSTPT case) + e. Instruction selection optimization to SETcc as suggested by John. + + For example, + + MV(32, x, COND(32, CMP(32, LT, a, b), LI 1, LI 0)) + + should generate: + + MOVL a, x + SUBL b, x + SHRL 31, x + +2. IR stuff + + A bunch of new DJ-graph related algorithms added. These + speed up SSA construction. + +3. SSA + Scheduling + + Added code for SSA and scheduling to the repository + +---------------------------------------------------------------------- +Name: Lal George +Date: 2000/07/27 11:53:14 EDT + +Tag: lal-20000727-linux-ppc +Description: + + Made changes to support Linux PPC. + p.s. I have confirmation that the 110.29 boot files work fine. + +---------------------------------------------------------------------- +Name: Matthias Blume +Date: 2000/07/27 17:40:00 JST +Tag: blume-20000727-scripts +Description: + +!!!! WARNING !!!! +You must recompile the runtime system! +!!!! WARNING !!!! + +This is basically another round of script-enhancements: + +1. sml, ml-build, and ml-makedepend accept options -D and -U to define + and undefine CM preprocessor symbols. + +2. ml-build avoids generating a new heap image if it finds that the + existing one is still ok. (The condition is that no ML file had to + be recompiled and all ML files are found to be older that the heap + file.) + + To make this work smoothly, I also hacked the runtime system as + well as SMLofNJ.SysInfo to get access to the heap image suffix + (.sparc-solaris, ...) that is currently being used. + + Moreover, the signature of CM.mk_standalone has changed. See the + CM manual. + +3. ml-makedepend accepts additional options -n, -a, and -o. (See the + CM manual for details.) + +4. More CM manual updates: + - all of the above has been documented. + - there is now a section describing the (CM-related) command line + arguments that are accepted by the "sml" command + +---------------------------------------------------------------------- +Name: Matthias Blume +Date: 2000/07/25 16:20:00 JST +Tag: blume-20000725-makedepend +Description: + +Added a script called ml-makedepend. This can be used in makefiles +for Unix' make in a way very similar to the "makedepend" command for +C. + +The script internally uses function CM.sources. + +Synopsis: + + ml-makedepend [-f makefile] cmfile targetname + +The default for the makefile is "makefile" (or "Makefile" should +"makefile" not exist). + +ml-makedepend adds a cmfile/targetname-specific section to this +makefile (after removing the previous version of this section). The +section contains a single dependency specification with targetname on +the LHS (targetname is an arbitrary name), and a list of files derived +from the cmfile on the RHS. Some of the files on the RHS are +ARCH/OPSYS-specific. Therefore, ml-makedepend inserts references to +"make" variables $(ARCH) and $(OPSYS) in place of the corresponding +path names. The makefile writer is responsible for making sure that +these variables have correct at the time "make" is invoked. + +---------------------------------------------------------------------- +Name: Matthias Blume +Date: 2000/07/22 23:30:00 JST +Tag: blume-20000722-urlupdate +Description: + +Changed BOOT and config/srcarchiveurl to point to BL server: + + ftp://ftp.research.bell-labs.com/dist/smlnj/working/110.29/ + +---------------------------------------------------------------------- +Name: Matthias Blume +Date: 2000/07/18 18:00:00 JST +Tag: blume-20000718-Version_110_29 +Description: + +1. Updated src/compiler/TopLevel/main/version.sml to version 110.29 + +2. Updated config/version to 110.29 + +3. Updated config/srcarchiveurl + +3. New boot files! + ftp://ftp.cs.princeton.edu/pub/people/blume/sml/110.29-autofetch + +---------------------------------------------------------------------- +Name: Matthias Blume +Date: 2000/07/11 13:58:00 JST +Tag: blume-20000711-doctypo +Description: + +Fixed a few typos in CM manual. + +---------------------------------------------------------------------- +Name: Allen Leung +Date: 2000/06/15 00:38:00 +Tag: leunga-20000704-sparc-x86 + +1. x86 peephole improvement sp += k; sp -= k => nop [from John] +2. fix to x86 RET bug [found by Dan Grossman] +3. sparc assembly bug fix for ticc instructions [found by Fermin] + + Affects c-- and moby only + +---------------------------------------------------------------------- +Name: Matthias Blume +Date: 2000/07/04 15:26:00 +Tag: blume-20000704-trigger +Description: + +1. Improvements to CM manual. +2. SMLofNJ.Internals.BTrace.trigger reinstated as an alternative way + of getting a back-trace. The function, when called, raises an + internal exception which explicitly carries the full back-trace history, + so it is unaffected by any intervening handle-raise pairs ("trivial" + or not). The interactive loop will print that history once it arrives + at top level. + Short of having all exceptions implicitly carry the full history, the + recommended way of using this facility is: + - compile your program with instrumentation "on" + - run it, when it raises an exception, look at the history + - if the history is "cut off" because of some handler, go and modify + your program so that it explicitly calls BTrace.trigger + - recompile (still instrumented), and rerun; look at the full history + +---------------------------------------------------------------------- +Name: Matthias Blume +Date: 2000/07/03 15:36:00 JST +Tag: blume-20000702-manual +Description: + +Small corrections and updates to CM manual. + +---------------------------------------------------------------------- +Name: Matthias Blume +Date: 2000/06/29 16:04:00 JST +Tag: blume-20000629-yacctool +Description: + +Changes: + +1. Class "mlyacc" now takes separate arguments to pass options to + generated .sml- and .sig-files independently. +2. Corresponding CM manual updates. +3. BTrace module now also reports call sites. (However, for loop clusters + it only shows from where the cluster was entered.) There are associated + modifications to core.sml, internals.{sig,sml}, btrace.sml, and btimp.sml. + +---------------------------------------------------------------------- +Name: Matthias Blume +Date: 2000/06/27 16:51:00 JST +Tag: blume-20000627-noweb +Description: + +Changes: + + 1. Implemented "subdir" and "witness" options for noweb tool. + This caused some slight internal changes in CM's tool implementation. + 2. Fixed bug in "tool plugin" mechanism. This is essentially cleaning + some remaining issues from earlier path anchor changes. + 3. Updated CM manual accordingly. + + 4. Changed implementation of back-tracing so that I now consider it + ready for prime-time. + + In particular, you don't have to explicitly trigger the back-trace + anymore. Instead, if you are running BTrace-instrumented code and + there is an uncaught exception (regardless of whether or not it was + raised in instrumented code), the top-level evalloop will print + the back-trace. + + Features: + + - Instrumented and uninstrumented code work together seemlessly. + (Of course, uninstrumented code is never mentioned in actual + back-traces.) + + - Asymptotic time- and space-complexity of instrumented code is + equal to that of uninstrumented code. (This means that + tail-recursion is preserved by the instrumentation phase.) + + - Modules whose code has been instrumented in different sessions + work together without problem. + + - There is no penalty whatsoever on uninstrumented code. + + - There is no penalty on "raise" expressions, even in + instrumented code. + + A potential bug (or perhaps it is a feature, too): + + A back-trace reaches no further than the outermost instrumented + non-trivial "raise". Here, a "trivial" raise is one that is the + sole RHS of a "handle" rule. Thus, back-traces reach trough + + handle e => raise e + + and even + + handle Foo => raise Bar + + and, of course, through + + handle Foo => ... + + if the exception was not Foo. + + Back-traces always reach right through any un-instrumented code + including any of its "handle" expressions, trivial or not. + + To try this out, do the following: + + - Erase all existing binfiles for your program. + (You may keep binfiles for those modules where you think you + definitely don't need back-tracing.) + - Turn on back-trace instrumentation: + SMLofNJ.Internals.BTrace.mode (SOME true); + - Recompile your program. (I.e., run "CM.make" or "use".) + - You may now turn instrumentation off again (if you want): + SMLofNJ.Internals.BTrace.mode (SOME false); + - Run your program as usual. If it raises an exception that + reaches the interactive toplevel, then a back-trace will + automatically be printed. After that, the toplevel loop + will print the exception history as usual. + +---------------------------------------------------------------------- +Name: Matthias Blume +Date: 2000/06/26 09:56:46 JST +Tag: blume-20000626-setup +Description: + +CM: - setup-parameter to "sml" added; this can be used to run arbitrary + ML code before and after compiling a file (e.g., to set compiler + flags) + +Compiler: - improved btrace API (in core.sml, internals.{sig,sml}) + - associated changes to btrace.sml (BTrace instrumentation pass) + - cleaner implementation of btimp.sml (BTrace tracing and report + module) + +CM manual: * new path encoding documented + * description of setup-parameter to "sml" added + +The biggest user-visible change to back-tracing is that it is no +longer necessary to compile all traced modules within the same +session. (This was a real limitation.) + +---------------------------------------------------------------------- +Name: Matthias Blume +Date: 2000/06/24 12:40:00 JST +Tag: blume-20000624-startup +Description: + +Fixes startup slowdown problem. (I was calling SrcPath.sync a _tad_ +bit too often -- to put it mildly. :) + +---------------------------------------------------------------------- +Name: Matthias Blume +Date: 2000/06/23 18:20:00 JST +Tag: blume-20000623-btrace +Description: + +This updates adds a backtrace facility to aid programmers in debugging +their programs. This involves the following changes: + +1. Module system/smlnj/init/core.sml (structure _Core) now has hooks for + keeping track of the current call stack. When programs are compiled + in a special mode, the compiler will insert calls to these hooks + into the user program. + "Hook" means that it is possible for different implementations of + back-tracing to register themselves (at different times). + +2. compiler/MiscUtil/profile/btrace.sml implements the annotation phase + as an Absyn.dec->Absyn.dec rewrite. Normally this phase is turned off. + It can be turned on using this call: + SMLofNJ.Internals.BTrace.mode (SOME true); + Turning it off again: + SMLofNJ.Internals.BTrace.mode (SOME false); + Querying the current status: + SMLofNJ.Internals.BTrace.mode NONE; + Annotated programs are about twice as big as normal ones, and they + run a factor of 2 to 4 slower with a dummy back-trace plugin (one + where all hooks do nothing). The slowdown with a plugin that is + actually useful (such as the one supplied by default) is even greater, + but in the case of the default plugin it is still only an constant + factor (amortized). + +3. system/Basis/Implementation/NJ/internals.{sig,sml} have been augmented + with a sub-structure BTrace for controlling back-tracing. In particular, + the above-mentioned function "mode" controls whether the annotation + phase is invoked by the compiler. Another important function is + "trigger": when called it aborts the current execution and causes + the top-level loop to print a full back-trace. + +4. compiler/MiscUtil/profile/btimp.sml is the current default plugin + for back-tracing. It keeps track of the dynamic call stack and in + addition to that it keeps a partial history at each "level" of that + stack. For example, if a tail-calls b, b tail-calls c, and c tail-calls + d and b (at separate times, dynamically), then the report will show: + + GOTO d + /c + GOTO \b + CALL a + + This shows that there was an initial non-tail call of a, then a + tail-call to b or c, looping behavior in a cluster of functions that + consist of b and c, and then a goto from that cluster (i.e., either from + b or from c) to d. + + Note that (depending on the user program) the amount of information + that the back-trace module has to keep track of at each level is bounded + by a constant. Thus, the whole implementation has the same asymptotical + complexity as the original program (both in space and in time). + +5. compiler/TopLevel/interact/evalloop.sml has been modified to + handle the special exception SMLofNJ.Internals.BTrace.BTrace + which is raised by the "trigger" function mentioned above. + +Notes on usage: + +- Annotated code works well together with unannotated code: +Unannotated calls simply do not show up at all in the backtrace. + +- It is not a good idea to let modules that were annotated during +different sessions run at the same time. This is because the compiler +chooses small integers to identify individual functions, and there +will be clashes if different modules were compiled in separate sessions. +(Nothing will crash, and you will even be told about the clashes, but +back-trace information will in general not be useful.) + +- Back-tracing can be confused by callcc and capture. + +- The only way of getting a back-trace right now is to explicitly +invoke the "trigger" function from your user program. Eventually, we +should make every exception carry back-trace information (if +available). But since this creates more overhead at "raise"-time +(similar to the current exnHistory overhead), I have not yet +implemented this. (The implementation will be rather easy.) With +exceptions carrying back-trace information, this facility will be even +more useful because users don't need to modify their programs... + +- While it is possible to compile the compiler with back-trace +annotations turned on (I did it to get some confidence in +correctness), you must make absolutely sure that core.sml and +btimp.sml are compiled WITHOUT annotation! (core.sml cannot actually +be compiled with annotation because there is no core access yet, but +if you compile btimp.sml with annotation, then the system will go into +an infinite recursion and crash.) +Since CM currently does not know about BTrace, the only way to turn +annotations on and off for different modules of the compiler is to +interrupt CMB.make, change the settings, and re-invoke it. Of course, +this is awkward and clumsy. + +Sample sessions: + +Standard ML of New Jersey v110.28.1 [FLINT v1.5], June 5, 2000 +- SMLofNJ.Internals.BTrace.mode (SOME true); +[autoloading] +[autoloading done] +val it = false : bool +- structure X = struct +- fun main n = let +- fun a (x, 0) = d x +- | a (x, n) = b (x, n - 1) +- and b (x, n) = c (x, n) +- and c (x, n) = a (x, n) +- and d x = e (x, 3) +- and e (x, 0) = f x +- | e (x, n) = e (x, n - 1) +- and f 0 = SMLofNJ.Internals.BTrace.trigger () +- | f n = n * g (n - 1) +- and g n = a (n, 3) +- in +- f n +- end +- end; +structure X : sig val main : int -> int end +- X.main 3; +*** BACK-TRACE *** +GOTO stdIn:4.2-13.20: X.main[2].f +GOTO-( stdIn:4.2-13.20: X.main[2].e +GOTO stdIn:4.2-13.20: X.main[2].d + / stdIn:4.2-13.20: X.main[2].a + | stdIn:4.2-13.20: X.main[2].b +GOTO-\ stdIn:4.2-13.20: X.main[2].c +CALL stdIn:4.2-13.20: X.main[2].g +GOTO stdIn:4.2-13.20: X.main[2].f +GOTO-( stdIn:4.2-13.20: X.main[2].e +GOTO stdIn:4.2-13.20: X.main[2].d + / stdIn:4.2-13.20: X.main[2].a + | stdIn:4.2-13.20: X.main[2].b +GOTO-\ stdIn:4.2-13.20: X.main[2].c +CALL stdIn:4.2-13.20: X.main[2].g +GOTO stdIn:4.2-13.20: X.main[2].f +GOTO-( stdIn:4.2-13.20: X.main[2].e +GOTO stdIn:4.2-13.20: X.main[2].d + / stdIn:4.2-13.20: X.main[2].a + | stdIn:4.2-13.20: X.main[2].b +GOTO-\ stdIn:4.2-13.20: X.main[2].c +CALL stdIn:4.2-13.20: X.main[2].g +GOTO stdIn:4.2-13.20: X.main[2].f +CALL stdIn:2.15-17.4: X.main[2] +- + +(Note that because of a FLINt bug the above code currently does not +compile without BTrace turned on.) + +Here is another example, using my modified Tiger compiler: + +Standard ML of New Jersey v110.28.1 [FLINT v1.5], June 5, 2000 +- SMLofNJ.Internals.BTrace.mode (SOME true); +[autoloading] +[autoloading done] +val it = false : bool +- CM.make "sources.cm"; +[autoloading] +... +[autoloading done] +[scanning sources.cm] +[parsing (sources.cm):parse.sml] +[creating directory CM/SKEL ...] +[parsing (sources.cm):tiger.lex.sml] +... +[wrote CM/sparc-unix/semant.sml] +[compiling (sources.cm):main.sml] +[wrote CM/sparc-unix/main.sml] +[New bindings added.] +val it = true : bool +- Main.compile ("../testcases/merge.tig", "foo.out"); +*** BACK-TRACE *** +CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trvar +CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp +CALL lib/semant.sml:289.3-295.22: SemantFun[2].transExp.trexp.check[2] +GOTO lib/semant.sml:289.3-295.22: SemantFun[2].transExp.trexp.check[2] +CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp +CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp +CALL lib/semant.sml:488.3-505.6: SemantFun[2].transDec.trdec[2].transBody[2] + / lib/semant.sml:411.65-543.8: SemantFun[2].transDec +CALL-\ lib/semant.sml:413.2-540.9: SemantFun[2].transDec.trdec[2] +CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp +CALL lib/semant.sml:8.52-558.4: SemantFun[2].transProg[2] +CALL main.sml:1.18-118.4: Main.compile[2] +- + +---------------------------------------------------------------------- +Name: Matthias Blumen +Date: 2000/06/21 18:00:00 JST +Tag: blume-20000621-manual +Description: + +CM manual update: Path environments documented. + +---------------------------------------------------------------------- +Name: Matthias Blume +Date: 2000/06/19 13:40:00 +Tag: blume-20000619-manual +Description: + +CM manual and system/README update. This only covers the fact that +there are no more implicit anchors. (Path environments and the "bind" +option to "cm" have yet to be documented.) + +---------------------------------------------------------------------- +Name: Matthias Blume +Date: 2000/06/19 11:05:00 JST +Tag: blume-20000619-chdir-bugfix +Description: + +Fixed a bug in new SrcPath module that sometimes led to a bad chDir call. + +---------------------------------------------------------------------- +Name: Matthias Blume +Date: 2000/06/18 22:00:10 JST +Tag: blume-20000618-implicit-anchors-really-gone +Description: + +I updates the previous HISTORY entry where I forgot to mention that +implicit anchors are no longer with us. + +The current update also gets rid of the (now useless) controller +CM.Control.implicit_anchors. + +---------------------------------------------------------------------- +Name: Matthias Blume +Date: 2000/06/16 17:30:00 JST +Tag: blume-20000616-anchorenv +Description: + +This patch implements the long anticipated (just kidding :) "anchor +environment" mechanism. In the course of doing this, I also +re-implemented CM's internal "SrcPath" module from scratch. The new +one should be more robust in certain boundary cases. In any case, it +is a lot cleaner than its predecessor (IMHO). + +This time, although there is yet another boot file format change, I +kept the unpickler backward-compatible. As a result, no new bootfiles +are necessary and bootstrapping is straightforward. (You cannot read +new bootfiles into an old system, but the other way around is no +problem.) + +Visible changes: + +** 0. Implicit path anchors (without the leading $-symbol) are no +longer recognized at all. This means that such path names are not +illegal either. For example, the name basis.cm simply refers to a +local file called "basis.cm" (i.e, the name is an ordinary path +relative to .cm-files directory). Or, to put it differently, only +names that start with $ are anchored paths. + +** 1. The $ abbreviation for $/ has finally +vanished. + +John (Reppy) had critizised this as soon as I originally proposed and +implemented it, but at that time I did not really deeply believe +him. :) Now I came full-circle because I need the $ syntax +in another place where it cannot be seen as an abbreviation for +$/. To avoid the confusion, $ now means what it +seems to mean (i.e., it "expands" into the corresponding anchor +value). + +However, when paths are used as members in CM description files, it +continues to be true that there must be at least another arc after the +anchor. This is now enforced separately during semantic analysis +(i.e., from a lexical/syntactical point of view, the notation is ok.) + +** 2. The "cm" class now accepts an option "bind". The option's value +is a sub-option list of precisely two items -- one labeled "anchor" +and the other one labeled "value". As you might expect, "anchor" is +used to specify an anchor name to be bound, and "value" specifies what +the anchor is being bound to. + +The value must be a directory name and can be given in either standard +syntax (including the possibility that it is itself an anchored path) +or native syntax. + +Examples: + + foo.cm (bind:(anchor:bar value:$mystuff/bar)) + lib.cm (bind:(anchor:a value:"H:\\x\\y\\z")) (* only works under windows *) + +and so on. + +The meaning of this is that the .cm-file will be processed with an +augmented anchor environment where the given anchor(s) is/are bound to +the given values(s). + +The rationale for having this feature is this: Suppose you are trying +to use two different (already stable) libraries a.cm and b.cm (that +you perhaps didn't write yourself). Further, suppose each of these +two libraries internally uses its own auxiliary library $aux/lib.cm. +Normally you would now have a problem because the anchor "lib" can not +be bound to more than one value globally. Therefore, the project that +uses both a.cm and b.cm must locally redirect the anchor to some other +place: + + a.cm (bind:(anchor:lib value:/usr/lib/smlnj/a-stuff)) + b.cm (bind:(anchor:lib value:/usr/lib/smlnj/b-stuff)) + +This hard-wires $lib/aux.cm to /usr/lib/smlnj/a-stuff/aux.cm or +/usr/lib/smlnj/b-stuff/aux.cm, respectively. + +Hard-wiring path names is a bit inflexible (and CM will verbosely warn +you when you do so at the time of CM.stabilize). Therefore, you can +also use an anchored path as the value: + + a.cm (bind:(anchor:lib value:$a-lib)) + b.cm (bind:(anchor:lib value:$b-lib)) + +Now you can globally configure (using the usual CM.Anchor.anchor or +pathconfig machinery) bindings for "a-lib" and "b-lib". Since "lib" +itself is always locally bound, setting it globally is no longer +meaningful or necessary (but it does not hurt either). In fact, "lib" +can still be used as a global anchor for separate purposes. As a +matter of fact, one can locally define "lib" in terms of a global +"lib": + + a.cm (bind:(anchor:lib value:$lib/a)) + b.cm (bind:(anchor:lib value:$lib/b)) + +** 3: The encoding of path names has changed. This affects the way +path names are shown in CM's progress report and also the internal +protocol encoding used for parallel make. + +The encoding now uses one or more ':'-separated segments. Each +segments corresponds to a file that has been specified relative to the +file given by its preceding segment. The first segment is either +relative to the CWD, absolute, or anchored. Each segment itself is +basically a Unix pathname; all segments but the first are relative. + +Example: + + $foo/bar/baz.cm:a/b/c.sml + +This path denotes the file bar/a/b/c.sml relative to the directory +denoted by anchor "foo". Notice that the encoding also includes +baz.cm which is the .cm-file that listed a/b/c.sml. As usual, such +paths are resolved relative to the .cm-files directory, so baz.cm must +be ignored to get the "real" pathname. + +To make this fact more obvious, CM puts the names of such "virtual +arcs" into parentheses when they appear in progress reports. (No +parentheses will appear in the internal protocol encoding.) Thus, +what you really see is: + + $foo/bar/(baz.cm):a/b/c.sml + +I find this notation to be much more informative than before. + +Another new feature of the encoding is that special characters +including parentheses, colons, (back)slashes, and white space are +written as \ddd (where ddd is the decimal encoding of the character). + +*** The CM manual still needs to be updated. + +---------------------------------------------------------------------- Name: Allen Leung Date: 2000/06/15 00:38:00 Tag: leunga-20000615-x86-peephole
Click to toggle
does not end with </html> tag
does not end with </body> tag
The output has ended thus: ------------------- Name: Allen Leung Date: 2000/06/15 00:38:00 Tag: leunga-20000615-x86-peephole