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

SCM Repository

[diderot] Diff of /trunk/src/compiler/tree-il/tree-il-pp.sml
ViewVC logotype

Diff of /trunk/src/compiler/tree-il/tree-il-pp.sml

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

revision 2635, Mon May 26 14:06:39 2014 UTC revision 2636, Tue May 27 16:18:36 2014 UTC
# Line 28  Line 28 
28      fun prl (out, l) = pr(out, concat l)      fun prl (out, l) = pr(out, concat l)
29      fun prln (out, l) = (indent out; prl(out, l))      fun prln (out, l) = (indent out; prl(out, l))
30    
31        fun descToString NONE = ""
32          | descToString (SOME desc) = String.toString desc
33    
34      fun expToString e = let      fun expToString e = let
35            fun argsToS (lp, args, rp, l) = let            fun argsToS (lp, args, rp, l) = let
36                  fun argToS ([], l) = l                  fun argToS ([], l) = l
# Line 131  Line 134 
134                  prln(out, ["(", IL.stateVarToString x]);                  prln(out, ["(", IL.stateVarToString x]);
135                  List.app (fn x => prl(out, [",", IL.stateVarToString x])) xs;                  List.app (fn x => prl(out, [",", IL.stateVarToString x])) xs;
136                  prl (out, [") = ", expToString e, ";\n"]))                  prl (out, [") = ", expToString e, ";\n"]))
137              | IL.S_LoadImage(x, dim, exp) =>              | IL.S_LoadNrrd(x, ty, nrrd) =>
138                  prln (out, [                  prln (out, [
139                      Var.name x, " = load<", Int.toString dim, "> (", expToString exp, ");\n"                      Var.name x, " = load<", Ty.toString ty, "> (\"", String.toString nrrd, "\");\n"
140                    ])                    ])
141              | IL.S_Input(x, name, desc, NONE) =>              | IL.S_Input(x, name, desc, NONE) =>
142                  prln (out, [                  prln (out, [
143                      Var.name x, " = input<", Ty.toString(Var.ty x), "> (\"",                      Var.name x, " = input<", Ty.toString(Var.ty x), "> (\"",
144                      String.toString name, "\",\"", String.toString desc, "\");\n"                      String.toString name, "\",\"", descToString desc, "\");\n"
145                    ])                    ])
146              | IL.S_Input(x, name, desc, SOME dflt) =>              | IL.S_Input(x, name, desc, SOME dflt) =>
147                  prln (out, [                  prln (out, [
148                      Var.name x, " = input<", Ty.toString(Var.ty x), "> (\"",                      Var.name x, " = input<", Ty.toString(Var.ty x), "> (\"",
149                      String.toString name, "\",\"", String.toString desc, "\",",                      String.toString name, "\",\"", descToString desc, "\",",
150                      expToString dflt, ");\n"                      expToString dflt, ");\n"
151                    ])                    ])
152                | IL.S_InputNrrd(x, name, desc, NONE) =>
153                    prln (out, [
154                        Var.name x, " = input-nrrd<", Ty.toString(Var.ty x), "> (\"",
155                        String.toString name, "\",\"", descToString desc, "\");\n"
156                      ])
157                | IL.S_InputNrrd(x, name, desc, SOME dflt) =>
158                    prln (out, [
159                        Var.name x, " = input-nrrd<", Ty.toString(Var.ty x), "> (\"",
160                        String.toString name, "\",\"", descToString desc, "\",\"",
161                        String.toString dflt, "\");\n"
162                      ])
163              | IL.S_Exit es => prln (out, [argsToString("exit", es), ";\n"])              | IL.S_Exit es => prln (out, [argsToString("exit", es), ";\n"])
164            (* return functions for methods *)            (* return functions for methods *)
165              | IL.S_Active => prln (out, ["active;\n"])              | IL.S_Active => prln (out, ["active;\n"])

Legend:
Removed from v.2635  
changed lines
  Added in v.2636

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