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/btcompile.sml
ViewVC logotype

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

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

revision 356, Sun Jun 27 11:51:16 1999 UTC revision 357, Mon Jun 28 08:46:30 1999 UTC
# Line 7  Line 7 
7   * Author: Matthias Blume (blume@kurims.kyoto-u.ac.jp)   * Author: Matthias Blume (blume@kurims.kyoto-u.ac.jp)
8   *)   *)
9  functor BootstrapCompileFn (structure MachDepVC: MACHDEP_VC  functor BootstrapCompileFn (structure MachDepVC: MACHDEP_VC
10                              val os: SMLofNJ.SysInfo.os_kind) = struct                              val os: SMLofNJ.SysInfo.os_kind) :> sig
11    
12        val compile :
13            { dirbase: string,
14              pcmodespec: string,
15              initgspec: string,
16              maingspec: string,
17              stabilize: bool }
18            -> bool
19    
20    end = struct
21    
22      structure EM = GenericVC.ErrorMsg      structure EM = GenericVC.ErrorMsg
23      structure E = GenericVC.Environment      structure E = GenericVC.Environment
# Line 36  Line 46 
46      (* instantiate Stabilize... *)      (* instantiate Stabilize... *)
47      structure Stabilize =      structure Stabilize =
48          StabilizeFn (fun bn2statenv gp i = #1 (#stat (valOf (RT.bnode gp i)))          StabilizeFn (fun bn2statenv gp i = #1 (#stat (valOf (RT.bnode gp i)))
49                         val getPid = RecompPersstate.pid_fetch_sml
50                         fun warmup (i, p) = ()
51                       val recomp = recomp)                       val recomp = recomp)
52      (* ... and Parse *)      (* ... and Parse *)
53      structure Parse = ParseFn (structure Stabilize = Stabilize)      structure Parse = ParseFn (structure Stabilize = Stabilize)
54    
55      fun compile { binroot, pcmodespec, initgspec, maingspec, stabilize } = let      fun compile { dirbase, pcmodespec, initgspec, maingspec, stabilize } = let
56    
57            val arch = MachDepVC.architecture
58            val osname = FilenamePolicy.kind2name os
59            val bindir = concat [dirbase, ".bin.", arch, "-", osname]
60            val bootdir = concat [dirbase, ".boot.", arch, "-", osname]
61    
62          val keep_going = EnvConfig.getSet StdConfig.keep_going NONE          val keep_going = EnvConfig.getSet StdConfig.keep_going NONE
63    
64          val ctxt = SrcPath.cwdContext ()          val ctxt = SrcPath.cwdContext ()
65    
66          val pidfile = OS.Path.joinDirFile { dir = binroot, file = "RTPID" }          val pidfile = OS.Path.joinDirFile { dir = bootdir, file = "RTPID" }
67          val listfile = OS.Path.joinDirFile { dir = binroot, file = "BINLIST" }          val listfile = OS.Path.joinDirFile { dir = bootdir, file = "BINLIST" }
68    
69          val pcmode = let          val pcmode = let
70              fun work s = let              fun work s = let
# Line 76  Line 93 
93          val initgspec = stdpath initgspec          val initgspec = stdpath initgspec
94          val maingspec = stdpath maingspec          val maingspec = stdpath maingspec
95    
96          val fnpolicy =          val initfnpolicy =
97              FilenamePolicy.separate binroot              FilenamePolicy.separate { bindir = bootdir, bootdir = bootdir }
98                  { arch = MachDepVC.architecture, os = os }                  { arch = arch, os = os }
99    
100            val mainfnpolicy =
101                FilenamePolicy.separate { bindir = bindir, bootdir = bootdir }
102                    { arch = arch, os = os }
103    
104          fun mkParam { primconf, pervasive, pervcorepids } { corenv } =          fun mkParam { primconf, pervasive, pervcorepids, fnpolicy }
105                        { corenv } =
106              { primconf = primconf,              { primconf = primconf,
107                fnpolicy = fnpolicy,                fnpolicy = fnpolicy,
108                pcmode = pcmode,                pcmode = pcmode,
# Line 111  Line 133 
133    
134          val mkInitParam = mkParam { primconf = primconf,          val mkInitParam = mkParam { primconf = primconf,
135                                      pervasive = E.emptyEnv,                                      pervasive = E.emptyEnv,
136                                      pervcorepids = PidSet.empty }                                      pervcorepids = PidSet.empty,
137                                        fnpolicy = initfnpolicy }
138    
139          val param_nocore = mkInitParam { corenv = BE.staticPart BE.emptyEnv }          val param_nocore = mkInitParam { corenv = BE.staticPart BE.emptyEnv }
140    
# Line 172  Line 195 
195                              PidSet.addList (PidSet.empty,                              PidSet.addList (PidSet.empty,
196                                              [#2 (#stat pervasive),                                              [#2 (#stat pervasive),
197                                               #2 (#sym pervasive),                                               #2 (#sym pervasive),
198                                               #2 (#stat core)]) }                                               #2 (#stat core)]),
199                              fnpolicy = mainfnpolicy }
200                          { corenv = corenv }                          { corenv = corenv }
201              val stableflag = if stabilize then SOME true else NONE              val stableflag = if stabilize then SOME true else NONE
202          in          in

Legend:
Removed from v.356  
changed lines
  Added in v.357

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