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

Annotation of /sml/trunk/src/cm/stable/bininfo.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 361 - (view) (download)

1 : blume 295 (*
2 :     * Bundling information pertaining to the member of a stable group.
3 :     * - only includes information that does not require running
4 :     * the machine-dependent part of the compiler
5 :     *
6 :     * (C) 1999 Lucent Technologies, Bell Laboratories
7 :     *
8 :     * Author: Matthias Blume (blume@kurims.kyoto-u.ac.jp)
9 :     *)
10 : blume 294 signature BININFO = sig
11 :    
12 :     type info
13 : blume 305 type ord_key = info
14 : blume 295 type complainer = GenericVC.ErrorMsg.complainer
15 : blume 305 type region = GenericVC.SourceMap.region
16 : blume 294
17 : blume 354 val new : { group: SrcPath.t,
18 : blume 361 mkStablename: unit -> string,
19 : blume 306 error: complainer,
20 :     spec: string,
21 : blume 305 offset: int,
22 :     share: bool option } -> info
23 :    
24 : blume 295 val compare : info * info -> order
25 : blume 294 val describe : info -> string
26 : blume 295 val offset : info -> int
27 : blume 354 val group : info -> SrcPath.t
28 :     val stablename : info -> string
29 : blume 295 val share : info -> bool option
30 : blume 306 val error : info -> complainer
31 : blume 294 end
32 :    
33 :     structure BinInfo :> BININFO = struct
34 :    
35 : blume 295 type complainer = GenericVC.ErrorMsg.complainer
36 : blume 297 type region = GenericVC.SourceMap.region
37 : blume 294
38 : blume 295 datatype info =
39 : blume 354 INFO of { group: SrcPath.t,
40 : blume 361 mkStablename: unit -> string,
41 : blume 295 spec: string,
42 :     offset: int,
43 : blume 306 share: bool option,
44 :     error: complainer }
45 : blume 294
46 : blume 305 type ord_key = info
47 :    
48 :     val new = INFO
49 :    
50 : blume 295 fun compare (INFO i, INFO i') =
51 :     case Int.compare (#offset i, #offset i') of
52 : blume 354 EQUAL => SrcPath.compare (#group i, #group i')
53 : blume 295 | unequal => unequal
54 :    
55 : blume 306 fun describe (INFO { group, spec, offset, ... }) =
56 : blume 354 concat [SrcPath.descr group, "@", Int.toString offset, "(", spec, ")"]
57 : blume 295
58 : blume 306 fun group (INFO { group = g, ... }) = g
59 : blume 295 fun offset (INFO { offset = os, ... }) = os
60 :     fun share (INFO { share = s, ... }) = s
61 : blume 361 fun stablename (INFO { mkStablename = msn, ... }) = msn ()
62 : blume 297
63 : blume 306 fun error (INFO { error = e, ... }) = e
64 : blume 294 end

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