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 388, Mon Jul 26 02:45:07 1999 UTC revision 389, Mon Jul 26 03:13:33 1999 UTC
# Line 69  Line 69 
69    
70      type complainer = EM.complainer      type complainer = EM.complainer
71    
72        (* sh_mode is an elaboration of sh_spec;  it must be persistent
73         * and gets properly re-computed when there is a new sh_spec *)
74      datatype persinfo =      datatype persinfo =
75          PERS of { group: SrcPath.t * region,          PERS of { group: SrcPath.t * region,
76                    lastseen: TStamp.t ref,                    lastseen: TStamp.t ref,
77                    parsetree: (ast * source) option ref,                    parsetree: (ast * source) option ref,
78                    skeleton: Skeleton.decl option ref }                    skeleton: Skeleton.decl option ref,
79                      sh_mode: Sharing.mode ref }
80    
81      datatype info =      datatype info =
82          INFO of { sourcepath: SrcPath.t,          INFO of { sourcepath: SrcPath.t,
# Line 81  Line 84 
84                    mkBinname: unit -> string,                    mkBinname: unit -> string,
85                    persinfo: persinfo,                    persinfo: persinfo,
86                    sh_spec: Sharing.request,                    sh_spec: Sharing.request,
                   sh_mode: Sharing.mode option ref,  
87                    split: bool }                    split: bool }
88    
89      type ord_key = info      type ord_key = info
# Line 90  Line 92 
92      fun skelname (INFO { mkSkelname = msn, ... }) = msn ()      fun skelname (INFO { mkSkelname = msn, ... }) = msn ()
93      fun binname (INFO { mkBinname = mbn, ... }) = mbn ()      fun binname (INFO { mkBinname = mbn, ... }) = mbn ()
94      fun sh_spec (INFO { sh_spec = s, ... }) = s      fun sh_spec (INFO { sh_spec = s, ... }) = s
95      fun sh_mode (INFO { sh_mode = ref (SOME m), ... }) = m      fun sh_mode (INFO { persinfo = PERS { sh_mode = ref m, ... }, ... }) = m
96        | sh_mode _ = EM.impossible "SmlInfo.sh_mode: "      fun set_sh_mode (INFO { persinfo = PERS { sh_mode, ... }, ... }, m) =
97      fun set_sh_mode (INFO { sh_mode as ref NONE, ... }, m) = sh_mode := SOME m          sh_mode := m
       | set_sh_mode _ = EM.impossible "SmlInfo.set_sh_mode"  
98      fun split (INFO { split = s, ... }) = s      fun split (INFO { split = s, ... }) = s
99    
100      fun gerror (gp: GeneralParams.info) = GroupReg.error (#groupreg gp)      fun gerror (gp: GeneralParams.info) = GroupReg.error (#groupreg gp)
# Line 130  Line 131 
131      fun validate (sourcepath, PERS pir) = let      fun validate (sourcepath, PERS pir) = let
132          (* don't use "..." pattern to have the compiler catch later          (* don't use "..." pattern to have the compiler catch later
133           * additions to the type! *)           * additions to the type! *)
134          val { group, lastseen, parsetree, skeleton } = pir          val { group, lastseen, parsetree, skeleton, sh_mode } = pir
135          val ts = !lastseen          val ts = !lastseen
136          val nts = SrcPath.tstamp sourcepath          val nts = SrcPath.tstamp sourcepath
137      in      in
# Line 150  Line 151 
151          fun newpersinfo () = let          fun newpersinfo () = let
152              val ts = SrcPath.tstamp sourcepath              val ts = SrcPath.tstamp sourcepath
153              val pi = PERS { group = gr, lastseen = ref ts,              val pi = PERS { group = gr, lastseen = ref ts,
154                              parsetree = ref NONE, skeleton = ref NONE }                              parsetree = ref NONE, skeleton = ref NONE,
155                                sh_mode = ref (Sharing.SHARE false) }
156          in          in
157              knownInfo := SrcPathMap.insert (!knownInfo, sourcepath, pi);              knownInfo := SrcPathMap.insert (!knownInfo, sourcepath, pi);
158              pi              pi
# Line 184  Line 186 
186                 mkBinname = mkBinname,                 mkBinname = mkBinname,
187                 persinfo = persinfo (),                 persinfo = persinfo (),
188                 sh_spec = sh_spec,                 sh_spec = sh_spec,
                sh_mode = ref NONE,  
189                 split = split }                 split = split }
190      end      end
191    

Legend:
Removed from v.388  
changed lines
  Added in v.389

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