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

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

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

revision 453, Tue Oct 26 06:24:34 1999 UTC revision 454, Wed Oct 27 04:41:14 1999 UTC
# Line 182  Line 182 
182              lw v0 l              lw v0 l
183          end          end
184    
185          fun mkTraversal (notify, storeBFC) = let          fun mkTraversal (notify, storeBFC, getUrgency) = let
186              val localstate = ref SmlInfoMap.empty              val localstate = ref SmlInfoMap.empty
187    
188              fun pervenv (gp: GP.info) = let              fun pervenv (gp: GP.info) = let
# Line 282  Line 282 
282                          end                          end
283                  end (* compile_here *)                  end (* compile_here *)
284                  fun notlocal () = let                  fun notlocal () = let
285                        val urgency = getUrgency i
286                      (* Ok, it is not in the local state, so we first have                      (* Ok, it is not in the local state, so we first have
287                       * to traverse all children before we can proceed... *)                       * to traverse all children before we can proceed... *)
288                      val k = #keep_going (#param gp)                      val k = #keep_going (#param gp)
# Line 292  Line 293 
293                      val li_cl =                      val li_cl =
294                          map (fn li_n => Concur.fork (fn () => loc li_n)) li                          map (fn li_n => Concur.fork (fn () => loc li_n)) li
295                      val e =                      val e =
296                          layerwork k Concur.wait                          layerwork k (Concur.wait' urgency)
297                                   (layerwork k Concur.wait                                   (layerwork k (Concur.wait' urgency)
298                                                (SOME (pervenv gp)) gi_cl)                                                (SOME (pervenv gp)) gi_cl)
299                                   li_cl                                   li_cl
300                  in                  in
# Line 395  Line 396 
396              { sbnode = sbnode, impexp = impexp }              { sbnode = sbnode, impexp = impexp }
397          end          end
398    
399          fun newTraversal (notify, storeBFC, GG.GROUP { exports, ... }) = let          fun newTraversal (notify, storeBFC, g) = let
400              val { impexp, ... } = mkTraversal (notify, storeBFC)              val GG.GROUP { exports, ... } = g
401                val um = Indegree.indegrees g
402                fun getUrgency i = getOpt (SmlInfoMap.find (um, i), 0)
403                val { impexp, ... } = mkTraversal (notify, storeBFC, getUrgency)
404              fun group gp = let              fun group gp = let
405                  val k = #keep_going (#param gp)                  val k = #keep_going (#param gp)
406                  fun loop ([], success) = success                  fun loop ([], success) = success
# Line 423  Line 427 
427    
428          fun newSbnodeTraversal () = let          fun newSbnodeTraversal () = let
429              val { sbnode, ... } = mkTraversal (fn _ => fn _ => (),              val { sbnode, ... } = mkTraversal (fn _ => fn _ => (),
430                                                 fn _ => ())                                                 fn _ => (),
431                                                   fn _ => 0)
432              fun envdelta2ed { ii, ctxt } = { ii = ii, ctxt = ctxt () }              fun envdelta2ed { ii, ctxt } = { ii = ii, ctxt = ctxt () }
433          in          in
434              fn gp => fn n => Option.map envdelta2ed (sbnode gp n)              fn gp => fn n => Option.map envdelta2ed (sbnode gp n)

Legend:
Removed from v.453  
changed lines
  Added in v.454

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