@@ -1020,7 +1020,7 @@ instance Translatable A.Expr (State Ctx.Context (CCode Lval, CCode Stat)) where
1020
1020
callTheMethodOneway
1021
1021
ntarget targetType name args typeArguments Ty. unitType
1022
1022
1023
- let nullCheck = targetNullCheck ntarget target name emeta " . "
1023
+ let nullCheck = targetNullCheck ntarget target name emeta " ! "
1024
1024
result =
1025
1025
case eCtx of
1026
1026
Ctx. ClosureContext clos -> []
@@ -1064,7 +1064,7 @@ instance Translatable A.Expr (State Ctx.Context (CCode Lval, CCode Stat)) where
1064
1064
Ctx. ClosureContext clos -> []
1065
1065
_ -> [dtraceExit, Return Skip ]
1066
1066
futureChain =
1067
- if Util. isForwardInClos chain
1067
+ if Util. isForwardInExpr chain
1068
1068
then
1069
1069
Call futureChainActor
1070
1070
[AsExpr encoreCtxVar, AsExpr nfuture, ty, AsExpr nchain]
@@ -1154,7 +1154,7 @@ instance Translatable A.Expr (State Ctx.Context (CCode Lval, CCode Stat)) where
1154
1154
(Call futureChainActor
1155
1155
[AsExpr encoreCtxVar, AsExpr nfuture, ty, AsExpr nchain]
1156
1156
))] ++
1157
- if (Util. isForwardInClos chain) then [assignVar futNam (Nam result)]
1157
+ if (Util. isForwardInExpr chain) then [assignVar futNam (Nam result)]
1158
1158
else [] )
1159
1159
where
1160
1160
metaId = Meta. getMetaId . A. getMeta $ chain
@@ -1169,7 +1169,6 @@ instance Translatable A.Expr (State Ctx.Context (CCode Lval, CCode Stat)) where
1169
1169
let bound = map (ID. qLocal . A. pname) eparams
1170
1170
freeVars = filter (ID. isLocalQName . fst ) $
1171
1171
Util. freeVariables bound body
1172
- isIdClosure = not . null $ filter (isIdFun . A. pname) eparams
1173
1172
ty = runtimeType . A. getType $ body
1174
1173
futArg = if isAsyncForward
1175
1174
then futVar
@@ -1179,11 +1178,11 @@ instance Translatable A.Expr (State Ctx.Context (CCode Lval, CCode Stat)) where
1179
1178
(Var tmp,
1180
1179
Seq $
1181
1180
mkEnv envName : fillEnv ++
1182
- (if isIdClosure || isAsyncForward || (not $ Util. isForwardInClos body)
1181
+ (if isAsyncForward || (not $ Util. isForwardInExpr body)
1183
1182
then []
1184
1183
else [Assign (Decl (future, Var fut))
1185
1184
(Call futureMkFn [AsExpr encoreCtxVar, ty])]) ++
1186
- (if ( not isIdClosure) && ( Util. isForwardInClos body)
1185
+ (if Util. isForwardInExpr body
1187
1186
then [assignVar futNam futArg]
1188
1187
else [] ) ++
1189
1188
[Assign (Decl (closure, Var tmp))
0 commit comments