Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/trunk/src/cm/depend/graph.sml
ViewVC logotype

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 737 - (view) (download)

1 : blume 270 (*
2 :     * Internal data structure representing a CM dependency graph.
3 : blume 294 * (fine-grain: compilation units)
4 : blume 270 *
5 :     * (C) 1999 Lucent Technologies, Bell Laboratories
6 :     *
7 :     * Author: Matthias Blume (blume@kurims.kyoto-u.ac.jp)
8 :     *)
9 : blume 537 structure DependencyGraph = struct
10 : blume 269
11 :     type filter = SymbolSet.set option
12 :    
13 : blume 282 datatype bnode =
14 : blume 537 BNODE of { bininfo: BinInfo.info,
15 : blume 371 localimports: bnode list,
16 : blume 715 globalimports: (unit -> farbnode) list }
17 : blume 269
18 : blume 737 withtype farbnode = filter * bnode * int option
19 : blume 282
20 :     datatype snode =
21 :     SNODE of { smlinfo: SmlInfo.info,
22 : blume 371 localimports: snode list,
23 :     globalimports: farsbnode list }
24 : blume 282
25 :     and sbnode =
26 : blume 737 SB_BNODE of bnode * IInfo.info * int option
27 : blume 282 | SB_SNODE of snode
28 :    
29 : blume 737 withtype farsbnode = filter * sbnode
30 : blume 282
31 : blume 652 type impexp = (unit -> farsbnode) * DAEnv.env * SymbolSet.set
32 : blume 270
33 : blume 737 fun describeSBN (SB_BNODE (BNODE { bininfo = i, ... }, _, _)) =
34 : blume 294 BinInfo.describe i
35 : blume 282 | describeSBN (SB_SNODE (SNODE { smlinfo = i, ... })) =
36 : blume 666 SmlInfo.descr i
37 : blume 282
38 :     fun describeFarSBN (_, sbn) = describeSBN sbn
39 :    
40 :     (* comparing various nodes for equality *)
41 : blume 537 fun beq (BNODE { bininfo = i, ... }, BNODE { bininfo = i', ... }) =
42 : blume 295 BinInfo.compare (i, i') = EQUAL
43 : blume 282 fun seq (SNODE { smlinfo = i, ... }, SNODE { smlinfo = i', ... }) =
44 :     SmlInfo.eq (i, i')
45 : blume 398
46 :     fun sbeq (SB_SNODE n, SB_SNODE n') = seq (n, n')
47 : blume 737 | sbeq (SB_BNODE (n, _, _), SB_BNODE (n', _, _)) = beq (n, n')
48 : blume 282 | sbeq _ = false
49 : blume 269 end
50 : blume 398

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