Create a thinner coupling between devirtualization functions.

Redefine DevirtClassMethodInfo to carry fewer values in an effort to
reduce the coupling between these functions. Long term I expect this
structure to go away, but that is difficult to do without more
refactoring.

Swift SVN r26034
This commit is contained in:
Mark Lacey
2015-03-12 05:09:47 +00:00
parent f174ad1a2c
commit b98f1cd51b
2 changed files with 32 additions and 31 deletions

View File

@@ -35,12 +35,10 @@ namespace swift {
/// the analysis which checks if it is possible to
/// devirtualize a given class_method.
struct DevirtClassMethodInfo {
SILFunctionType::ParameterSILTypeArrayRef ParamTypes;
SILFunction *F;
CanSILFunctionType SubstCalleeType;
ArrayRef<Substitution> Substitutions;
ClassDecl *CD;
SILType ClassInstanceType;
DevirtClassMethodInfo() : ParamTypes({}), F(nullptr) {}
DevirtClassMethodInfo() : CD(nullptr), ClassInstanceType(SILType()) {}
};
ApplyInst *devirtualizeApply(ApplyInst *AI);