mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user