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 633, Thu Mar 17 02:47:08 2011 UTC revision 634, Thu Mar 17 03:42:15 2011 UTC
# Line 153  Line 153 
153                  ]                  ]
154          (* create the loop nest for the initially iterations *)          (* create the loop nest for the initially iterations *)
155            val indexVar = "ix"            val indexVar = "ix"
156              val strandTy = CL.T_Ptr(CL.T_Named(RN.strandTy name))
157            fun mkLoopNest [] = CL.mkBlock(createPrefix @ [            fun mkLoopNest [] = CL.mkBlock(createPrefix @ [
158                    CL.S_Decl(CL.T_Ptr(CL.T_Named(RN.strandTy name)), "sp",                    CL.S_Decl(strandTy, "sp",
159                      SOME(CL.I_Exp(CL.E_Apply(RN.inState, [CL.E_Var "wrld", CL.E_Var indexVar])))),                      SOME(CL.I_Exp(
160                          CL.E_Cast(strandTy,
161                          CL.E_Apply(RN.inState, [CL.E_Var "wrld", CL.E_Var indexVar]))))),
162                    CL.S_Call(RN.strandInit name, CL.E_Var "sp" :: List.map (fn (E(e, _)) => e) args),                    CL.S_Call(RN.strandInit name, CL.E_Var "sp" :: List.map (fn (E(e, _)) => e) args),
163                    CL.S_Assign(CL.E_Var indexVar, CL.mkBinOp(CL.E_Var indexVar, CL.#+, CL.E_Int(1, CL.uint32)))                    CL.S_Assign(CL.E_Var indexVar, CL.mkBinOp(CL.E_Var indexVar, CL.#+, CL.E_Int(1, CL.uint32)))
164                  ])                  ])

Legend:
Removed from v.633  
changed lines
  Added in v.634

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