Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/pure-cfg/src/compiler/IL/check-il-fn.sml
ViewVC logotype

Diff of /branches/pure-cfg/src/compiler/IL/check-il-fn.sml

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

revision 1016, Fri Apr 29 21:59:23 2011 UTC revision 1017, Sun May 1 03:06:05 2011 UTC
# Line 189  Line 189 
189                  ]                  ]
190            end            end
191    
192      fun check (phase, IL.Program{globals, globalInit, initially, strands}) = let      fun check (phase, IL.Program{globalInit, initially, strands}) = let
193            val errBuf = ref []            val errBuf = ref []
194            val errFn = error errBuf            val errFn = error errBuf
195            fun final () = (case !errBuf            fun final () = (case !errBuf
# Line 235  Line 235 
235                  (* cleanup *)                  (* cleanup *)
236                    Avail.scrub nodes                    Avail.scrub nodes
237                  end                  end
238          (* check an strand definition *)          (* the globals are those variables that are live at the exit of the global initialization *)
239              val globals = IL.CFG.liveAtExit globalInit
240            (* check a strand definition *)
241            fun checkStrand (IL.Strand{params, state, stateInit, methods, ...}) = let            fun checkStrand (IL.Strand{params, state, stateInit, methods, ...}) = let
242                    val extraVars = params @ globals
243                  fun checkMethod (IL.Method{stateIn, body, ...}) =                  fun checkMethod (IL.Method{stateIn, body, ...}) =
244                        checkCFG (globals@stateIn, body)                        checkCFG (extraVars@stateIn, body)
245                  in                  in
246                    checkCFG (globals@params, stateInit);                    checkCFG (extraVars, stateInit);
247                    List.app checkMethod methods                    List.app checkMethod methods
248                  end                  end
249            in            in

Legend:
Removed from v.1016  
changed lines
  Added in v.1017

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