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

Diff of /sml/trunk/src/cm/link.sml

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

revision 313, Thu Jun 3 09:26:34 1999 UTC revision 314, Fri Jun 4 06:41:45 1999 UTC
# Line 1  Line 1 
1  (* dummy implementation of functor LinkCM *)  (* test implementation of functor LinkCM *)
2    
3  functor LinkCM (structure HostMachDepVC : MACHDEP_VC) = struct  functor LinkCM (structure HostMachDepVC : MACHDEP_VC) = struct
4    
# Line 42  Line 42 
42    
43        fun bn2statenv gp i = #1 (#stat (valOf (RecompTraversal.bnode gp i)))        fun bn2statenv gp i = #1 (#stat (valOf (RecompTraversal.bnode gp i)))
44    
45        fun doall farsbnode (GroupGraph.GROUP { exports, ... }, gp) = let        val recomp_group = RecompTraversal.group
           fun one ((fsbn, _), false) = false  
             | one ((fsbn, _), true) =  
               isSome (farsbnode gp fsbn)  
       in  
           SymbolMap.foldl one true exports  
       end  
46    
47        val recomp_group = doall RecompTraversal.farsbnode        fun exec_group gp g =
48        fun exec_group arg =            (ExecTraversal.group gp g
49            (doall ExecTraversal.farsbnode arg)             before FullPersstate.rememberShared ())
50            before FullPersstate.rememberShared ()  
51        fun make_group (arg as (GroupGraph.GROUP { required = rq, ... }, _)) =        fun make_group gp (g as GroupGraph.GROUP { required = rq, ... }) =
52            (Say.say ("$Execute: required privileges are:\n" ::            (if StringSet.isEmpty rq then ()
53               else Say.say ("$Execute: required privileges are:\n" ::
54                      map (fn s => ("  " ^ s ^ "\n")) (StringSet.listItems rq));                      map (fn s => ("  " ^ s ^ "\n")) (StringSet.listItems rq));
55             if recomp_group arg then exec_group arg else false)             if isSome (recomp_group gp g) then exec_group gp g else NONE)
56    
57        structure Stabilize =  StabilizeFn (val bn2statenv = bn2statenv        structure Stabilize =  StabilizeFn (val bn2statenv = bn2statenv
58                                            val recomp = recomp_group)                                            fun recomp gp g =
59                                                  isSome (recomp_group gp g))
60    
61        structure Parse = ParseFn (structure Stabilize = Stabilize)        structure Parse = ParseFn (structure Stabilize = Stabilize)
62    in    in
# Line 76  Line 72 
72              val primconf = Primitive.configuration { basis = basis }              val primconf = Primitive.configuration { basis = basis }
73              val param = { primconf = primconf,              val param = { primconf = primconf,
74                            fnpolicy = FilenamePolicy.default,                            fnpolicy = FilenamePolicy.default,
75                            keep_going = false,                            keep_going = true,
76                            pervasive = perv,                            pervasive = perv,
77                            corenv = corenv }                            corenv = corenv }
             val g = Parse.parse param sflag p  
78          in          in
79              Option.map f g              case Parse.parse param sflag p of
80                    NONE => NONE
81                  | SOME (g, gp) => f gp g
82          end          end
83    
84          fun stabilize recursively = run (SOME recursively) ignore          fun stabilize recursively =
85                run (SOME recursively) (fn _ => fn _ => SOME ())
86          val recomp = run NONE recomp_group          val recomp = run NONE recomp_group
87          val make = run NONE make_group          val make = run NONE make_group
88      end      end

Legend:
Removed from v.313  
changed lines
  Added in v.314

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