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

SCM Repository

[diderot] Diff of /trunk/src/compiler/cl-target/cl-target.sml
ViewVC logotype

Diff of /trunk/src/compiler/cl-target/cl-target.sml

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

revision 1907, Sun Jun 3 08:17:19 2012 UTC revision 1989, Fri Aug 3 01:54:21 2012 UTC
# Line 214  Line 214 
214                val (vMap, stms) = (case scope                val (vMap, stms) = (case scope
215                       of GlobalScope => ToC.trFragment (vMap, blk)                       of GlobalScope => ToC.trFragment (vMap, blk)
216                        | InitiallyScope => ToC.trFragment (vMap, blk)                        | InitiallyScope => ToC.trFragment (vMap, blk)
217                          | StrandScope => ToC.trFragment (vMap, blk)
218                        | _ => ToCL.trFragment (vMap, blk)                        | _ => ToCL.trFragment (vMap, blk)
219                      (* end case *))                      (* end case *))
220                in                in
# Line 222  Line 223 
223          fun block (ENV{vMap, scope, ...}, blk) = (case scope          fun block (ENV{vMap, scope, ...}, blk) = (case scope
224                 of StrandScope => ToC.trBlock (vMap, blk)                 of StrandScope => ToC.trBlock (vMap, blk)
225                  | MethodScope name => ToCL.trBlock (vMap, blk)                  | MethodScope name => ToCL.trBlock (vMap, blk)
226                  | InitiallyScope => ToCL.trBlock (vMap, blk)                  | InitiallyScope => ToC.trBlock (vMap, blk)
227                  | _ => ToC.trBlock (vMap, blk)                  | _ => ToC.trBlock (vMap, blk)
228                (* end case *))                (* end case *))
229          fun exp (ENV{vMap, ...}, e) = ToCL.trExp(vMap, e)          fun exp (ENV{vMap,scope, ...}, e) = (case scope
230            of InitiallyScope => ToC.trExp(vMap, e)
231            | StrandScope => ToC.trExp(vMap, e)
232            | _ =>  ToCL.trExp(vMap, e)
233              (* end case *))
234        end        end
235    
236    (* variables *)    (* variables *)
# Line 252  Line 257 
257                  isImgGlobal (ty, name);                  isImgGlobal (ty, name);
258                  ToCL.V(#gpuTy x, name)                  ToCL.V(#gpuTy x, name)
259                end                end
260          fun param x = ToCL.V(ToCL.trType(V.ty x), V.name x)          fun param (ENV{scope, ...},x) = (case scope
261            of StrandScope => CL.V(ToC.trType(V.ty x), V.name x)
262             | InitiallyScope => CL.V(ToC.trType(V.ty x), V.name x)
263                    | _ =>  ToCL.V(ToCL.trType(V.ty x), V.name x)
264            (* end case *))
265        end        end
266    
267    (* environments *)    (* environments *)
# Line 593  Line 602 
602                        (RN.p_addGlobals, select (!globals, "", ",")),                        (RN.p_addGlobals, select (!globals, "", ",")),
603                        (RN.p_globals, select (!globals, "", "__global Diderot_Globals_t *diderotGlobals")),                        (RN.p_globals, select (!globals, "", "__global Diderot_Globals_t *diderotGlobals")),
604                        (RN.p_globalVar, select (!globals, "0", RN.globalsVarName)),                        (RN.p_globalVar, select (!globals, "0", RN.globalsVarName)),
605                        (RN.p_dataVar, select (!globals, "0", RN.globalImageDataName)),                        (RN.p_dataVar, select (!imgGlobals, "0", RN.globalImageDataName)),
606                        (RN.p_dataPtr, genKeneralGlobalParams (!imgGlobals, "")),                        (RN.p_dataPtr, genKeneralGlobalParams (!imgGlobals, "")),
607                        (RN.p_dataAssign,  select (!imgGlobals, "",                        (RN.p_dataAssign,  select (!imgGlobals, "",
608                          String.concat("Diderot_data_ptr_t diderotDataPtrs;\n" :: imageDataStms)))                          String.concat("Diderot_data_ptr_t diderotDataPtrs;\n" :: imageDataStms)))
# Line 867  Line 876 
876                      ]                      ]
877                val (fName,resTy) = (case methName                val (fName,resTy) = (case methName
878                       of StrandUtil.Update => (RN.strandUpdate,CL.T_Named "StrandStatus_t")                       of StrandUtil.Update => (RN.strandUpdate,CL.T_Named "StrandStatus_t")
879                        | StrandUtil.Stabilize => (name ^ StrandUtil.nameToString methName, CL.voidTy)                        | StrandUtil.Stabilize => (RN.strandStabilize, CL.voidTy)
880                      (* end case *))                      (* end case *))
881                val methFn = CL.D_Func([], resTy, fName, params, body)                val methFn = CL.D_Func([], resTy, fName, params, body)
882                in                in

Legend:
Removed from v.1907  
changed lines
  Added in v.1989

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