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

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

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

revision 315, Fri Jun 4 07:29:43 1999 UTC revision 316, Fri Jun 4 08:32:57 1999 UTC
# Line 17  Line 17 
17      structure BF = MachDepVC.Binfile      structure BF = MachDepVC.Binfile
18      structure PP = PrettyPrint      structure PP = PrettyPrint
19      structure EM = GenericVC.ErrorMsg      structure EM = GenericVC.ErrorMsg
20        structure DE = GenericVC.DynamicEnv
21    
22      type pid = PID.persstamp      type pid = PID.persstamp
23    
# Line 24  Line 25 
25      type symenv = E.symenv      type symenv = E.symenv
26    
27      type benv = statenv      type benv = statenv
28      type env = { stat: statenv, sym: symenv, pids: PidSet.set }      type result = { stat: statenv, sym: symenv }
29      type result = unit      type env = { envs: result, pids: PidSet.set }
30    
31      val empty = ()      val empty = { stat = E.staticPart E.emptyEnv,
32      fun env2result (_: env) = ()                    sym = E.symbolicPart E.emptyEnv }
33      fun rlayer ((), ()) = ()  
34        fun env2result (e: env) = #envs e
35    
36        fun rlayer (r, r') = let
37            fun r2e { stat, sym } = E.mkenv { static = stat, symbolic = sym,
38                                              dynamic = DE.empty }
39            fun e2r e = { stat = E.staticPart e, sym = E.symbolicPart e }
40        in
41            e2r (E.concatEnv (r2e r, r2e r'))
42        end
43    
44      type 'e wpid = 'e * pid      type 'e wpid = 'e * pid
45    
# Line 51  Line 61 
61    
62      fun blayer (be, be') = E.layerStatic (be, be')      fun blayer (be, be') = E.layerStatic (be, be')
63    
64      fun layer ({ stat, sym, pids }, { stat = stat', sym = sym', pids = p' }) =      fun layer ({ envs, pids }, { envs = e', pids = p' }) =
65          { stat = E.layerStatic (stat, stat'),          { envs = rlayer (envs, e'), pids = PidSet.union (pids, p') }
           sym = E.layerSymbolic (sym, sym'),  
           pids = PidSet.union (pids, p') }  
66    
67      fun bfilter (d: envdelta, s) =      fun bfilter (d: envdelta, s) =
68          E.filterStaticEnv (#1 (#stat d), SymbolSet.listItems s)          E.filterStaticEnv (#1 (#stat d), SymbolSet.listItems s)
# Line 78  Line 86 
86                      statpid'                      statpid'
87                  end                  end
88      in      in
89          { stat = stat, sym = sym, pids = pidset (statpid', sympid) }          { envs = { stat = stat, sym = sym }, pids = pidset (statpid', sympid) }
90      end      end
91    
92      fun bnofilter (d: envdelta) = #1 (#stat d)      fun bnofilter (d: envdelta) = #1 (#stat d)
# Line 87  Line 95 
95          val (stat, statpid) = #stat d          val (stat, statpid) = #stat d
96          val (sym, sympid) = #sym d          val (sym, sympid) = #sym d
97      in      in
98          { stat = stat, sym = sym, pids = pidset (statpid, sympid) }          { envs = { stat = stat, sym = sym }, pids = pidset (statpid, sympid) }
99      end      end
100    
101      fun primitive (gp: GeneralParams.info) p = let      fun primitive (gp: GeneralParams.info) p = let
# Line 103  Line 111 
111      fun pervasive (gp: GeneralParams.info) = let      fun pervasive (gp: GeneralParams.info) = let
112          val e = #pervasive (#param gp)          val e = #pervasive (#param gp)
113      in      in
114          { stat = E.staticPart e, sym = E.symbolicPart e, pids = PidSet.empty }          { envs = { stat = E.staticPart e, sym = E.symbolicPart e },
115              pids = PidSet.empty }
116      end      end
117    
118      fun bpervasive (gp: GeneralParams.info) =      fun bpervasive (gp: GeneralParams.info) =
# Line 153  Line 162 
162                     | SOME be => load be)                     | SOME be => load be)
163      end      end
164    
165      fun dosml (i, { stat, sym, pids }, gp) =      fun dosml (i, { envs = { stat, sym }, pids }, gp) =
166          case Option.map memo2envdelta (PS.recomp_look_sml (i, pids, gp)) of          case Option.map memo2envdelta (PS.recomp_look_sml (i, pids, gp)) of
167              SOME d => SOME d              SOME d => SOME d
168            | NONE => let            | NONE => let

Legend:
Removed from v.315  
changed lines
  Added in v.316

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