Skip to content

Commit 5538aaf

Browse files
committed
[Concurrency] Inline AsyncTask::FutureFragment::fragmentSize.
1 parent 91360f0 commit 5538aaf

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

include/swift/ABI/Task.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,9 @@ class AsyncTask : public HeapObject, public Job {
333333

334334
/// Determine the size of the future fragment given a particular future
335335
/// result type.
336-
static size_t fragmentSize(const Metadata *resultType);
336+
static size_t fragmentSize(const Metadata *resultType) {
337+
return storageOffset(resultType) + resultType->vw_size();
338+
}
337339
};
338340

339341
bool isFuture() const { return Flags.task_isFuture(); }

stdlib/public/Concurrency/Task.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@
2323
using namespace swift;
2424
using FutureFragment = AsyncTask::FutureFragment;
2525

26-
size_t FutureFragment::fragmentSize(const Metadata *resultType) {
27-
return storageOffset(resultType) + resultType->vw_size();
28-
}
29-
3026
void FutureFragment::destroy() {
3127
auto queueHead = waitQueue.load(std::memory_order_acquire);
3228
switch (queueHead.getStatus()) {

0 commit comments

Comments
 (0)