Skip to content

Commit 0e1de07

Browse files
committed
bring down coroutine frame size
1 parent 57b5294 commit 0e1de07

9 files changed

Lines changed: 341 additions & 398 deletions

include/exec/any_sender_of.hpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -371,9 +371,8 @@ namespace experimental::execution
371371

372372
void __reset() noexcept
373373
{
374-
(*__vtable_)(__any::__delete, this);
375-
__object_pointer_ = nullptr;
376-
__vtable_ = __default_storage_vtable(static_cast<__vtable_t*>(nullptr));
374+
auto* __default_vtable = __default_storage_vtable((__vtable_t*) nullptr);
375+
(*std::exchange(__vtable_, __default_vtable))(__any::__delete, this);
377376
}
378377

379378
[[nodiscard]]
@@ -561,9 +560,8 @@ namespace experimental::execution
561560

562561
void __reset() noexcept
563562
{
564-
(*__vtable_)(__any::__delete, this);
565-
__object_pointer_ = nullptr;
566-
__vtable_ = __default_storage_vtable(static_cast<__vtable_t*>(nullptr));
563+
auto* __default_vtable = __default_storage_vtable((__vtable_t*) nullptr);
564+
(*std::exchange(__vtable_, __default_vtable))(__any::__delete, this);
567565
}
568566

569567
auto __get_vtable() const noexcept -> _Vtable const *

include/exec/at_coroutine_exit.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ namespace experimental::execution
181181
{
182182
auto __cont = __h.promise().continuation();
183183
auto __coro = __h.promise().__is_stopped_ ? __cont.unhandled_stopped() : __cont.handle();
184-
return STDEXEC_DESTROY_AND_CONTINUE(__h, __coro);
184+
return STDEXEC_CORO_DESTROY_AND_CONTINUE(__h, __coro);
185185
}
186186

187187
void await_resume() const noexcept {}

include/exec/on_coro_disposition.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ namespace experimental::execution
122122
{
123123
auto __cont = __h.promise().continuation();
124124
auto __coro = __h.promise().__is_stopped_ ? __cont.unhandled_stopped() : __cont.handle();
125-
return STDEXEC_DESTROY_AND_CONTINUE(__h, __coro);
125+
return STDEXEC_CORO_DESTROY_AND_CONTINUE(__h, __coro);
126126
}
127127

128128
void await_resume() const noexcept {}

include/stdexec/__detail/__connect.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ namespace STDEXEC
4343
};
4444

4545
template <class _Sender, class _Receiver>
46-
concept __with_co_await = __awaitable<_Sender, __connect_await::__promise<_Receiver>>;
46+
concept __with_co_await =
47+
__awaitable<_Sender, __connect_awaitable_t::__promise_t<_Sender, _Receiver>>;
4748

4849
template <class _Sender, class _Receiver>
4950
concept __with_legacy_tag_invoke = __tag_invocable<connect_t, _Sender, _Receiver>;

0 commit comments

Comments
 (0)