-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for passing arguments to lambda_wrapper and added corou…
…tine_wrapper
- Loading branch information
1 parent
5d2ffd2
commit ff0b0c1
Showing
6 changed files
with
24 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,22 @@ | ||
|
||
#include <functional> | ||
namespace builder { | ||
void lambda_wrapper_impl(void); | ||
void lambda_wrapper(void); | ||
void lambda_wrapper(std::function<void(void)>); | ||
void lambda_wrapper_close(void); | ||
void coroutine_wrapper(std::function<void(void)>); | ||
void coroutine_wrapper_close(void); | ||
|
||
int tail_call_guard; | ||
|
||
void lambda_wrapper(void) { | ||
lambda_wrapper_impl(); | ||
void lambda_wrapper(std::function<void(void)> f) { | ||
f(); | ||
tail_call_guard += 1; | ||
} | ||
void lambda_wrapper_close(void) {} | ||
|
||
|
||
void coroutine_wrapper(std::function<void(void)> f) { | ||
f(); | ||
tail_call_guard +=1; | ||
} | ||
void coroutine_wrapper_close(void) {} | ||
} // namespace builder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters