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 306 - (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 306 val new : { group: AbsPath.t,
18 :     error: complainer,
19 :     spec: string,
20 : blume 305 offset: int,
21 :     share: bool option } -> info
22 :    
23 : blume 295 val compare : info * info -> order
24 : blume 294 val describe : info -> string
25 : blume 295 val offset : info -> int
26 :     val group : info -> AbsPath.t
27 :     val share : info -> bool option
28 : blume 306 val error : info -> complainer
29 : blume 294 end
30 :    
31 :     structure BinInfo :> BININFO = struct
32 :    
33 : blume 295 type complainer = GenericVC.ErrorMsg.complainer
34 : blume 297 type region = GenericVC.SourceMap.region
35 : blume 294
36 : blume 295 datatype info =
37 : blume 306 INFO of { group: AbsPath.t,
38 : blume 295 spec: string,
39 :     offset: int,
40 : blume 306 share: bool option,
41 :     error: complainer }
42 : blume 294
43 : blume 305 type ord_key = info
44 :    
45 :     val new = INFO
46 :    
47 : blume 295 fun compare (INFO i, INFO i') =
48 :     case Int.compare (#offset i, #offset i') of
49 : blume 306 EQUAL => AbsPath.compare (#group i, #group i')
50 : blume 295 | unequal => unequal
51 :    
52 : blume 306 fun describe (INFO { group, spec, offset, ... }) =
53 : blume 295 concat [AbsPath.name group, "@", Int.toString offset, "(", spec, ")"]
54 :    
55 : blume 306 fun group (INFO { group = g, ... }) = g
56 : blume 295 fun offset (INFO { offset = os, ... }) = os
57 :     fun share (INFO { share = s, ... }) = s
58 : blume 297
59 : blume 306 fun error (INFO { error = e, ... }) = e
60 : blume 294 end

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