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/compile/bfc.sml
ViewVC logotype

Diff of /sml/trunk/src/cm/compile/bfc.sml

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

revision 878, Wed Jul 18 17:43:27 2001 UTC revision 879, Thu Jul 19 18:59:38 2001 UTC
# Line 15  Line 15 
15  signature BFC = sig  signature BFC = sig
16      type bfc      type bfc
17      type stats = { env: int, inlinfo: int, data: int, code: int }      type stats = { env: int, inlinfo: int, data: int, code: int }
18      val new : unit -> { store: SmlInfo.info * { content: bfc, stats: stats }      val new : unit -> { store: SmlInfo.info * { contents: bfc, stats: stats }
19                                 -> unit,                                 -> unit,
20                          get: SmlInfo.info -> { content: bfc, stats: stats } }                          get: SmlInfo.info -> { contents: bfc, stats: stats } }
21      val getStable : { stable: string, offset: int, descr: string } -> bfc      val getStable : { stable: string, offset: int, descr: string } -> bfc
22  end  end
23    
24  functor BfcFn (structure MachDepVC : MACHDEP_VC) :> BFC  functor BfcFn (val arch: string) :> BFC
25      where type bfc = MachDepVC.Binfile.bfContent =      where type bfc = Binfile.bfContents =
26  struct  struct
27    
28      structure BF = MachDepVC.Binfile      structure BF = Binfile
29      structure E = GenericVC.Environment      structure E = Environment
30      type bfc = BF.bfContent      type bfc = BF.bfContents
31      type stats = { env: int, inlinfo: int, data: int, code: int }      type stats = { env: int, inlinfo: int, data: int, code: int }
32    
     val emap = GenericVC.ModuleId.emptyTmap  
   
33      fun new () = let      fun new () = let
34          val m = ref SmlInfoMap.empty          val m = ref SmlInfoMap.empty
35    
# Line 43  Line 41 
41                | NONE => let                | NONE => let
42                      val binname = SmlInfo.binname i                      val binname = SmlInfo.binname i
43                      fun reader s = let                      fun reader s = let
44                          val x = BF.read { stream = s, name = binname,                          val x = BF.read { arch = arch, stream = s,
45                                            modmap = emap }                                            name = binname }
46                      in                      in
47                          store (i, x);                          store (i, x);
48                          x                          x
# Line 64  Line 62 
62              (Seek.seek (s, offset);              (Seek.seek (s, offset);
63               (* We can use an empty static env because no               (* We can use an empty static env because no
64                * unpickling will be done. *)                * unpickling will be done. *)
65               #content (BF.read { stream = s, name = descr, modmap = emap }))               #contents (BF.read { arch = arch, stream = s, name = descr }))
66      in      in
67          SafeIO.perform { openIt = fn () => BinIO.openIn stable,          SafeIO.perform { openIt = fn () => BinIO.openIn stable,
68                           closeIt = BinIO.closeIn,                           closeIt = BinIO.closeIn,

Legend:
Removed from v.878  
changed lines
  Added in v.879

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