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

Diff of /sml/trunk/src/cm/bootstrap/btcompile.sml

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

revision 398, Wed Aug 25 15:36:43 1999 UTC revision 399, Thu Aug 26 09:55:09 1999 UTC
# Line 26  Line 26 
26      structure P = OS.Path      structure P = OS.Path
27      structure F = OS.FileSys      structure F = OS.FileSys
28    
29  (*      structure Compile = CompileFn (structure MachDepVC = MachDepVC)
     (* Since the bootstrap compiler never executes any of the code  
      * it produces, we don't need any dynamic values.  Therefore,  
      * we create RecompPersstate (but not FullPersstate!) and  
      * instantiate Recomp as well as RecompTraversal.  
      * Since RecompPersstate is not part of any surrounding FullPersstate,  
      * function "discard_value" simply does nothing. *)  
     structure RecompPersstate =  
         RecompPersstateFn (structure MachDepVC = MachDepVC  
                            val discard_code = true  
                            fun stable_value_present i = false  
                            fun new_smlinfo i = ())  
   
     structure Recomp = RecompFn (structure PS = RecompPersstate)  
     structure RT = CompileGenericFn (structure CT = Recomp)  
   
     fun recomp gp g = isSome (RT.group gp g)  
 *)  
   
     structure Compile =  
         CompileFn (structure MachDepVC = MachDepVC)  
30    
31      (* instantiate Stabilize... *)      (* instantiate Stabilize... *)
 (*  
     structure Stabilize =  
         StabilizeFn (fun bn2statenv gp i = #1 (#stat (valOf (RT.bnode' gp i)))  
                      fun warmup (i, p) = ()  
                      val recomp = recomp  
                      val transfer_state = RecompPersstate.transfer_state)  
 *)  
32      structure Stabilize =      structure Stabilize =
33          StabilizeFn (fun transfer_state _ = raise Fail "transfer_state"          StabilizeFn (val writeBFC = Compile.writeBFC
                      val writeBFC = Compile.writeBFC  
34                       val sizeBFC = Compile.sizeBFC                       val sizeBFC = Compile.sizeBFC
35                       val getII = Compile.getII                       val getII = Compile.getII
36                       val recomp = Compile.recomp)                       fun destroy_state _ = ()
37                         fun recomp gp g = let
38                             val { group, ... } =
39                                 Compile.newTraversal (fn _ => (), g)
40                         in
41                             isSome (group gp)
42                         end)
43    
44      (* ... and Parse *)      (* ... and Parse *)
45      structure Parse = ParseFn (structure Stabilize = Stabilize      structure Parse = ParseFn (structure Stabilize = Stabilize
# Line 191  Line 169 
169              val ovldR = GenericVC.Control.overloadKW              val ovldR = GenericVC.Control.overloadKW
170              val savedOvld = !ovldR              val savedOvld = !ovldR
171              val _ = ovldR := true              val _ = ovldR := true
172              val { sbnode, ... } = Compile.newTraversal ()              val sbnode = Compile.newSbnodeTraversal (fn _ => ())
173    
174              (* here we build a new gp -- the one that uses the freshly              (* here we build a new gp -- the one that uses the freshly
175               * brewed pervasive env, core env, and primitives *)               * brewed pervasive env, core env, and primitives *)
# Line 250  Line 228 
228          in          in
229              case Parse.parse NONE param stab maingspec of              case Parse.parse NONE param stab maingspec of
230                  NONE => false                  NONE => false
231                | SOME (g, gp) =>                | SOME (g, gp) => let
232                      if Compile.recomp gp g then let                      val { group = recomp, ... } =
233                            Compile.newTraversal (fn _ => (), g)
234                    in
235                        if isSome (recomp gp) then let
236                          val rtspid = PS.toHex (#statpid (#ii rts))                          val rtspid = PS.toHex (#statpid (#ii rts))
237                          fun writeList s = let                          fun writeList s = let
238                              fun add ((p, flag), l) = let                              fun add ((p, flag), l) = let
# Line 295  Line 276 
276                        true                        true
277                      end                      end
278                      else false                      else false
279                    end
280          end handle Option => (Compile.reset (); false)          end handle Option => (Compile.reset (); false)
281                     (* to catch valOf failures in "rt" *)                     (* to catch valOf failures in "rt" *)
282      in      in

Legend:
Removed from v.398  
changed lines
  Added in v.399

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