Files
revng-revng/include/revng/ADT/RecursiveCoroutine.h
Pietro Fezzardi b58693b8e8 RecursiveCoroutine: enable direct continuation
Before this commit, the execution logic of RecursiveCoroutine used an
underlying std::stack allocated on the heap to hold all the
coroutine_handles. It also manually managed passing return values from
callees to callers.

This commit drops this unnecessary auxiliary stack.
When a RecursiveCoroutine co_awaits another one, the handle of the
awaiter is injected into the awaitee, so that when the awaitee is done
it can directly execute the remaining part of the awaiter as a
continuation.
2021-05-05 17:48:04 +02:00

18 lines
262 B
C

#pragma once
//
// This file is distributed under the MIT License. See LICENSE.md for details.
//
#include <utility>
#if defined(DISABLE_RECURSIVE_COROUTINES)
#include "RecursiveCoroutine-fallback.h"
#else
#include "RecursiveCoroutine-coroutine.h"
#endif