SIL: Terminology change: [fragile] => [serialized]

Also, add a third [serializable] state for functions whose bodies we
*can* serialize, but only do so if they're referenced from another
serialized function.

This will be used for bodies synthesized for imported definitions,
such as init(rawValue:), etc, and various thunks, but for now this
change is NFC.
This commit is contained in:
Slava Pestov
2017-03-29 01:39:52 -07:00
parent aed4ed7e42
commit 8fe8b89b0f
129 changed files with 830 additions and 792 deletions

View File

@@ -56,7 +56,7 @@ SILFunction *SILFunction::create(
SILModule &M, SILLinkage linkage, StringRef name,
CanSILFunctionType loweredType, GenericEnvironment *genericEnv,
Optional<SILLocation> loc, IsBare_t isBareSILFunction,
IsTransparent_t isTrans, IsFragile_t isFragile, IsThunk_t isThunk,
IsTransparent_t isTrans, IsSerialized_t isSerialized, IsThunk_t isThunk,
ClassVisibility_t classVisibility, Inline_t inlineStrategy, EffectsKind E,
SILFunction *insertBefore, const SILDebugScope *debugScope) {
// Get a StringMapEntry for the function. As a sop to error cases,
@@ -70,7 +70,7 @@ SILFunction *SILFunction::create(
auto fn = new (M)
SILFunction(M, linkage, name, loweredType, genericEnv, loc,
isBareSILFunction, isTrans, isFragile, isThunk,
isBareSILFunction, isTrans, isSerialized, isThunk,
classVisibility, inlineStrategy, E, insertBefore, debugScope);
if (entry) entry->setValue(fn);
@@ -81,14 +81,14 @@ SILFunction::SILFunction(SILModule &Module, SILLinkage Linkage, StringRef Name,
CanSILFunctionType LoweredType,
GenericEnvironment *genericEnv,
Optional<SILLocation> Loc, IsBare_t isBareSILFunction,
IsTransparent_t isTrans, IsFragile_t isFragile,
IsTransparent_t isTrans, IsSerialized_t isSerialized,
IsThunk_t isThunk, ClassVisibility_t classVisibility,
Inline_t inlineStrategy, EffectsKind E,
SILFunction *InsertBefore,
const SILDebugScope *DebugScope)
: Module(Module), Name(Name), LoweredType(LoweredType),
GenericEnv(genericEnv), DebugScope(DebugScope), Bare(isBareSILFunction),
Transparent(isTrans), Fragile(isFragile), Thunk(isThunk),
Transparent(isTrans), Serialized(isSerialized), Thunk(isThunk),
ClassVisibility(classVisibility), GlobalInitFlag(false),
InlineStrategy(inlineStrategy), Linkage(unsigned(Linkage)),
KeepAsPublic(false), EffectsKindAttr(E) {