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

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/c-util/gen-inputs-util.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/c-util/gen-inputs-util.sml

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

revision 3869, Tue May 17 12:41:49 2016 UTC revision 3870, Tue May 17 13:53:58 2016 UTC
# Line 45  Line 45 
45      structure GVar = TreeGlobalVar      structure GVar = TreeGlobalVar
46      structure CL = CLang      structure CL = CLang
47      structure RN = RuntimeNames      structure RN = RuntimeNames
48      structure ToC = TreeToC      structure ToC = TreeToCxx
49      structure TrTy = CTyTranslate      structure TrTy = CTyTranslate
50    
51      type input_desc = (TreeIR.global_var * string * string option * IR.exp option)      type input_desc = (TreeIR.global_var * string * string option * IR.exp option)
# Line 86  Line 86 
86    
87      (* initialize an external C representation from constant expressions *)      (* initialize an external C representation from constant expressions *)
88        fun initC {ty, dst, src} = let        fun initC {ty, dst, src} = let
89              fun cvtExp e = TreeToC.trExp (TreeIR.Var.Map.empty, e)              fun cvtExp e = ToC.trExp (TreeIR.Var.Map.empty, e)
90              fun simpleInit () = [CL.mkAssign(dst, cvtExp src)]              fun simpleInit () = [CL.mkAssign(dst, cvtExp src)]
91              in              in
92                case (ty, src)                case (ty, src)
# Line 103  Line 103 
103                  | (Ty.SeqTy(_, NONE), _) => simpleInit ()                  | (Ty.SeqTy(_, NONE), _) => simpleInit ()
104                  | (Ty.ImageTy _, _) => simpleInit ()                  | (Ty.ImageTy _, _) => simpleInit ()
105                  | _ => let                  | _ => let
106                      val (tmp, stm) = TreeToC.expToVar(TreeIR.Var.Map.empty, CTyTranslate.toType ty, "tmp", src)                      val (tmp, stm) = ToC.expToVar(TreeVar.Map.empty, CTyTranslate.toType ty, "tmp", src)
107                      in                      in
108                        stm @ CTyTranslate.copyToC{ty = ty, dst=dst, src=tmp}                        stm @ CTyTranslate.copyToC{ty = ty, dst=dst, src=tmp}
109                      end                      end

Legend:
Removed from v.3869  
changed lines
  Added in v.3870

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