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 455, Wed Oct 27 08:08:25 1999 UTC revision 456, Wed Oct 27 15:09:58 1999 UTC
# Line 32  Line 32 
32      val osname = FilenamePolicy.kind2name os      val osname = FilenamePolicy.kind2name os
33      val archos = concat [arch, "-", osname]      val archos = concat [arch, "-", osname]
34    
35        fun init_servers (GroupGraph.GROUP { grouppath, ... }) =
36            Servers.cmb { archos = archos, root = grouppath }
37    
38      structure Compile = CompileFn (structure MachDepVC = MachDepVC      structure Compile = CompileFn (structure MachDepVC = MachDepVC
39                                     val compile_there = Servers.compile)                                     val compile_there = Servers.compile)
40    
# Line 43  Line 46 
46                       structure MachDepVC = MachDepVC                       structure MachDepVC = MachDepVC
47                       fun recomp gp g = let                       fun recomp gp g = let
48                           val { store, get } = BFC.new ()                           val { store, get } = BFC.new ()
49                             val _ = init_servers g
50                           val { group, ... } =                           val { group, ... } =
51                               Compile.newTraversal (fn _ => fn _ => (),                               Compile.newTraversal (fn _ => fn _ => (),
52                                                     store, g)                                                     store, g)
# Line 91  Line 95 
95                    AutoDir.openBinOut, BinIO.closeOut,                    AutoDir.openBinOut, BinIO.closeOut,
96                    BinIO.inputN, BinIO.output, BinIO.endOfStream)                    BinIO.inputN, BinIO.output, BinIO.endOfStream)
97    
98      fun mk_compile deliver dbopt = let      fun mk_compile deliver root dbopt = let
99    
100          val dirbase = getOpt (dbopt, BtNames.dirbaseDefault)          val dirbase = getOpt (dbopt, BtNames.dirbaseDefault)
101          val pcmodespec = BtNames.pcmodespec          val pcmodespec = BtNames.pcmodespec
# Line 136  Line 140 
140          fun stdpath s = SrcPath.standard pcmode { context = ctxt, spec = s }          fun stdpath s = SrcPath.standard pcmode { context = ctxt, spec = s }
141    
142          val initgspec = stdpath initgspec          val initgspec = stdpath initgspec
143          val maingspec = stdpath maingspec          val maingspec =
144                case root of
145                    NONE => stdpath maingspec
146                  | SOME r => stdpath r
147    
148          val cmifile = valOf (SrcPath.reAnchoredName (initgspec, bootdir))          val cmifile = valOf (SrcPath.reAnchoredName (initgspec, bootdir))
149              handle Option => raise Fail "BootstrapCompile: cmifile"              handle Option => raise Fail "BootstrapCompile: cmifile"
# Line 237  Line 244 
244              val stab =              val stab =
245                  if deliver then SOME true else NONE                  if deliver then SOME true else NONE
246          in          in
247              Servers.cmb { archos = archos, dirbase = dirbase };              Servers.dirbase dirbase;
248              case Parse.parse NONE param stab maingspec of              case Parse.parse NONE param stab maingspec of
249                  NONE => NONE                  NONE => NONE
250                | SOME (g, gp) => let                | SOME (g, gp) => let
251                      fun thunk () = let                      fun thunk () = let
252                            val _ = init_servers g
253                          fun store _ = ()                          fun store _ = ()
254                          val { group = recomp, ... } =                          val { group = recomp, ... } =
255                              Compile.newTraversal (fn _ => fn _ => (), store, g)                              Compile.newTraversal (fn _ => fn _ => (), store, g)
# Line 310  Line 318 
318      end      end
319    
320      fun compile deliver dbopt =      fun compile deliver dbopt =
321          case mk_compile deliver dbopt of          case mk_compile deliver NONE dbopt of
322              NONE => false              NONE => false
323            | SOME (_, thunk) =>            | SOME (_, thunk) =>
324                  SafeIO.perform { openIt = fn () => (),                  SafeIO.perform { openIt = fn () => (),
# Line 319  Line 327 
327                                   cleanup = fn () => () }                                   cleanup = fn () => () }
328    
329      local      local
330          fun slave dirbase =          fun slave (dirbase, root) =
331              case mk_compile false (SOME dirbase) of              case mk_compile false (SOME root) (SOME dirbase) of
332                  NONE => NONE                  NONE => NONE
333                | SOME ((g, gp), _) => let                | SOME ((g, gp), _) => let
334                      val trav = Compile.newSbnodeTraversal () gp                      val trav = Compile.newSbnodeTraversal () gp

Legend:
Removed from v.455  
changed lines
  Added in v.456

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