Reduce the Stack Size of ConstraintSystem

The ConstraintSystem class is on the order of 1000s of bytes in size on
the stacka nd is causing issues with dispatch's 64k stack limit.

This changes most Small data types which store data on the stack to non
small heap based data types.
This commit is contained in:
Gwen Mittertreiner
2019-05-09 15:36:58 -07:00
parent 6e533361dc
commit e51b72b3e0
7 changed files with 34 additions and 27 deletions

View File

@@ -2254,7 +2254,7 @@ size_t Solution::getTotalMemory() const {
llvm::capacity_in_bytes(Fixes) + DisjunctionChoices.getMemorySize() +
OpenedTypes.getMemorySize() + OpenedExistentialTypes.getMemorySize() +
(DefaultedConstraints.size() * sizeof(void *)) +
llvm::capacity_in_bytes(Conformances);
Conformances.size() * sizeof(std::pair<ConstraintLocator *, ProtocolConformanceRef>);
}
DeclName OverloadChoice::getName() const {