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

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