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

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

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

revision 281, Tue May 18 14:57:00 1999 UTC revision 282, Wed May 19 05:14:03 1999 UTC
# Line 13  Line 13 
13    
14      type filter = SymbolSet.set option      type filter = SymbolSet.set option
15    
16      datatype node =      type 'n filtered = filter * 'n
17          NODE of { smlinfo: SmlInfo.info,  
18                    localimports: node list,      datatype bnode =
19                    globalimports: farnode list }          PNODE of primitive
20          | BNODE of { bininfo: Dummy.t, (* BinInfo.info *)
21      and farnode =                     localimports: bnode list,
22          FARNODE of filter * node                     globalimports: farbnode list }
23        | PNODE of primitive  
24        withtype farbnode = bnode filtered
25    
26        datatype snode =
27            SNODE of { smlinfo: SmlInfo.info,
28                       localimports: snode list,
29                       globalimports: farsbnode list }
30    
31        and sbnode =
32            SB_BNODE of bnode
33          | SB_SNODE of snode
34    
35        withtype farsbnode = sbnode filtered
36    
37      (* environments used for dependency analysis *)      (* environments used for dependency analysis *)
38      datatype env =      datatype env =
# Line 32  Line 44 
44    
45      withtype value = env      withtype value = env
46    
47      fun describeFarNode (FARNODE (f, NODE { smlinfo = i, ... })) =      fun describeSBN (SB_BNODE (PNODE p)) = Primitive.toString p
48          | describeSBN (SB_BNODE (BNODE { bininfo = i, ... })) =
49            (ignore Dummy.v; "bininfo")
50          | describeSBN (SB_SNODE (SNODE { smlinfo = i, ... })) =
51          SmlInfo.fullName i          SmlInfo.fullName i
52        | describeFarNode (PNODE p) = Primitive.toString p  
53        fun describeFarSBN (_, sbn) = describeSBN sbn
54    
55        (* comparing various nodes for equality *)
56        fun beq (PNODE p, PNODE p') = Primitive.eq (p, p')
57          | beq (BNODE { bininfo = i, ... }, BNODE { bininfo = i', ... }) =
58            (ignore Dummy.v; false)
59          | beq _ = false
60        fun seq (SNODE { smlinfo = i, ... }, SNODE { smlinfo = i', ... }) =
61            SmlInfo.eq (i, i')
62        fun sbeq (SB_BNODE bn, SB_BNODE bn') = beq (bn, bn')
63          | sbeq (SB_SNODE sn, SB_SNODE sn') = seq (sn, sn')
64          | sbeq _ = false
65  end  end

Legend:
Removed from v.281  
changed lines
  Added in v.282

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