Skip to content

Commit 9296a12

Browse files
Merge pull request #4260 from github/igfoo/coroutines
C++: Add coroutines* tables
2 parents b3c50ae + a912a32 commit 9296a12

File tree

5 files changed

+4874
-288
lines changed

5 files changed

+4874
-288
lines changed

cpp/ql/src/semmlecode.cpp.dbscheme

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,28 @@ function_entry_point(int id: @function ref, unique int entry_point: @stmt ref);
414414

415415
function_return_type(int id: @function ref, int return_type: @type ref);
416416

417+
/** If `function` is a coroutine, then this gives the
418+
std::experimental::resumable_traits instance associated with it,
419+
and the variables representing the `handle` and `promise` for it. */
420+
coroutine(
421+
unique int function: @function ref,
422+
int traits: @type ref,
423+
int handle: @variable ref,
424+
int promise: @variable ref
425+
);
426+
427+
/** The `new` function used for allocating the coroutine state, if any. */
428+
coroutine_new(
429+
unique int function: @function ref,
430+
int new: @function ref
431+
);
432+
433+
/** The `delete` function used for deallocating the coroutine state, if any. */
434+
coroutine_delete(
435+
unique int function: @function ref,
436+
int delete: @function ref
437+
);
438+
417439
purefunctions(unique int id: @function ref);
418440

419441
function_deleted(unique int id: @function ref);

0 commit comments

Comments
 (0)