Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /sml/trunk/src/cm/Doc/bt-04-api.tex
ViewVC logotype

View of /sml/trunk/src/cm/Doc/bt-04-api.tex

Parent Directory Parent Directory | Revision Log Revision Log

Revision 839 - (download) (as text) (annotate)
Thu Jun 7 20:28:44 2001 UTC (19 years ago) by blume
File size: 2111 byte(s)
several internal changes related to C calls
% -*- latex -*-

\section{Structure CMB}

This section describes the signature of {\tt structure CMB}.  Since
structures representing cross-compilers have the same signature,
everything said here applies ({\em mutatis mutandis}) to them as well.

The primary function to invoke the bootstrap compiler is {\tt

  val make' : string option -> bool

This (re-)compiles the interactive system's entire source tree,
constructing stable versions for all libraries involved.  In the
process, binfiles are placed under directory {\tt $u$.bin.{\it
arch}-{\it os}} where {\it arch} and {\it os} are strings describing
target architecture and target OS, respectively.  The string $u$ is
the optional argument to {\tt CMB.make'}.  If set to {\tt NONE}, it
defaults to \verb|"sml"|.

An alternative equivalent to invoking {\tt CMB.make'} with {\tt NONE}
is to use {\tt CMB.make}:

  val make : unit -> bool

CMB---like CM---maintains a lot of internal state to speed up repeated
invocations.  (Between sessions, much of this state is preserved in
those binfile- and stablefile-directories.  However, reloading is
still quite a bit more expensive than directly using existing in-core

Information that CMB keeps in memory can be completely erased by
issuing the {\tt CMB.reset} command:

  val reset : unit -> unit

After a {\tt CMB.reset()}, the next {\tt CMB.make} (or {\tt CMB.make'})
will have to re-load everything from the file system.

CMB has its own registry of ``CM identifiers''---named values that can
be queried by using the conditional compilation facility.  This
registry is initialized according to CM's rules. Of course, initial
values are not based on current architecture and OS but on those of the
target system.  To explicitly set or erase the values of specific
variables, one can use {\tt CMB.symval} (which acts in a way analogous
to {\tt CM.symval}):

  val symval : string ->
               { get : unit -> int option, set : int option -> unit}

ViewVC Help
Powered by ViewVC 1.0.0