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

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 536, Fri Feb 18 16:51:54 2000 UTC revision 537, Fri Feb 18 17:20:16 2000 UTC
# Line 5  Line 5 
5   *   *
6   * Author: Matthias Blume (blume@kurims.kyoto-u.ac.jp)   * Author: Matthias Blume (blume@kurims.kyoto-u.ac.jp)
7   *)   *)
8  structure MkBootList =  local
9      MkListFn (type element = string * (int * string) option      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 =                fun bininfo i =
19                    (BinInfo.stablename i,                  case BinInfo.rts_pid i of
20                     SOME (BinInfo.offset i, BinInfo.describe i))                      SOME p => { x = "#" ^ PS.toHex p, s = NONE }
21                fun smlinfo i = (SmlInfo.binname i, NONE))                    | 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

Legend:
Removed from v.536  
changed lines
  Added in v.537

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