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

SCM Repository

[smlnj] Diff of /sml/trunk/src/cm/stable/bininfo.sml
ViewVC logotype

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 294, Tue May 25 09:06:06 1999 UTC revision 295, Wed May 26 09:20:25 1999 UTC
# Line 1  Line 1 
1    (*
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  signature BININFO = sig  signature BININFO = sig
11    
12      type info      type info
13        type complainer = GenericVC.ErrorMsg.complainer
14    
15      val eq : info * info -> bool      val compare : info * info -> order
16      val describe : info -> string      val describe : info -> string
17        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  end  end
23    
24  structure BinInfo :> BININFO = struct  structure BinInfo :> BININFO = struct
25    
26      type info = Dummy.t      type complainer = GenericVC.ErrorMsg.complainer
27    
28      fun eq (_, _) = true      datatype info =
29            INFO of { group: AbsPath.t,
30      fun describe _ = "bininfo"                    stablePath: AbsPath.t,
31                      spec: string,
32                      offset: int,
33                      share: bool option,
34                      error: complainer }
35    
36        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  end  end

Legend:
Removed from v.294  
changed lines
  Added in v.295

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