diff options
Diffstat (limited to 'src/ir/module-utils.cpp')
-rw-r--r-- | src/ir/module-utils.cpp | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/ir/module-utils.cpp b/src/ir/module-utils.cpp index a16592d15..1efbe490a 100644 --- a/src/ir/module-utils.cpp +++ b/src/ir/module-utils.cpp @@ -399,15 +399,10 @@ struct CodeScanner } } else if (auto* get = curr->dynCast<StructGet>()) { info.note(get->ref->type); - // TODO: Just include curr->type for AllTypes and UsedIRTypes to avoid - // this special case and to avoid emitting unnecessary types in binaries. - info.include(get->type); } else if (auto* set = curr->dynCast<StructSet>()) { info.note(set->ref->type); } else if (auto* get = curr->dynCast<ArrayGet>()) { info.note(get->ref->type); - // See above. - info.include(get->type); } else if (auto* set = curr->dynCast<ArraySet>()) { info.note(set->ref->type); } else if (auto* contBind = curr->dynCast<ContBind>()) { @@ -468,20 +463,6 @@ InsertOrderedMap<HeapType, HeapTypeInfo> collectHeapTypeInfo( } } - // TODO: Remove this once we remove the hack for StructGet and StructSet in - // CodeScanner. - if (inclusion == TypeInclusion::UsedIRTypes) { - auto it = info.info.begin(); - while (it != info.info.end()) { - if (it->second.useCount == 0) { - auto deleted = it++; - info.info.erase(deleted); - } else { - ++it; - } - } - } - // Recursively traverse each reference type, which may have a child type that // is itself a reference type. This reflects an appearance in the binary // format that is in the type section itself. As we do this we may find more |