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/depend/checksharing.sml
ViewVC logotype

Diff of /sml/trunk/src/cm/depend/checksharing.sml

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

revision 303, Sun May 30 10:23:20 1999 UTC revision 305, Mon May 31 15:00:06 1999 UTC
# Line 44  Line 44 
44                  StringSet.add (s, x)                  StringSet.add (s, x)
45              end              end
46    
47          val smlmap = ref AbsPathMap.empty          val smlmap = ref SmlInfoMap.empty
48          val stablemap = ref StableMap.empty          val stablemap = ref StableMap.empty
49    
50          fun bn (DG.PNODE _, s) = s          fun bn (DG.PNODE _, s) = s
# Line 63  Line 63 
63    
64          and fbn ((_, n), s) = bn (n, s)          and fbn ((_, n), s) = bn (n, s)
65    
66          fun sn (DG.SNODE { smlinfo = i, localimports, globalimports }, s) = let          fun sn (DG.SNODE { smlinfo = i, localimports, globalimports }, s) =
67              val p = SmlInfo.sourcepath i              case SmlInfoMap.find (!smlmap, i) of
         in  
             case AbsPathMap.find (!smlmap, p) of  
68                  SOME s' => StringSet.union (s, s')                  SOME s' => StringSet.union (s, s')
69                | NONE => let                | NONE => let
70                      val gs = foldl fsbn empty globalimports                      val gs = foldl fsbn empty globalimports
# Line 74  Line 72 
72                      val s' = check (SmlInfo.share i, SmlInfo.name i, ls,                      val s' = check (SmlInfo.share i, SmlInfo.name i, ls,
73                                      SmlInfo.error gp i)                                      SmlInfo.error gp i)
74                  in                  in
75                      smlmap := AbsPathMap.insert (!smlmap, p, s');                      smlmap := SmlInfoMap.insert (!smlmap, i, s');
76                      StringSet.union (s, s')                      StringSet.union (s, s')
77                  end                  end
         end  
78    
79          and sbn (DG.SB_BNODE n, s) = bn (n, s)          and sbn (DG.SB_BNODE n, s) = bn (n, s)
80            | sbn (DG.SB_SNODE n, s) = sn (n, s)            | sbn (DG.SB_SNODE n, s) = sn (n, s)

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

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