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

SCM Repository

[diderot] Diff of /branches/vis12/src/compiler/c-util/tree-to-c-fn.sml
ViewVC logotype

Diff of /branches/vis12/src/compiler/c-util/tree-to-c-fn.sml

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

revision 1807, Sat Apr 7 12:00:48 2012 UTC revision 1820, Wed Apr 11 10:53:15 2012 UTC
# Line 58  Line 58 
58      fun addrOf e = CL.mkUnOp(CL.%&, e)      fun addrOf e = CL.mkUnOp(CL.%&, e)
59    
60    (* translate TreeIL types to CLang types *)    (* translate TreeIL types to CLang types *)
61      fun trType ty = (case ty      val trType = CTyTranslate.toType
            of Ty.BoolTy => CL.T_Named "bool"  
             | Ty.StringTy => CL.charPtr  
             | Ty.IntTy => !N.gIntTy  
             | Ty.TensorTy[] => !N.gRealTy  
             | Ty.TensorTy[n] => CL.T_Named(N.vecTy n)  
             | Ty.TensorTy[n, m] => CL.T_Named(N.matTy(n,m))  
             | Ty.TensorTy[n, m, l] => CL.T_Named(N.ten3Ty(n,m,l))  
             | Ty.SeqTy(Ty.IntTy, n) => CL.T_Named(N.ivecTy n)  
             | Ty.SeqTy(ty, n) => CL.T_Array(trType ty, SOME n)  
             | Ty.DynSeqTy _ => CL.T_Ptr(CL.T_Named N.dynSeqTy)  
             | Ty.AddrTy info => CL.T_Ptr(CL.T_Num(ImageInfo.sampleTy info))  
             | Ty.ImageTy info => CL.T_Ptr(CL.T_Named(N.imageTy(ImageInfo.dim info)))  
             | _ => raise Fail(concat["TreeToC.trType(", Ty.toString ty, ")"])  
           (* end case *))  
62    
63    (* generate new variables *)    (* generate new variables *)
64      local      local

Legend:
Removed from v.1807  
changed lines
  Added in v.1820

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