@@ -108,17 +108,16 @@ SILFunction::create(SILModule &M, SILLinkage linkage, StringRef name,
108
108
// Resurrect a zombie function.
109
109
// This happens for example if a specialized function gets dead and gets
110
110
// deleted. And afterwards the same specialization is created again.
111
- fn->init (linkage, name, loweredType, genericEnv, loc, isBareSILFunction ,
112
- isTrans, isSerialized, entryCount, isThunk, classSubclassScope,
111
+ fn->init (linkage, name, loweredType, genericEnv, isBareSILFunction, isTrans ,
112
+ isSerialized, entryCount, isThunk, classSubclassScope,
113
113
inlineStrategy, E, debugScope, isDynamic, isExactSelfClass,
114
114
isDistributed);
115
115
assert (fn->empty ());
116
116
} else {
117
- fn = new (M) SILFunction (M, linkage, name, loweredType, genericEnv, loc,
118
- isBareSILFunction, isTrans, isSerialized,
119
- entryCount, isThunk, classSubclassScope,
120
- inlineStrategy, E, debugScope,
121
- isDynamic, isExactSelfClass, isDistributed);
117
+ fn = new (M) SILFunction (
118
+ M, linkage, name, loweredType, genericEnv, isBareSILFunction, isTrans,
119
+ isSerialized, entryCount, isThunk, classSubclassScope, inlineStrategy,
120
+ E, debugScope, isDynamic, isExactSelfClass, isDistributed);
122
121
}
123
122
if (entry) entry->setValue (fn);
124
123
@@ -138,44 +137,36 @@ static FunctionParseFn parseFunction = nullptr;
138
137
static FunctionCopyEffectsFn copyEffectsFunction = nullptr ;
139
138
static FunctionGetEffectFlagsFn getEffectFlagsFunction = nullptr ;
140
139
141
- SILFunction::SILFunction (SILModule &Module, SILLinkage Linkage, StringRef Name,
142
- CanSILFunctionType LoweredType,
143
- GenericEnvironment *genericEnv,
144
- Optional<SILLocation> Loc, IsBare_t isBareSILFunction,
145
- IsTransparent_t isTrans, IsSerialized_t isSerialized,
146
- ProfileCounter entryCount, IsThunk_t isThunk,
147
- SubclassScope classSubclassScope,
148
- Inline_t inlineStrategy, EffectsKind E,
149
- const SILDebugScope *DebugScope,
150
- IsDynamicallyReplaceable_t isDynamic,
151
- IsExactSelfClass_t isExactSelfClass,
152
- IsDistributed_t isDistributed)
140
+ SILFunction::SILFunction (
141
+ SILModule &Module, SILLinkage Linkage, StringRef Name,
142
+ CanSILFunctionType LoweredType, GenericEnvironment *genericEnv,
143
+ IsBare_t isBareSILFunction, IsTransparent_t isTrans,
144
+ IsSerialized_t isSerialized, ProfileCounter entryCount, IsThunk_t isThunk,
145
+ SubclassScope classSubclassScope, Inline_t inlineStrategy, EffectsKind E,
146
+ const SILDebugScope *DebugScope, IsDynamicallyReplaceable_t isDynamic,
147
+ IsExactSelfClass_t isExactSelfClass, IsDistributed_t isDistributed)
153
148
: SwiftObjectHeader(functionMetatype), Module(Module),
154
149
index(Module.getNewFunctionIndex()),
155
150
Availability(AvailabilityContext::alwaysAvailable()) {
156
- init (Linkage, Name, LoweredType, genericEnv, Loc, isBareSILFunction, isTrans,
157
- isSerialized, entryCount, isThunk, classSubclassScope, inlineStrategy,
158
- E, DebugScope, isDynamic, isExactSelfClass, isDistributed);
159
-
151
+ init (Linkage, Name, LoweredType, genericEnv, isBareSILFunction, isTrans,
152
+ isSerialized, entryCount, isThunk, classSubclassScope, inlineStrategy, E,
153
+ DebugScope, isDynamic, isExactSelfClass, isDistributed);
154
+
160
155
// Set our BB list to have this function as its parent. This enables us to
161
156
// splice efficiently basic blocks in between functions.
162
157
BlockList.Parent = this ;
163
158
if (initFunction)
164
159
initFunction ({this }, &libswiftSpecificData, sizeof (libswiftSpecificData));
165
160
}
166
161
167
- void SILFunction::init (SILLinkage Linkage, StringRef Name,
168
- CanSILFunctionType LoweredType,
169
- GenericEnvironment *genericEnv,
170
- Optional<SILLocation> Loc, IsBare_t isBareSILFunction,
171
- IsTransparent_t isTrans, IsSerialized_t isSerialized,
172
- ProfileCounter entryCount, IsThunk_t isThunk,
173
- SubclassScope classSubclassScope,
174
- Inline_t inlineStrategy, EffectsKind E,
175
- const SILDebugScope *DebugScope,
176
- IsDynamicallyReplaceable_t isDynamic,
177
- IsExactSelfClass_t isExactSelfClass,
178
- IsDistributed_t isDistributed) {
162
+ void SILFunction::init (
163
+ SILLinkage Linkage, StringRef Name, CanSILFunctionType LoweredType,
164
+ GenericEnvironment *genericEnv, IsBare_t isBareSILFunction,
165
+ IsTransparent_t isTrans, IsSerialized_t isSerialized,
166
+ ProfileCounter entryCount, IsThunk_t isThunk,
167
+ SubclassScope classSubclassScope, Inline_t inlineStrategy, EffectsKind E,
168
+ const SILDebugScope *DebugScope, IsDynamicallyReplaceable_t isDynamic,
169
+ IsExactSelfClass_t isExactSelfClass, IsDistributed_t isDistributed) {
179
170
setName (Name);
180
171
this ->LoweredType = LoweredType;
181
172
this ->GenericEnv = genericEnv;
@@ -244,12 +235,12 @@ void SILFunction::createSnapshot(int id) {
244
235
assert (id != 0 && " invalid snapshot ID" );
245
236
assert (!getSnapshot (id) && " duplicate snapshot" );
246
237
247
- SILFunction *newSnapshot = new (Module) SILFunction (Module,
248
- getLinkage (), getName (), getLoweredFunctionType (), getGenericEnvironment (),
249
- getLocation (), isBare (), isTransparent (), isSerialized (),
250
- getEntryCount (), isThunk (), getClassSubclassScope (),
251
- getInlineStrategy (), getEffectsKind (), getDebugScope (),
252
- isDynamicallyReplaceable (), isExactSelfClass (), isDistributed ());
238
+ SILFunction *newSnapshot = new (Module) SILFunction (
239
+ Module, getLinkage (), getName (), getLoweredFunctionType (),
240
+ getGenericEnvironment (), isBare (), isTransparent (), isSerialized (),
241
+ getEntryCount (), isThunk (), getClassSubclassScope (), getInlineStrategy (),
242
+ getEffectsKind (), getDebugScope (), isDynamicallyReplaceable (),
243
+ isExactSelfClass (), isDistributed ());
253
244
254
245
// Copy all relevant properties.
255
246
// TODO: It's really unfortunate that this needs to be done manually. It would
0 commit comments