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

SCM Repository

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

Diff of /branches/charisee/src/compiler/tree-il/tree-il-pp.sml

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

revision 2631, Fri May 23 18:13:12 2014 UTC revision 2632, Fri May 23 18:57:58 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 q m=Int.toString(m)      fun itos m = Int.toString m
32    
33      fun expToString e = let      fun expToString e = let
34            fun argsToS (shift,lp, args, rp, l) = let            fun argsToS (shift,lp, args, rp, l) = let
# Line 49  Line 49 
49              | toS (IL.E_Apply(f, args), l) = MathFuns.toString f :: argsToS (",","(", args, ")", l)              | toS (IL.E_Apply(f, args), l) = MathFuns.toString f :: argsToS (",","(", args, ")", l)
50              | toS (IL.E_Cons(ty, args), l) =              | toS (IL.E_Cons(ty, args), l) =
51                  "<" :: Ty.toString ty :: ">" :: argsToS (",","{", args, "}", l)                  "<" :: Ty.toString ty :: ">" :: argsToS (",","{", args, "}", l)
52              | toS (IL.E_LoadVec(tyNew, tyOrig,offset,arg), l) =              | toS (IL.E_LoadVec(tyNew, tyOrig, arg, offset), l) =
53                      "LDVec:" :: q tyNew ::"|":: q tyOrig::Int.toString(offset)::argsToS (",","(", [arg], ")", l)                      "LdVec<" :: itos tyNew :: ":" :: itos tyOrig :: ">("
54                          :: argsToS (",", "(", [arg, offset], ")", l)
55              | toS (IL.E_mkVec(tyNew, tyOrig,pieces,args), l) =let              | toS (IL.E_mkVec(tyNew, tyOrig,pieces,args), l) =let
56                      val m=argsToS (",\n\t","(", args, ")", l)                      val m=argsToS (",\n\t","(", args, ")", l)
57                      in "mkVec:" ::q tyNew ::"|":: q tyOrig::                  in
58                      "[":: Ty.toString pieces ::"\n\t"::m                    "mkVec<" ::itos tyNew :: ":" :: itos tyOrig ::
59                      ">\n\t" :: m
60                      end                      end
   
   
61            in            in
62              String.concat (toS (e, []))              String.concat (toS (e, []))
63            end            end

Legend:
Removed from v.2631  
changed lines
  Added in v.2632

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