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 614, Sun Mar 13 03:52:21 2011 UTC revision 615, Sun Mar 13 14:36:05 2011 UTC
# Line 85  Line 85 
85                    List.app (fn s => prln(out, ["// ", s, "\n"])) text                    List.app (fn s => prln(out, ["// ", s, "\n"])) text
86                  end                  end
87              | IL.S_Assign(x, e) => prln(out, [Var.name x, " = ", expToString e, ";\n"])              | IL.S_Assign(x, e) => prln(out, [Var.name x, " = ", expToString e, ";\n"])
88                | IL.S_IfThen(cond, blk) => (
89                    prln (out, ["if (", expToString cond, ") "]);
90                    ppBlock (out, blk);
91                    pr (out, "\n"))
92                | IL.S_IfThenElse(cond, blk1, blk2) => (
93                    prln (out, ["if (", expToString cond, ") "]);
94                    ppBlock (out, blk1);
95                    pr (out, " else ");
96                    ppBlock (out, blk2);
97                    pr (out, "\n"))
98                | IL.S_For(x, e1, e2, blk) => (
99                    prln (out, [
100                        "for (", Ty.toString(Var.ty x), " ", Var.name x, " = ",
101                        expToString e1, " ..", expToString e2, ") "
102                      ]);
103                    ppBlock (out, blk);
104                    pr (out, "\n"))
105              | IL.S_Cons(x, args) => let              | IL.S_Cons(x, args) => let
106                  fun mkStrings [] = []                  fun mkStrings [] = []
107                    | mkStrings [e] = [expToString e]                    | mkStrings [e] = [expToString e]
# Line 138  Line 155 
155                      Var.name x, " = input<", Ty.toString(Var.ty x), "> (\"",                      Var.name x, " = input<", Ty.toString(Var.ty x), "> (\"",
156                      String.toString name, "\",", expToString dflt, ");\n"                      String.toString name, "\",", expToString dflt, ");\n"
157                    ])                    ])
             | IL.S_IfThen(cond, blk) => (  
                 prln (out, ["if (", expToString cond, ") "]);  
                 ppBlock (out, blk);  
                 pr (out, "\n"))  
             | IL.S_IfThenElse(cond, blk1, blk2) => (  
                 prln (out, ["if (", expToString cond, ") "]);  
                 ppBlock (out, blk1);  
                 pr (out, " else ");  
                 ppBlock (out, blk2);  
                 pr (out, "\n"))  
158              | IL.S_Exit es => prln (out, [argsToString("exit", es), ";\n"])              | IL.S_Exit es => prln (out, [argsToString("exit", es), ";\n"])
159            (* return functions for methods *)            (* return functions for methods *)
160              | IL.S_Active es => prln (out, [argsToString("active", es), ";\n"])              | IL.S_Active es => prln (out, [argsToString("active", es), ";\n"])

Legend:
Removed from v.614  
changed lines
  Added in v.615

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