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

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/tree-ir/tree-pp.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/tree-ir/tree-pp.sml

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

revision 3857, Sat May 14 14:13:04 2016 UTC revision 3894, Sun May 22 14:51:27 2016 UTC
# Line 51  Line 51 
51              | toS (IR.E_Var x, l) = Var.name x :: l              | toS (IR.E_Var x, l) = Var.name x :: l
52              | toS (IR.E_Lit lit, l) = Literal.toString lit :: l              | toS (IR.E_Lit lit, l) = Literal.toString lit :: l
53              | toS (IR.E_Op(rator, args), l) = Op.toString rator :: argsToS ("(", args, ")", l)              | toS (IR.E_Op(rator, args), l) = Op.toString rator :: argsToS ("(", args, ")", l)
54              | toS (IR.E_Vec args, l) = argsToS ("#[", args, "]", l)              | toS (IR.E_Vec(w, pw, args), l) = let
55                    val args = argsToS ("(", args, ")", l)
56                    in
57                      if (w = pw)
58                        then "VEC" :: Int.toString w :: args
59                        else "VEC" :: Int.toString w :: "{" :: Int.toString pw :: "}" :: args
60                    end
61              | toS (IR.E_Cons(args, ty), l) =              | toS (IR.E_Cons(args, ty), l) =
62                  "<" :: Ty.toString ty :: ">" :: argsToS ("[", args, "]", l)                  "<" :: Ty.toString ty :: ">" :: argsToS ("[", args, "]", l)
63              | toS (IR.E_Seq(args, ty), l) =              | toS (IR.E_Seq(args, ty), l) =
# Line 146  Line 152 
152                    ]);                    ]);
153                  ppBlock (out, blk);                  ppBlock (out, blk);
154                  pr (out, "\n"))                  pr (out, "\n"))
155              | IR.S_LoadNrrd(x, nrrd) =>              | IR.S_LoadNrrd(x, ty, nrrd) =>
156                  prln (out, [                  prln (out, [
157                      Var.name x, " = load<", Ty.toString(Var.ty x), "> (\"",                      Var.name x, " = load<", APITypes.toString ty, "> (\"",
158                      String.toString nrrd, "\");\n"                      String.toString nrrd, "\");\n"
159                    ])                    ])
160              | IR.S_Input(x, name, desc, NONE) =>              | IR.S_Input(x, name, desc, NONE) =>
# Line 191  Line 197 
197    
198      fun program (outS, prog) = let      fun program (outS, prog) = let
199            val IR.Program{            val IR.Program{
200                  props, consts, inputs, constInit, globals, globalInit, strand, create, update                  props, target, consts, inputs, constInit,
201                    globals, globalInit, strand, create, update
202                } = prog                } = prog
203            val out = (outS, 0)            val out = (outS, 0)
204            val out' = incIndent out            val out' = incIndent out

Legend:
Removed from v.3857  
changed lines
  Added in v.3894

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