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

SCM Repository

[diderot] Diff of /branches/pure-cfg/src/compiler/codegen/tree-il-pp.sml
ViewVC logotype

Diff of /branches/pure-cfg/src/compiler/codegen/tree-il-pp.sml

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

revision 562, Wed Feb 23 15:17:44 2011 UTC revision 563, Wed Feb 23 21:58:41 2011 UTC
# Line 40  Line 40 
40              String.concat (toS (e, []))              String.concat (toS (e, []))
41            end            end
42    
43        fun argsToString (prefix, es) = String.concat[
44                prefix, "(", String.concatWith "," (List.map expToString es), ")"
45              ]
46    
47      fun ppVarDecl out x = prln (out, [Ty.toString(Var.ty x), " ", Var.name x, ";\n"])      fun ppVarDecl out x = prln (out, [Ty.toString(Var.ty x), " ", Var.name x, ";\n"])
48    
49      fun ppStrand out (IL.Strand{name, params, state, stateInit, methods}) = let      fun ppStrand out (IL.Strand{name, params, state, stateInit, methods}) = let
# Line 142  Line 146 
146                  pr (out, " else ");                  pr (out, " else ");
147                  ppBlock (out, blk2);                  ppBlock (out, blk2);
148                  pr (out, "\n"))                  pr (out, "\n"))
149                | IL.S_Exit es => prln (out, [argsToString("exit", es), ";"])
150              (* return functions for methods *)
151                | IL.S_Active es => prln (out, [argsToString("active", es), ";"])
152                | IL.S_Stabilize es => prln (out, [argsToString("stabilize", es), ";"])
153              | IL.S_Die => prln (out, ["die;\n"])              | IL.S_Die => prln (out, ["die;\n"])
             | IL.S_Stabilize => prln (out, ["stabilize;\n"])  
             | IL.S_Exit => prln (out, ["exit;\n"])  
154            (* end case *))            (* end case *))
155    
156      fun block (outS, blk) = (ppBlock ((outS, 0), blk); pr ((outS, 0), "\n"))      fun block (outS, blk) = (ppBlock ((outS, 0), blk); pr ((outS, 0), "\n"))

Legend:
Removed from v.562  
changed lines
  Added in v.563

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