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

SCM Repository

[diderot] Diff of /branches/pure-cfg/src/compiler/c-target/c-target.sml
ViewVC logotype

Diff of /branches/pure-cfg/src/compiler/c-target/c-target.sml

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

revision 534, Tue Feb 15 03:40:00 2011 UTC revision 537, Tue Feb 15 18:02:25 2011 UTC
# Line 21  Line 21 
21        | T_Image of int          (* n-dimensional image data *)        | T_Image of int          (* n-dimensional image data *)
22        | T_Data of CL.ty         (* pointer to image data *)        | T_Data of CL.ty         (* pointer to image data *)
23    
24      (* string representation of types (for debugging *)
25        fun tyToString ty = (case ty
26               of T_Bool => "T_Bool"
27                | T_String => "T_String"
28                | T_Int => "T_Int"
29                | T_Real => "T_Real"
30                | T_Vec n => concat["T_Vec(", Int.toString n, ")"]
31                | T_IVec n => concat["T_IVec(", Int.toString n, ")"]
32                | T_Image n => concat["T_Image(", Int.toString n, ")"]
33                | T_Data ty => "T_Data"
34              (* end case *))
35    
36      type strand = unit (* FIXME *)      type strand = unit (* FIXME *)
37    
38      type var = (ty * string) (* FIXME *)      type var = (ty * string) (* FIXME *)
# Line 293  Line 305 
305                val sts = "sts"                val sts = "sts"
306                val inputFn = (case #1 lhs                val inputFn = (case #1 lhs
307                       of T_String => "Diderot_InputString"                       of T_String => "Diderot_InputString"
308                        | T_Vec 1 => "Diderot_InputReal"                        | T_Real => "Diderot_InputReal"
309                        | T_Vec 3 => "Diderot_InputVec3"                        | T_Vec 3 => "Diderot_InputVec3"
310                        | _ => raise Fail "unsupported input type"                        | ty => raise Fail("unsupported input type " ^ tyToString ty)
311                      (* end case *))                      (* end case *))
312                val lhs = CL.E_Var(#2 lhs)                val lhs = CL.E_Var(#2 lhs)
313                val (initCode, hasDflt) = (case optDflt                val (initCode, hasDflt) = (case optDflt

Legend:
Removed from v.534  
changed lines
  Added in v.537

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