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

SCM Repository

[diderot] Diff of /branches/charisee/src/compiler/IL/ssa-fn.sml
ViewVC logotype

Diff of /branches/charisee/src/compiler/IL/ssa-fn.sml

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

revision 2385, Fri Jun 14 03:32:30 2013 UTC revision 2386, Sat Jun 15 18:34:05 2013 UTC
# Line 1  Line 1 
1    (*CHANGED*)
2  (* ssa-fn.sml  (* ssa-fn.sml
3   *   *
4   * COPYRIGHT (c) 2011 The Diderot Project (http://diderot-language.cs.uchicago.edu)   * COPYRIGHT (c) 2011 The Diderot Project (http://diderot-language.cs.uchicago.edu)
# Line 18  Line 19 
19    
20      structure Ty = Ty      structure Ty = Ty
21      structure Op = Op      structure Op = Op
22        structure Ein= Ein.Ein
23        structure P= Ein.Printer
24    
25      val ilName = ilName      val ilName = ilName
26    
# Line 100  Line 103 
103        | OP of Op.rator * var list        | OP of Op.rator * var list
104        | APPLY of MathFuns.name * var list (* basis function application *)        | APPLY of MathFuns.name * var list (* basis function application *)
105        | CONS of Ty.ty * var list        (* tensor/sequence-value construction *)        | CONS of Ty.ty * var list        (* tensor/sequence-value construction *)
106          | EINAPP of (Ein.ein*  var list)
107        (*R.App= App of Ein.in * Var.var list Do I need an outer wrapper?*)
108    
109     (*Maybe we should move the definition of R.App Here*)
110    
111     (*changed *)
112    
113      and var = V of {      and var = V of {
114          name : string,                  (* name *)          name : string,                  (* name *)
# Line 268  Line 277 
277                        | OP(_, args) => args                        | OP(_, args) => args
278                        | APPLY(_, args) => args                        | APPLY(_, args) => args
279                        | CONS(_, args) => args                        | CONS(_, args) => args
280                          | EINAPP(_,args)=>args
281    
282                      (* end case *))                      (* end case *))
283                  | MASSIGN{stm=(_, _, args), ...} => args                  | MASSIGN{stm=(_, _, args), ...} => args
284                  | NEW{args, ...} => args                  | NEW{args, ...} => args
# Line 625  Line 636 
636                  | OP(rator, xs) => xs                  | OP(rator, xs) => xs
637                  | APPLY(g, xs) => xs                  | APPLY(g, xs) => xs
638                  | CONS(ty, xs) => xs                  | CONS(ty, xs) => xs
639                    | EINAPP (_,xs)=>xs
640    
641                (* end case *))                (* end case *))
642    
643          fun map f = let          fun map f = let
# Line 635  Line 648 
648                        | OP(rator, xs) => OP(rator, List.map f xs)                        | OP(rator, xs) => OP(rator, List.map f xs)
649                        | APPLY(g, xs) => APPLY(g, List.map f xs)                        | APPLY(g, xs) => APPLY(g, List.map f xs)
650                        | CONS(ty, xs) => CONS(ty, List.map f xs)                        | CONS(ty, xs) => CONS(ty, List.map f xs)
651                          | EINAPP(exp, xs)=> EINAPP(exp, List.map f xs)
652                      (* end case *))                      (* end case *))
653                in                in
654                  mapf                  mapf
# Line 648  Line 662 
662                        | OP(rator, xs) => List.app f xs                        | OP(rator, xs) => List.app f xs
663                        | APPLY(_, xs) => List.app f xs                        | APPLY(_, xs) => List.app f xs
664                        | CONS(ty, xs) => List.app f xs                        | CONS(ty, xs) => List.app f xs
665                          | EINAPP(_, xs)= List.app f xs
666                      (* end case *))                      (* end case *))
667                in                in
668                  appf                  appf
# Line 670  Line 685 
685                        "<", Ty.toString ty, ">[",                        "<", Ty.toString ty, ">[",
686                        String.concatWith "," (List.map Var.toString xs), "]"                        String.concatWith "," (List.map Var.toString xs), "]"
687                      ]                      ]
688                     | EINAPP(exp, xs)=> P.printerE(rhs)
689                              (*Call printer Function*)
690                (* end case *))                (* end case *))
691        end        end
692    

Legend:
Removed from v.2385  
changed lines
  Added in v.2386

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