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

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

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

revision 304, Mon May 31 09:10:08 1999 UTC revision 305, Mon May 31 15:00:06 1999 UTC
# Line 17  Line 17 
17          type recomp_memo = { bfc: BF.bfContent, ctxt: E.staticEnv }          type recomp_memo = { bfc: BF.bfContent, ctxt: E.staticEnv }
18          type recomp_tmemo = recomp_memo * TStamp.t          type recomp_tmemo = recomp_memo * TStamp.t
19    
20          val smlmap = ref (AbsPathMap.empty: recomp_tmemo AbsPathMap.map)          val smlmap = ref (SmlInfoMap.empty: recomp_tmemo SmlInfoMap.map)
21          val stablemap = ref (StableMap.empty: recomp_memo StableMap.map)          val stablemap = ref (StableMap.empty: recomp_memo StableMap.map)
22    
23          fun recomp_look_sml (i, provided, gp) = let          fun recomp_look_sml (i, provided, gp) = let
# Line 29  Line 29 
29                  in                  in
30                      PidSet.equal (provided, demanded)                      PidSet.equal (provided, demanded)
31                  end                  end
             val p = SmlInfo.sourcepath i  
32          in          in
33              case AbsPathMap.find (!smlmap, p) of              case SmlInfoMap.find (!smlmap, i) of
34                  NONE => NONE                  NONE => NONE
35                | SOME (memo, ts) =>                | SOME (memo, ts) =>
36                      if isValid (memo, ts) then SOME memo                      if isValid (memo, ts) then SOME memo
37                      else (smlmap := #1 (AbsPathMap.remove (!smlmap, p));                      else (smlmap := #1 (SmlInfoMap.remove (!smlmap, i));
38                            NONE)                            NONE)
39          end          end
40    
# Line 44  Line 43 
43              val tmemo = (memo, ts)              val tmemo = (memo, ts)
44          in          in
45              discard_value i;              discard_value i;
46              smlmap := AbsPathMap.insert (!smlmap, SmlInfo.sourcepath i, tmemo)              smlmap := SmlInfoMap.insert (!smlmap, i, tmemo)
47          end          end
48    
49          fun discard (arg as (_, { bfc, ctxt })) = (BF.discardCode bfc; arg)          fun discard (arg as (_, { bfc, ctxt })) = (BF.discardCode bfc; arg)
# Line 61  Line 60 
60              if discard_code then recomp_memo_stable0 o discard              if discard_code then recomp_memo_stable0 o discard
61              else recomp_memo_stable0              else recomp_memo_stable0
62    
63          fun bfc_fetch_sml i =          fun bfc_fetch_sml i = #bfc (#1 (valOf (SmlInfoMap.find (!smlmap, i))))
64              #bfc (#1 (valOf (AbsPathMap.find (!smlmap, SmlInfo.sourcepath i))))          fun bfc_fetch_stable i = #bfc (valOf (StableMap.find (!stablemap, i)))
         fun bfc_fetch_stable i =  
             #bfc (valOf (StableMap.find (!stablemap, i)))  
65      end      end

Legend:
Removed from v.304  
changed lines
  Added in v.305

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