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 426, Tue Sep 7 06:36:12 1999 UTC revision 432, Fri Sep 10 05:44:08 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
20    
21        fun memoize thunk = let
22            val r = ref (fn () => raise Fail "Stabilize:delay")
23            fun firsttime () = let
24                val v = thunk ()
25            in
26                r := (fn () => v);
27                v
28            end
29        in
30            r := firsttime;
31            (fn () => !r ())
32        end
33  in  in
34    
35  signature STABILIZE = sig  signature STABILIZE = sig
# Line 694  Line 707 
707                      let val sy = symbol ()                      let val sy = symbol ()
708                          val (f, n) = fsbn () (* really reads farbnodes! *)                          val (f, n) = fsbn () (* really reads farbnodes! *)
709                          val ge = lazy_env ()                          val ge = lazy_env ()
710                          val ii = { statenv = GenericVC.CoerceEnv.bs2es o ge,                          val ge' = GenericVC.CoerceEnv.bs2es o ge
711                            val ii = { statenv = memoize ge',
712                                     symenv = lazy_symenv (),                                     symenv = lazy_symenv (),
713                                     statpid = pid (),                                     statpid = pid (),
714                                     sympid = pid () }                                     sympid = pid () }

Legend:
Removed from v.426  
changed lines
  Added in v.432

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