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

SCM Repository

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

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

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

revision 1332, Mon Jun 13 01:23:34 2011 UTC revision 1333, Mon Jun 13 01:33:25 2011 UTC
# Line 523  Line 523 
523                          CL.mkAssign(CL.mkVar outState,CL.mkSubscript(CL.mkVar "selfOut",index))                          CL.mkAssign(CL.mkVar outState,CL.mkSubscript(CL.mkVar "selfOut",index))
524                        ] end                        ] end
525                val status = CL.mkDecl(CL.intTy, "status", SOME(CL.I_Exp(CL.mkInt 0)))                val status = CL.mkDecl(CL.intTy, "status", SOME(CL.I_Exp(CL.mkInt 0)))
526                val strand_Init_Stm = CL.mkCall(RN.strandInit name, [CL.E_Var RN.globalsVarName,CL.mkUnOp(CL.%&,CL.E_Var inState), CL.E_Var "x", CL.E_Var "y"])                val strandInitStm = CL.mkCall(RN.strandInit name, [
527                val local_vars = thread_ids @ initGlobalImages(!imgGlobals)  @ strandDecl @ strandObjects @ [strand_Init_Stm,status]                        CL.E_Var RN.globalsVarName,
528                          CL.mkUnOp(CL.%&, CL.E_Var inState),
529                          CL.E_Var "x",
530    (* FIXME: if nDims = 1, then "y" is not defined! the arguments to this call should really come from
531     * the initially code!
532     *)
533                          CL.E_Var "y"])
534                  val local_vars = thread_ids
535                        @ initGlobalImages(!imgGlobals)
536                        @ strandDecl
537                        @ strandObjects
538                        @ [strandInitStm,status]
539                val while_exp = CL.mkBinOp(                val while_exp = CL.mkBinOp(
540                      CL.mkBinOp(CL.mkVar "status",CL.#!=, CL.mkVar RN.kStabilize),                      CL.mkBinOp(CL.mkVar "status",CL.#!=, CL.mkVar RN.kStabilize),
541                      CL.#||,                      CL.#||,
542                      CL.mkBinOp(CL.mkVar "status", CL.#!=, CL.mkVar RN.kDie))                      CL.mkBinOp(CL.mkVar "status", CL.#!=, CL.mkVar RN.kDie))
543                val whileBody = CL.mkBlock [                val whileBody = CL.mkBlock [
544    (* FIXME: need a barrier synchronization at beginning of loop *)
545                        CL.mkAssign(CL.mkVar "status",                        CL.mkAssign(CL.mkVar "status",
546                          CL.mkApply(RN.strandUpdate name,                          CL.mkApply(RN.strandUpdate name,
547                            [CL.mkUnOp(CL.%&,CL.mkVar inState), CL.mkUnOp(CL.%&,CL.mkVar outState),CL.E_Var RN.globalsVarName])),                            [CL.mkUnOp(CL.%&,CL.mkVar inState), CL.mkUnOp(CL.%&,CL.mkVar outState),CL.E_Var RN.globalsVarName])),
548    (* FIXME: why is there a call to stabilize here? *)
549                        CL.mkCall(RN.strandStabilize name,                        CL.mkCall(RN.strandStabilize name,
550                          [CL.mkUnOp(CL.%&,CL.mkVar inState), CL.mkUnOp(CL.%&,CL.mkVar outState),CL.E_Var RN.globalsVarName])                          [CL.mkUnOp(CL.%&,CL.mkVar inState), CL.mkUnOp(CL.%&,CL.mkVar outState),CL.E_Var RN.globalsVarName])
551                      ]                      ]

Legend:
Removed from v.1332  
changed lines
  Added in v.1333

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