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 492, Fri Nov 26 09:00:50 1999 UTC revision 514, Thu Dec 16 08:32:57 1999 UTC
# Line 60  Line 60 
60    
61      (* Evict all elements that belong to a given group but which      (* Evict all elements that belong to a given group but which
62       * are not of the current generation. "cleanGroup" should be       * are not of the current generation. "cleanGroup" should be
63       * called right after finishing to parse the group file. *)       * called right after finishing to parse the group file.
64      val cleanGroup : SrcPath.t -> unit       * If the boolean flag ("nowStable") is set to true, then all
65         * members of the group are dismissed regardless of their
66         * generation. This is used to get rid of the information for
67         * members of now-stable libraries. *)
68        val cleanGroup : bool -> SrcPath.t -> unit
69    
70      (* Delete all known info. *)      (* Delete all known info. *)
71      val reset : unit -> unit      val reset : unit -> unit
# Line 150  Line 154 
154      fun forgetParsetree (INFO { persinfo = PERS { parsetree, ... }, ... }) =      fun forgetParsetree (INFO { persinfo = PERS { parsetree, ... }, ... }) =
155          parsetree := NONE          parsetree := NONE
156    
157      fun cleanGroup g = let      fun cleanGroup nowStable g = let
158          val n = now ()          val n = now ()
159          fun isCurrent (PERS { generation = ref gen, group = (g', _), ... }) =          fun isCurrent (PERS { generation = ref gen, group = (g', _), ... }) =
160              gen = n orelse SrcPath.compare (g, g') <> EQUAL              ((not nowStable) andalso gen = n)
161                orelse SrcPath.compare (g, g') <> EQUAL
162      in      in
163          knownInfo := SrcPathMap.filter isCurrent (!knownInfo)          knownInfo := SrcPathMap.filter isCurrent (!knownInfo)
164      end      end

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

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