248 |
CL.mkDeclInit(globTy, "glob", CL.mkIndirect(wrldV, "globals")) :: |
CL.mkDeclInit(globTy, "glob", CL.mkIndirect(wrldV, "globals")) :: |
249 |
CL.unBlock init @ [CL.mkReturn(SOME(CL.mkVar "false"))] |
CL.unBlock init @ [CL.mkReturn(SOME(CL.mkVar "false"))] |
250 |
(* for libraries, we need to make sure that the inputs are initialized *) |
(* for libraries, we need to make sure that the inputs are initialized *) |
251 |
val initStms = if not(#exec props) |
val initStms = if not(#exec props) andalso #hasInputs props |
252 |
then CL.mkIfThen( |
then CL.mkIfThen( |
253 |
CL.mkApply(N.checkDefined props, [wrldV]), |
CL.mkApply(N.checkDefined props, [wrldV]), |
254 |
CL.mkReturn(SOME(CL.mkBool true))) :: initStms |
CL.mkReturn(SOME(CL.mkBool true))) :: initStms |
462 |
then (CL.T_Ptr(CL.T_Named(N.globalsTy props)), "globals") :: extras |
then (CL.T_Ptr(CL.T_Named(N.globalsTy props)), "globals") :: extras |
463 |
else extras |
else extras |
464 |
val extras = (CL.T_Ptr CL.uint8, "status") :: extras |
val extras = (CL.T_Ptr CL.uint8, "status") :: extras |
465 |
val extras = if #exec props |
val extras = if #exec props orelse not(#hasInputs props) |
466 |
then extras |
then extras |
467 |
else (CL.T_Named(N.definedInpTy props), "definedInp") :: extras |
else (CL.T_Named(N.definedInpTy props), "definedInp") :: extras |
468 |
val extras = if #parallel props |
val extras = if #parallel props |