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 879 - (view) (download)

1 : blume 295 (*
2 :     * Bundling information pertaining to the member of a stable group.
3 : blume 879 * - includes information that does not require running
4 :     * the machine-dependent part of the compiler only
5 : blume 295 *
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 879 type complainer = ErrorMsg.complainer
15 :     type region = SourceMap.region
16 :     type pid = PersStamps.persstamp
17 : blume 294
18 : blume 666 val new : { group: SrcPath.file,
19 : blume 361 mkStablename: unit -> string,
20 : blume 306 error: complainer,
21 :     spec: string,
22 : blume 305 offset: int,
23 : blume 537 rts_pid: pid option,
24 : blume 387 sh_mode: Sharing.mode } -> info
25 : blume 305
26 : blume 295 val compare : info * info -> order
27 : blume 294 val describe : info -> string
28 : blume 295 val offset : info -> int
29 : blume 666 val group : info -> SrcPath.file
30 : blume 354 val stablename : info -> string
31 : blume 537 val rts_pid : info -> pid option
32 : blume 387 val sh_mode : info -> Sharing.mode
33 : blume 306 val error : info -> complainer
34 : blume 294 end
35 :    
36 :     structure BinInfo :> BININFO = struct
37 :    
38 : blume 879 type complainer = ErrorMsg.complainer
39 :     type region = SourceMap.region
40 :     type pid = PersStamps.persstamp
41 : blume 294
42 : blume 295 datatype info =
43 : blume 666 INFO of { group: SrcPath.file,
44 : blume 361 mkStablename: unit -> string,
45 : blume 295 spec: string,
46 :     offset: int,
47 : blume 537 rts_pid: pid option,
48 : blume 387 sh_mode: Sharing.mode,
49 : blume 306 error: complainer }
50 : blume 294
51 : blume 305 type ord_key = info
52 :    
53 :     val new = INFO
54 :    
55 : blume 295 fun compare (INFO i, INFO i') =
56 :     case Int.compare (#offset i, #offset i') of
57 : blume 354 EQUAL => SrcPath.compare (#group i, #group i')
58 : blume 295 | unequal => unequal
59 :    
60 : blume 306 fun describe (INFO { group, spec, offset, ... }) =
61 : blume 354 concat [SrcPath.descr group, "@", Int.toString offset, "(", spec, ")"]
62 : blume 295
63 : blume 306 fun group (INFO { group = g, ... }) = g
64 : blume 295 fun offset (INFO { offset = os, ... }) = os
65 : blume 537 fun rts_pid (INFO { rts_pid = p, ... }) = p
66 : blume 387 fun sh_mode (INFO { sh_mode = s, ... }) = s
67 : blume 361 fun stablename (INFO { mkStablename = msn, ... }) = msn ()
68 : blume 297
69 : blume 306 fun error (INFO { error = e, ... }) = e
70 : blume 294 end

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