Skip to content

Commit 444d8e0

Browse files
committed
undo
1 parent 943aedc commit 444d8e0

1 file changed

Lines changed: 3 additions & 30 deletions

File tree

src/ir/possible-contents.cpp

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,40 +1280,13 @@ struct InfoCollector
12801280
// TODO: optimize when possible
12811281
addRoot(curr);
12821282
}
1283-
1284-
template<typename T>
1285-
void handleResume(T* curr) {
1283+
void visitResume(Resume* curr) {
12861284
// TODO: optimize when possible
12871285
addRoot(curr);
1288-
1289-
// Connect handled tags with their branch targets, and materialize non-null
1290-
// exnref values.
1291-
auto numTags = curr->handlerTags.size();
1292-
for (Index tagIndex = 0; tagIndex < numTags; tagIndex++) {
1293-
auto tag = curr->handlerTags[tagIndex];
1294-
auto target = curr->handlerBlocks[tagIndex];
1295-
auto params = getModule()->getTag(tag)->params();
1296-
1297-
// Add the values from the tag.
1298-
for (Index i = 0; i < params.size(); i++) {
1299-
if (isRelevant(params[i])) {
1300-
info.links.push_back(
1301-
{TagLocation{tag, i}, getBreakTargetLocation(target, i)});
1302-
}
1303-
}
1304-
1305-
// Add the continuation.
1306-
auto location = getRootLocation(Type(HeapType::cont, NonNullable));
1307-
info.links.push_back(
1308-
{location, getBreakTargetLocation(target, params.size())});
1309-
}
1310-
}
1311-
1312-
void visitResume(Resume* curr) {
1313-
handleResume(curr);
13141286
}
13151287
void visitResumeThrow(ResumeThrow* curr) {
1316-
handleResume(curr);
1288+
// TODO: optimize when possible
1289+
addRoot(curr);
13171290
}
13181291
void visitStackSwitch(StackSwitch* curr) {
13191292
// TODO: optimize when possible

0 commit comments

Comments
 (0)