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

Diff of /sml/trunk/src/cm/smlfile/smlinfo.sml

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

revision 514, Thu Dec 16 08:32:57 1999 UTC revision 537, Fri Feb 18 17:20:16 2000 UTC
# Line 17  Line 17 
17      type region = GenericVC.SourceMap.region      type region = GenericVC.SourceMap.region
18      type source = GenericVC.Source.inputSource      type source = GenericVC.Source.inputSource
19    
20        type attribs =
21            { split: bool, is_rts: bool,
22              extra_compenv: GenericVC.Environment.staticEnv option }
23    
24      val eq : info * info -> bool        (* compares sourcepaths *)      val eq : info * info -> bool        (* compares sourcepaths *)
25      val compare : info * info -> order  (* compares sourcepaths *)      val compare : info * info -> order  (* compares sourcepaths *)
26    
# Line 37  Line 41 
41      val info : GeneralParams.info ->      val info : GeneralParams.info ->
42          { sourcepath: SrcPath.t,          { sourcepath: SrcPath.t,
43            group: SrcPath.t * region,            group: SrcPath.t * region,
44            sh_spec: Sharing.request,            sh_spec: Sharing.request }
45            split: bool }          -> info
46    
47        val info' : attribs -> GeneralParams.info ->
48            { sourcepath: SrcPath.t,
49              group: SrcPath.t * region,
50              sh_spec: Sharing.request }
51          -> info          -> info
52    
53      val sourcepath : info -> SrcPath.t      val sourcepath : info -> SrcPath.t
# Line 52  Line 61 
61      val sh_spec : info -> Sharing.request      val sh_spec : info -> Sharing.request
62      val set_sh_mode : info * Sharing.mode -> unit      val set_sh_mode : info * Sharing.mode -> unit
63      val sh_mode : info -> Sharing.mode      val sh_mode : info -> Sharing.mode
64      val split : info -> bool      val attribs : info -> attribs
65      val lastseen : info -> TStamp.t      val lastseen : info -> TStamp.t
66    
67      (* forget a parse tree that we are done with *)      (* forget a parse tree that we are done with *)
# Line 67  Line 76 
76       * members of now-stable libraries. *)       * members of now-stable libraries. *)
77      val cleanGroup : bool -> SrcPath.t -> unit      val cleanGroup : bool -> SrcPath.t -> unit
78    
79        (* See if a given piece of info is (still) known here: *)
80        val isKnown : info -> bool
81    
82      (* Delete all known info. *)      (* Delete all known info. *)
83      val reset : unit -> unit      val reset : unit -> unit
84    
# Line 92  Line 104 
104    
105      type complainer = EM.complainer      type complainer = EM.complainer
106    
107        type attribs =
108            { split: bool, is_rts: bool,
109              extra_compenv: GenericVC.Environment.staticEnv option }
110    
111      type generation = unit ref      type generation = unit ref
112    
113      (* sh_mode is an elaboration of sh_spec;  it must be persistent      (* sh_mode is an elaboration of sh_spec;  it must be persistent
# Line 110  Line 126 
126                    mkBinname: unit -> string,                    mkBinname: unit -> string,
127                    persinfo: persinfo,                    persinfo: persinfo,
128                    sh_spec: Sharing.request,                    sh_spec: Sharing.request,
129                    split: bool }                    attribs: attribs }
130    
131      type ord_key = info      type ord_key = info
132    
# Line 128  Line 144 
144      fun sh_mode (INFO { persinfo = PERS { sh_mode = ref m, ... }, ... }) = m      fun sh_mode (INFO { persinfo = PERS { sh_mode = ref m, ... }, ... }) = m
145      fun set_sh_mode (INFO { persinfo = PERS { sh_mode, ... }, ... }, m) =      fun set_sh_mode (INFO { persinfo = PERS { sh_mode, ... }, ... }, m) =
146          sh_mode := m          sh_mode := m
147      fun split (INFO { split = s, ... }) = s      fun attribs (INFO { attribs = a, ... }) = a
148    
149      fun gerror (gp: GeneralParams.info) = GroupReg.error (#groupreg gp)      fun gerror (gp: GeneralParams.info) = GroupReg.error (#groupreg gp)
150    
# Line 144  Line 160 
160    
161      val knownInfo = ref (SrcPathMap.empty: persinfo SrcPathMap.map)      val knownInfo = ref (SrcPathMap.empty: persinfo SrcPathMap.map)
162    
163        fun isKnown (INFO { sourcepath, ... }) =
164            isSome (SrcPathMap.find (!knownInfo, sourcepath))
165    
166      fun countParseTrees () = let      fun countParseTrees () = let
167          fun one (PERS { parsetree = ref (SOME _), ... }, i) = i + 1          fun one (PERS { parsetree = ref (SOME _), ... }, i) = i + 1
168            | one (_, i) = i            | one (_, i) = i
# Line 181  Line 200 
200          else ()          else ()
201      end      end
202    
203      fun info (gp: GeneralParams.info) arg = let      fun info' attribs (gp: GeneralParams.info) arg = let
204          val { sourcepath, group = gr as (group, region), sh_spec, split } = arg          val { sourcepath, group = gr as (group, region), sh_spec } = arg
205          val policy = #fnpolicy (#param gp)          val policy = #fnpolicy (#param gp)
206          fun mkSkelname () = FNP.mkSkelName policy sourcepath          fun mkSkelname () = FNP.mkSkelName policy sourcepath
207          fun mkBinname () = FNP.mkBinName policy sourcepath          fun mkBinname () = FNP.mkBinName policy sourcepath
# Line 226  Line 245 
245                 mkBinname = mkBinname,                 mkBinname = mkBinname,
246                 persinfo = persinfo (),                 persinfo = persinfo (),
247                 sh_spec = sh_spec,                 sh_spec = sh_spec,
248                 split = split }                 attribs = attribs }
249      end      end
250    
251        val info = info' { split = true, extra_compenv = NONE, is_rts = false }
252    
253      (* the following functions are only concerned with getting the data,      (* the following functions are only concerned with getting the data,
254       * not with checking time stamps *)       * not with checking time stamps *)
255      fun getParseTree gp (i as INFO ir, quiet, noerrors) = let      fun getParseTree gp (i as INFO ir, quiet, noerrors) = let

Legend:
Removed from v.514  
changed lines
  Added in v.537

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