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

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

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

revision 493, Mon Nov 29 07:13:22 1999 UTC revision 494, Tue Nov 30 09:07:21 1999 UTC
# Line 17  Line 17 
17      structure P = PickMod      structure P = PickMod
18      structure UP = UnpickMod      structure UP = UnpickMod
19      structure E = GenericVC.Environment      structure E = GenericVC.Environment
   
     fun memoize thunk = let  
         val r = ref (fn () => raise Fail "Stabilize:delay")  
         fun firsttime () = let  
             val v = thunk ()  
         in  
             r := (fn () => v);  
             v  
         end  
     in  
         r := firsttime;  
         (fn () => !r ())  
     end  
20  in  in
21    
22  signature STABILIZE = sig  signature STABILIZE = sig
# Line 136  Line 123 
123               *    s + t + 8. The pickled dependency graph also contains integer               *    s + t + 8. The pickled dependency graph also contains integer
124               *    offsets relative to other stable groups.  These offsets               *    offsets relative to other stable groups.  These offsets
125               *    need no further adjustment.               *    need no further adjustment.
              *  - The pickled environment (list).  To be unpickled using  
              *    unpickleEnvN.  
126               *  - Individual binfile contents (concatenated) but without               *  - Individual binfile contents (concatenated) but without
127               *    their static environments.               *    their static environments.
128               *)               *)
# Line 719  Line 704 
704                              { env = GenericVC.CoerceEnv.bs2es env,                              { env = GenericVC.CoerceEnv.bs2es env,
705                               ctxt = ctxt }                               ctxt = ctxt }
706                          val ge' = bs2es o ge                          val ge' = bs2es o ge
707                          val ii = { statenv = memoize ge',                          val ii = { statenv = Memoize.memoize ge',
708                                     symenv = lazy_symenv (),                                     symenv = lazy_symenv (),
709                                     statpid = pid (),                                     statpid = pid (),
710                                     sympid = pid () }                                     sympid = pid () }

Legend:
Removed from v.493  
changed lines
  Added in v.494

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