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/main/autoload.sml
ViewVC logotype

Diff of /sml/trunk/src/cm/main/autoload.sml

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

revision 361, Wed Jun 30 06:44:04 1999 UTC revision 362, Thu Jul 1 09:39:48 1999 UTC
# Line 5  Line 5 
5   *   *
6   * Author: Matthias Blume (blume@kurims.kyoto-u.ac.jp)   * Author: Matthias Blume (blume@kurims.kyoto-u.ac.jp)
7   *)   *)
8    local
9        structure DG = DependencyGraph
10        structure BE = GenericVC.BareEnvironment
11        structure ER = GenericVC.EnvRef
12        structure GG = GroupGraph
13    in
14  signature AUTOLOAD = sig  signature AUTOLOAD = sig
15    
16      val register : GenericVC.EnvRef.envref * GroupGraph.group -> unit      val register : ER.envref * GG.group -> unit
17    
18        val mkManager : (DG.impexp SymbolMap.map -> BE.environment option)
19            -> GenericVC.Ast.dec * ER.envref -> unit
20    
21      val mkManager : (DependencyGraph.impexp SymbolMap.map ->      val getPending : unit -> DG.impexp SymbolMap.map
                      GenericVC.BareEnvironment.environment option)  
         -> GenericVC.Ast.dec * GenericVC.EnvRef.envref -> unit  
22    
23      val reset : unit -> unit      val reset : unit -> unit
24  end  end
25    
26  structure AutoLoad :> AUTOLOAD = struct  structure AutoLoad :> AUTOLOAD = struct
27    
     structure DG = DependencyGraph  
     structure ER = GenericVC.EnvRef  
     structure BE = GenericVC.BareEnvironment  
   
28      (* We let the topLevel env *logically* sit atop the pending      (* We let the topLevel env *logically* sit atop the pending
29       * autoload bindings.  This way we do not have to intercept every       * autoload bindings.  This way we do not have to intercept every
30       * change to the topLevel env.  However, it means that any addition       * change to the topLevel env.  However, it means that any addition
# Line 30  Line 33 
33    
34      fun reset () = pending := SymbolMap.empty      fun reset () = pending := SymbolMap.empty
35    
36      fun register (ter: ER.envref, GroupGraph.GROUP { exports, ... }) = let      fun register (ter: ER.envref, GG.GROUP { exports, ... }) = let
37          val te = #get ter ()          val te = #get ter ()
38          (* toplevel bindings (symbol set) ... *)          (* toplevel bindings (symbol set) ... *)
39          val tss = foldl SymbolSet.add' SymbolSet.empty          val tss = foldl SymbolSet.add' SymbolSet.empty
# Line 75  Line 78 
78              end              end
79            | NONE => ()            | NONE => ()
80      end      end
81    
82        fun getPending () = !pending
83    end
84  end  end

Legend:
Removed from v.361  
changed lines
  Added in v.362

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