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/main/cm-boot.sml
ViewVC logotype

Diff of /sml/trunk/src/cm/main/cm-boot.sml

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

revision 375, Wed Jul 7 03:08:04 1999 UTC revision 380, Fri Jul 9 05:22:18 1999 UTC
# Line 26  Line 26 
26        structure CoerceEnv = GenericVC.CoerceEnv        structure CoerceEnv = GenericVC.CoerceEnv
27        structure EM = GenericVC.ErrorMsg        structure EM = GenericVC.ErrorMsg
28        structure BF = HostMachDepVC.Binfile        structure BF = HostMachDepVC.Binfile
29          structure P = OS.Path
30          structure F = OS.FileSys
31    
32        val os = SMLofNJ.SysInfo.getOSKind ()        val os = SMLofNJ.SysInfo.getOSKind ()
33    
# Line 65  Line 67 
67            handle Option => raise Fail "bn2statenv"            handle Option => raise Fail "bn2statenv"
68    
69        (* exec_group is basically the same as ET.group with        (* exec_group is basically the same as ET.group with
70         * two additional actions to be taken:         * one additional actions to be taken:
71         *   1. Before executing the code, we announce the priviliges         *      Before executing the code, we announce the priviliges
72         *      that are being invoked.  (For the time being, we assume         *      that are being invoked.  (For the time being, we assume
73         *      that everybody has every conceivable privilege, but at the         *      that everybody has every conceivable privilege, but at the
74         *      very least we announce which ones are being made use of.)         *      very least we announce which ones are being made use of.) *)
        *   2. After we are done we must make the values of "shared"  
        *      compilation units permanent. *)  
75        fun exec_group gp (g as GroupGraph.GROUP { required = rq, ... }) =        fun exec_group gp (g as GroupGraph.GROUP { required = rq, ... }) =
76            (if StringSet.isEmpty rq then ()            (if StringSet.isEmpty rq then ()
77             else Say.say ("$Execute: required privileges are:\n" ::             else Say.say ("$Execute: required privileges are:\n" ::
# Line 129  Line 129 
129            val theValues = ref (NONE: kernelValues option)            val theValues = ref (NONE: kernelValues option)
130    
131        in        in
132            fun setAnchor (a, s) = PathConfig.set (pcmode, a, s)            fun setAnchor (a, s) =
133                  (PathConfig.set (pcmode, a, s); SrcPath.sync ())
134              (* cancelling anchors cannot affect the order of existing paths
135               * (it may invalidate some paths; but all other ones stay as
136               * they are) *)
137            fun cancelAnchor a = PathConfig.cancel (pcmode, a)            fun cancelAnchor a = PathConfig.cancel (pcmode, a)
138              (* same goes for reset because it just cancels all anchors... *)
139            fun resetPathConfig () = PathConfig.reset pcmode            fun resetPathConfig () = PathConfig.reset pcmode
140    
141            fun showPending () = let            fun showPending () = let
# Line 219  Line 224 
224                val _ = let                val _ = let
225                    fun listDir ds = let                    fun listDir ds = let
226                        fun loop l =                        fun loop l =
227                            case OS.FileSys.readDir ds of                            case F.readDir ds of
228                                "" => l                                "" => l
229                              | x => loop (x :: l)                              | x => loop (x :: l)
230                    in                    in
231                        loop []                        loop []
232                    end                    end
233                    val fileList = SafeIO.perform                    val fileList = SafeIO.perform
234                        { openIt = fn () => OS.FileSys.openDir bootdir,                        { openIt = fn () => F.openDir bootdir,
235                          closeIt = OS.FileSys.closeDir,                          closeIt = F.closeDir,
236                          work = listDir,                          work = listDir,
237                          cleanup = fn () => () }                          cleanup = fn () => () }
238                    fun isDir x =                    fun isDir x = F.isDir x handle _ => false
                       OS.FileSys.isDir x handle _ => false  
239                    fun subDir x = let                    fun subDir x = let
240                        val d = OS.Path.concat (bootdir, x)                        val d = P.concat (bootdir, x)
241                    in                    in
242                        if isDir d then SOME (x, d) else NONE                        if isDir d then SOME (x, d) else NONE
243                    end                    end

Legend:
Removed from v.375  
changed lines
  Added in v.380

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