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

SCM Repository

[smlnj] Annotation of /sml/trunk/src/cm/bootstrap/mkbootlist.sml
ViewVC logotype

Annotation of /sml/trunk/src/cm/bootstrap/mkbootlist.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 537 - (view) (download)

1 : blume 337 (*
2 :     * Building the bootlist from a dependency graph...
3 :     *
4 :     * (C) 1999 Lucent Technologies, Bell Laboratories
5 :     *
6 :     * Author: Matthias Blume (blume@kurims.kyoto-u.ac.jp)
7 :     *)
8 : blume 537 local
9 :     structure PS = GenericVC.PersStamps
10 :     type pid = PS.persstamp
11 :     in
12 :     structure MkBootList = struct
13 :     fun group listName g = let
14 :     val Nil = { l = [], ss = StableSet.empty }
15 :     fun Cons ({ x, s = NONE }, { l, ss }) = { l = x :: l, ss = ss }
16 :     | Cons ({ x, s = SOME i }, { l , ss }) =
17 :     { l = x :: l, ss = StableSet.add (ss, i) }
18 :     fun bininfo i =
19 :     case BinInfo.rts_pid i of
20 :     SOME p => { x = "#" ^ PS.toHex p, s = NONE }
21 :     | NONE => let
22 :     val x = concat [listName (BinInfo.stablename i),
23 :     "@", Int.toString (BinInfo.offset i),
24 :     ":", BinInfo.describe i]
25 :     val s = case BinInfo.sh_mode i of
26 :     Sharing.DONTSHARE => NONE
27 :     | _ => SOME i
28 :     in { x = x, s = s }
29 :     end
30 :     fun smlinfo i = { x = listName (SmlInfo.binname i), s = NONE }
31 :     val arg = { bininfo = bininfo,
32 :     smlinfo = smlinfo,
33 :     Cons = Cons, Nil = Nil }
34 :     in
35 :     MkList.group arg g
36 :     end
37 :     end
38 :     end

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0