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

Diff of /sml/trunk/src/cm/stable/stabilize.sml

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

revision 311, Wed Jun 2 09:08:48 1999 UTC revision 323, Wed Jun 9 06:16:22 1999 UTC
# Line 15  Line 15 
15      structure E = GenericVC.Environment      structure E = GenericVC.Environment
16    
17      type statenvgetter = GP.info -> DG.bnode -> E.staticEnv      type statenvgetter = GP.info -> DG.bnode -> E.staticEnv
18      type recomp = GG.group * GP.info -> bool      type recomp = GP.info -> GG.group -> bool
19  in  in
20    
21  signature STABILIZE = sig  signature STABILIZE = sig
# Line 82  Line 82 
82    
83      fun stabilize gp { group = g as GG.GROUP grec, anyerrors } = let      fun stabilize gp { group = g as GG.GROUP grec, anyerrors } = let
84    
85            val primconf = #primconf (#param gp)
86            val policy = #fnpolicy (#param gp)
87    
88          fun doit granted = let          fun doit granted = let
89    
90                val _ =
91                    if StringSet.isEmpty granted then ()
92                    else
93                        Say.say ("$Stabilize: wrapping the following privileges:\n"
94                                 :: map (fn s => ("  " ^ s ^ "\n"))
95                                        (StringSet.listItems granted))
96    
97              val bname = AbsPath.name o SmlInfo.binpath              val bname = AbsPath.name o SmlInfo.binpath
98              val bsz = OS.FileSys.fileSize o bname              val bsz = OS.FileSys.fileSize o bname
99              fun cpb s i = let              fun cpb s i = let
# Line 213  Line 224 
224                                 (w_sharing (SmlInfo.share i) k)))                                 (w_sharing (SmlInfo.share i) k)))
225              end              end
226    
227              fun w_primitive p k m = String.str (Primitive.toIdent p) :: k m              fun w_primitive p k m =
228                    String.str (Primitive.toIdent primconf p) :: k m
229    
230              fun w_abspath_raw p k m = w_list w_string (AbsPath.pickle p) k m              fun w_abspath_raw p k m = w_list w_string (AbsPath.pickle p) k m
231    
# Line 314  Line 326 
326              end              end
327              val memberlist = rev (!members)              val memberlist = rev (!members)
328    
             val policy = #fnpolicy (#param gp)  
329              val gpath = #grouppath grec              val gpath = #grouppath grec
330              val spath = FilenamePolicy.mkStablePath policy gpath              val spath = FilenamePolicy.mkStablePath policy gpath
331              fun delete () = deleteFile (AbsPath.name spath)              fun delete () = deleteFile (AbsPath.name spath)
# Line 338  Line 349 
349          case #stableinfo grec of          case #stableinfo grec of
350              GG.STABLE _ => SOME g              GG.STABLE _ => SOME g
351            | GG.NONSTABLE granted =>            | GG.NONSTABLE granted =>
352                  if not (recomp (g, gp)) then                  if not (recomp gp g) then
353                      (anyerrors := true; NONE)                      (anyerrors := true; NONE)
354                  else let                  else let
355                      fun notStable (GG.GROUP { stableinfo, ... }) =                      fun notStable (GG.GROUP { stableinfo, ... }) =
# Line 389  Line 400 
400    
401          exception Format          exception Format
402    
403            val pcmode = #pcmode (#param gp)
404          val policy = #fnpolicy (#param gp)          val policy = #fnpolicy (#param gp)
405            val primconf = #primconf (#param gp)
406          val spath = FilenamePolicy.mkStablePath policy group          val spath = FilenamePolicy.mkStablePath policy group
407          val _ = Say.vsay ["[checking stable ", gname, "]\n"]          val _ = Say.vsay ["[checking stable ", gname, "]\n"]
408          val s = AbsPath.openBinIn spath          val s = AbsPath.openBinIn spath
# Line 489  Line 502 
502    
503          val r_abspath = let          val r_abspath = let
504              fun r_abspath_raw () =              fun r_abspath_raw () =
505                  case AbsPath.unpickle (r_list r_string ()) of                  case AbsPath.unpickle pcmode (r_list r_string ()) of
506                      SOME p => p                      SOME p => p
507                    | NONE => raise Format                    | NONE => raise Format
508              fun unUAP (UAP x) = x              fun unUAP (UAP x) = x
# Line 529  Line 542 
542          val r_filter = r_option r_ss          val r_filter = r_option r_ss
543    
544          fun r_primitive () =          fun r_primitive () =
545              case Primitive.fromIdent (rd ()) of              case Primitive.fromIdent primconf (rd ()) of
546                  NONE => raise Format                  NONE => raise Format
547                | SOME p => p                | SOME p => p
548    

Legend:
Removed from v.311  
changed lines
  Added in v.323

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