Skip to content

Commit 492a0a3

Browse files
committed
Move the responsibility for adding the special direct continuation
arguments to the CallEmission.
1 parent 8e20fbd commit 492a0a3

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

lib/IRGen/GenCall.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3316,6 +3316,14 @@ class AsyncCallEmission final : public CallEmission {
33163316
break;
33173317
}
33183318
}
3319+
3320+
// If we're passing the continuation directly, add those implicit
3321+
// arguments.
3322+
if (getCallee().shouldPassContinuationDirectly()) {
3323+
asyncExplosion.add(getResumeFunctionPointer());
3324+
asyncExplosion.add(getAsyncContext());
3325+
}
3326+
33193327
super::setArgs(asyncExplosion, false, witnessMetadata);
33203328

33213329
auto layout = getAsyncContextLayout();

lib/IRGen/IRGenSIL.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3911,11 +3911,6 @@ void IRGenSILFunction::visitFullApplySite(FullApplySite site) {
39113911
}
39123912
}
39133913

3914-
if (calleeFP.shouldPassContinuationDirectly()) {
3915-
llArgs.add(emission->getResumeFunctionPointer());
3916-
llArgs.add(emission->getAsyncContext());
3917-
}
3918-
39193914
// Add all those arguments.
39203915
emission->setArgs(llArgs, false, &witnessMetadata);
39213916

0 commit comments

Comments
 (0)