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

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

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

revision 582, Tue Mar 8 15:01:38 2011 UTC revision 583, Tue Mar 8 15:01:53 2011 UTC
# Line 61  Line 61 
61                          | (IL.CONS args) => incList args                          | (IL.CONS args) => incList args
62                        (* end case *))                        (* end case *))
63                    | IL.NEW{args, ...} => incList args                    | IL.NEW{args, ...} => incList args
64                      | IL.EXIT{live, ...} => incList live
65                    | _ => ()                    | _ => ()
66                  (* end case *))                  (* end case *))
67          (* increment the counts of the variables used in a strand *)          (* increment the counts of the variables used in a strand *)
68            fun incStrand (IL.Strand{params, state, stateInit, methods, ...}) = let            fun incStrand (IL.Strand{params, state, stateInit, methods, ...}) = let
69                  fun incMethod (IL.Method{stateIn, stateOut, body, ...}) = (                  fun incMethod (IL.Method{stateIn, stateOut, body, ...}) = (
70                        List.app (fn x => setBinding(x, IL.VB_STATE_VAR)) stateIn;                        List.app (fn x => setBinding(x, IL.VB_STATE_VAR)) stateIn;
71    (* now that we are counting the live variables at EXIT nodes, I think that we don't
72     * need to count the stateOut occurances. [JHR 2011-03-08]
73                        incList stateOut;                        incList stateOut;
74     *)
75                        IL.CFG.apply incNode body)                        IL.CFG.apply incNode body)
76                  in                  in
77                    List.app (fn x => setBinding(x, IL.VB_PARAM)) params;                    List.app (fn x => setBinding(x, IL.VB_PARAM)) params;

Legend:
Removed from v.582  
changed lines
  Added in v.583

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