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

SCM Repository

[diderot] Diff of /branches/vis12-cl/src/compiler/c-util/c-ty-translate.sml
ViewVC logotype

Diff of /branches/vis12-cl/src/compiler/c-util/c-ty-translate.sml

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

revision 3094, Wed Mar 18 04:45:43 2015 UTC revision 3095, Wed Mar 18 13:12:57 2015 UTC
# Line 49  Line 49 
49              | Ty.StringTy => CL.T_Named "Diderot_string_t"              | Ty.StringTy => CL.T_Named "Diderot_string_t"
50              | Ty.IntTy => CL.T_Named "Diderot_int_t"              | Ty.IntTy => CL.T_Named "Diderot_int_t"
51              | Ty.TensorTy[] => CL.T_Named "Diderot_real_t"              | Ty.TensorTy[] => CL.T_Named "Diderot_real_t"
52              | Ty.TensorTy[n] => CL.T_Named(CTyN.vecTy n)              | Ty.TensorTy[n] => CTyN.vecTy n
53              | Ty.TensorTy[n, m] => CL.T_Named(CTyN.matTy(n,m))              | Ty.TensorTy[n, m] => CTyN.matTy(n,m)
54              | Ty.TensorTy[n, m, l] => CL.T_Named(CTyN.ten3Ty(n,m,l))              | Ty.TensorTy[n, m, l] => CTyN.ten3Ty(n,m,l)
55              | Ty.SeqTy(Ty.IntTy, n) => CL.T_Named(CTyN.ivecTy n)              | Ty.SeqTy(Ty.IntTy, n) => CTyN.ivecTy n
56              | Ty.SeqTy(ty, n) => CL.T_Array(toType ty, SOME n)              | Ty.SeqTy(ty, n) => CL.T_Array(toType ty, SOME n)
57  (* do we make the following types externally visible? *)  (* do we make the following types externally visible? *)
58              | Ty.DynSeqTy _ => RN.dynSeqTy              | Ty.DynSeqTy _ => RN.dynSeqTy
# Line 120  Line 120 
120              | Ty.IntTy => [CL.mkAssign(dst, src)]              | Ty.IntTy => [CL.mkAssign(dst, src)]
121              | Ty.TensorTy[] => [CL.mkAssign(dst, src)]              | Ty.TensorTy[] => [CL.mkAssign(dst, src)]
122              | Ty.TensorTy[n] => let              | Ty.TensorTy[n] => let
123                  val src' = CL.mkCast(CL.T_Named(CTyN.unionTy n), src)                  val src' = CL.mkCast(CTyN.unionTy n, src)
124                  in                  in
125                    List.tabulate (n,                    List.tabulate (n,
126                      fn i => CL.mkAssign(                      fn i => CL.mkAssign(
# Line 198  Line 198 
198                | Ty.TensorTy[n] => tensorSz n                | Ty.TensorTy[n] => tensorSz n
199                | Ty.TensorTy[n, m] => tensorSz (n*m)                | Ty.TensorTy[n, m] => tensorSz (n*m)
200                | Ty.TensorTy[n, m, l] => tensorSz (n*m*l)                | Ty.TensorTy[n, m, l] => tensorSz (n*m*l)
201                | Ty.SeqTy(Ty.IntTy, n) => CL.mkSizeof(CL.T_Named(CTyN.ivecTy n))                | Ty.SeqTy(Ty.IntTy, n) => CL.mkSizeof(CTyN.ivecTy n)
202                | Ty.SeqTy(ty, n) => CL.mkSizeof(CL.T_Array(toType ty, SOME n))                | Ty.SeqTy(ty, n) => CL.mkSizeof(CL.T_Array(toType ty, SOME n))
203    (* do we make the following types externally visible? *)    (* do we make the following types externally visible? *)
204                | Ty.DynSeqTy _ => CL.mkSizeof CL.voidTy                | Ty.DynSeqTy _ => CL.mkSizeof CL.voidTy

Legend:
Removed from v.3094  
changed lines
  Added in v.3095

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