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/compile/full-persstate-fn.sml
ViewVC logotype

Diff of /sml/trunk/src/cm/compile/full-persstate-fn.sml

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

revision 301, Fri May 28 09:43:39 1999 UTC revision 302, Sat May 29 03:19:59 1999 UTC
# Line 60  Line 60 
60          fun error gp (SML i) = SmlInfo.error gp i          fun error gp (SML i) = SmlInfo.error gp i
61            | error gp (STABLE i) = BinInfo.error gp i            | error gp (STABLE i) = BinInfo.error gp i
62    
63            fun descr (SML i) = SmlInfo.name i
64              | descr (STABLE i) = BinInfo.describe i
65    
66          fun exec_look (i, s, gp) =          fun exec_look (i, s, gp) =
67              case find i of              case find i of
68                  NONE => NONE                  NONE => NONE
69                | SOME (memo as { dts = s', ... }) => let                | SOME (memo as { dts = s', ... }) => let
70                      fun warn () =                      fun warn () =
71                          error gp i GenericVC.ErrorMsg.WARN                          error gp i GenericVC.ErrorMsg.WARN
72                                "re-instantiation (sharing may be lost)"                                (concat ["reinstantiating ", descr i,
73                                           " (sharing may be lost)"])
74                                GenericVC.ErrorMsg.nullErrorBody                                GenericVC.ErrorMsg.nullErrorBody
75                  in                  in
76                      if DTS.outdated { context = s, oldresult = s' } then                      if DTS.outdated { context = s, oldresult = s' } then
# Line 75  Line 79 
79                      else SOME memo                      else SOME memo
80                  end                  end
81    
82          fun exec_memo (i, memo) =          fun exec_memo (i, memo) = insert (i, memo)
             if share i = SOME false then () else insert (i, memo)  
83    
84          val exec_look_sml = exec_look o'' SML          val exec_look_sml = exec_look o'' SML
85          val exec_look_stable = exec_look o'' STABLE          val exec_look_stable = exec_look o'' STABLE
86          val exec_memo_sml = exec_memo o' SML          val exec_memo_sml = exec_memo o' SML
87          val exec_memo_stable = exec_memo o' STABLE          val exec_memo_stable = exec_memo o' STABLE
88    
89            fun forgetNonShared () = let
90                fun isShareable { dyn, dts } =
91                    not (isSome (DynTStamp.can'tShare dts))
92            in
93                smlmap := AbsPathMap.filter isShareable (!smlmap);
94                stablemap := StableMap.filter isShareable (!stablemap)
95            end
96      end      end

Legend:
Removed from v.301  
changed lines
  Added in v.302

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