diff options
Diffstat (limited to 'src/ir/branch-utils.h')
-rw-r--r-- | src/ir/branch-utils.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/ir/branch-utils.h b/src/ir/branch-utils.h index 3c0275701..28e29ede4 100644 --- a/src/ir/branch-utils.h +++ b/src/ir/branch-utils.h @@ -82,6 +82,13 @@ void operateOnScopeNameUsesAndSentTypes(Expression* expr, T func) { func(name, tt->sentTypes[i]); } } + } else if (auto* r = expr->dynCast<Resume>()) { + for (Index i = 0; i < r->handlerTags.size(); i++) { + auto dest = r->handlerTags[i]; + if (dest == name) { + func(name, r->sentTypes[i]); + } + } } else { assert(expr->is<Try>() || expr->is<Rethrow>()); // delegate or rethrow } @@ -106,6 +113,10 @@ void operateOnScopeNameUsesAndSentValues(Expression* expr, T func) { // The values are supplied by throwing instructions, so we are unable to // know what they will be here. func(name, nullptr); + } else if (auto* res = expr->dynCast<Resume>()) { + // The values are supplied by suspend instructions executed while running + // the continuation, so we are unable to know what they will be here. + func(name, nullptr); } else { assert(expr->is<Try>() || expr->is<Rethrow>()); // delegate or rethrow } |