@@ -1026,6 +1026,7 @@ static bool parseDeclSILOptional(bool *isTransparent,
1026
1026
IsDistributed_t *isDistributed,
1027
1027
IsRuntimeAccessible_t *isRuntimeAccessible,
1028
1028
ForceEnableLexicalLifetimes_t *forceEnableLexicalLifetimes,
1029
+ UseStackForPackMetadata_t *useStackForPackMetadata,
1029
1030
IsExactSelfClass_t *isExactSelfClass,
1030
1031
SILFunction **dynamicallyReplacedFunction,
1031
1032
SILFunction **usedAdHocRequirementWitness,
@@ -1069,6 +1070,9 @@ static bool parseDeclSILOptional(bool *isTransparent,
1069
1070
else if (forceEnableLexicalLifetimes &&
1070
1071
SP.P .Tok .getText () == " lexical_lifetimes" )
1071
1072
*forceEnableLexicalLifetimes = DoForceEnableLexicalLifetimes;
1073
+ else if (useStackForPackMetadata &&
1074
+ SP.P .Tok .getText () == " no_onstack_pack_metadata" )
1075
+ *useStackForPackMetadata = DoNotUseStackForPackMetadata;
1072
1076
else if (isExactSelfClass && SP.P .Tok .getText () == " exact_self_class" )
1073
1077
*isExactSelfClass = IsExactSelfClass;
1074
1078
else if (isCanonical && SP.P .Tok .getText () == " canonical" )
@@ -6971,6 +6975,7 @@ bool SILParserState::parseDeclSIL(Parser &P) {
6971
6975
IsRuntimeAccessible_t isRuntimeAccessible = IsNotRuntimeAccessible;
6972
6976
ForceEnableLexicalLifetimes_t forceEnableLexicalLifetimes =
6973
6977
DoNotForceEnableLexicalLifetimes;
6978
+ UseStackForPackMetadata_t useStackForPackMetadata = DoUseStackForPackMetadata;
6974
6979
IsExactSelfClass_t isExactSelfClass = IsNotExactSelfClass;
6975
6980
bool hasOwnershipSSA = false ;
6976
6981
IsThunk_t isThunk = IsNotThunk;
@@ -6995,13 +7000,13 @@ bool SILParserState::parseDeclSIL(Parser &P) {
6995
7000
parseDeclSILOptional (
6996
7001
&isTransparent, &isSerialized, &isCanonical, &hasOwnershipSSA,
6997
7002
&isThunk, &isDynamic, &isDistributed, &isRuntimeAccessible,
6998
- &forceEnableLexicalLifetimes, &isExactSelfClass ,
6999
- &DynamicallyReplacedFunction , &AdHocWitnessFunction ,
7000
- &objCReplacementFor , &specialPurpose , &inlineStrategy ,
7001
- &optimizationMode , &perfConstr , &markedAsUsed , §ion, nullptr ,
7002
- &isWeakImported,
7003
- &needStackProtection , &availability , &isWithoutActuallyEscapingThunk ,
7004
- &Semantics, & SpecAttrs, &ClangDecl, &MRK, FunctionState, M) ||
7003
+ &forceEnableLexicalLifetimes, &useStackForPackMetadata ,
7004
+ &isExactSelfClass , &DynamicallyReplacedFunction ,
7005
+ &AdHocWitnessFunction , &objCReplacementFor , &specialPurpose ,
7006
+ &inlineStrategy , &optimizationMode , &perfConstr , &markedAsUsed ,
7007
+ §ion, nullptr , & isWeakImported, &needStackProtection ,
7008
+ &availability , &isWithoutActuallyEscapingThunk , &Semantics ,
7009
+ &SpecAttrs, &ClangDecl, &MRK, FunctionState, M) ||
7005
7010
P.parseToken (tok::at_sign, diag::expected_sil_function_name) ||
7006
7011
P.parseIdentifier (FnName, FnNameLoc, /* diagnoseDollarPrefix=*/ false ,
7007
7012
diag::expected_sil_function_name) ||
@@ -7035,6 +7040,7 @@ bool SILParserState::parseDeclSIL(Parser &P) {
7035
7040
FunctionState.F ->setIsRuntimeAccessible (isRuntimeAccessible);
7036
7041
FunctionState.F ->setForceEnableLexicalLifetimes (
7037
7042
forceEnableLexicalLifetimes);
7043
+ FunctionState.F ->setUseStackForPackMetadata (useStackForPackMetadata);
7038
7044
FunctionState.F ->setIsExactSelfClass (isExactSelfClass);
7039
7045
FunctionState.F ->setDynamicallyReplacedFunction (
7040
7046
DynamicallyReplacedFunction);
@@ -7245,9 +7251,9 @@ bool SILParserState::parseSILGlobal(Parser &P) {
7245
7251
parseDeclSILOptional (nullptr , &isSerialized, nullptr , nullptr , nullptr ,
7246
7252
nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
7247
7253
nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
7248
- nullptr , nullptr ,
7249
- &isLet , nullptr , nullptr , nullptr , nullptr , nullptr ,
7250
- nullptr , nullptr , nullptr , State, M) ||
7254
+ nullptr , nullptr , nullptr , &isLet, nullptr , nullptr ,
7255
+ nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
7256
+ State, M) ||
7251
7257
P.parseToken (tok::at_sign, diag::expected_sil_value_name) ||
7252
7258
P.parseIdentifier (GlobalName, NameLoc, /* diagnoseDollarPrefix=*/ false ,
7253
7259
diag::expected_sil_value_name) ||
@@ -7297,9 +7303,9 @@ bool SILParserState::parseSILProperty(Parser &P) {
7297
7303
if (parseDeclSILOptional (nullptr , &Serialized, nullptr , nullptr , nullptr ,
7298
7304
nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
7299
7305
nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
7300
- nullptr , nullptr ,
7301
7306
nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
7302
- nullptr , nullptr , nullptr , SP, M))
7307
+ nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
7308
+ SP, M))
7303
7309
return true ;
7304
7310
7305
7311
ValueDecl *VD;
@@ -7367,9 +7373,9 @@ bool SILParserState::parseSILVTable(Parser &P) {
7367
7373
if (parseDeclSILOptional (nullptr , &Serialized, nullptr , nullptr , nullptr ,
7368
7374
nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
7369
7375
nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
7370
- nullptr , nullptr ,
7371
7376
nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
7372
- nullptr , nullptr , nullptr , VTableState, M))
7377
+ nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
7378
+ VTableState, M))
7373
7379
return true ;
7374
7380
7375
7381
// Parse the class name.
@@ -7478,10 +7484,9 @@ bool SILParserState::parseSILMoveOnlyDeinit(Parser &parser) {
7478
7484
if (parseDeclSILOptional (nullptr , &Serialized, nullptr , nullptr , nullptr ,
7479
7485
nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
7480
7486
nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
7481
- nullptr , nullptr ,
7482
7487
nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
7483
- nullptr , nullptr , nullptr , moveOnlyDeinitTableState ,
7484
- M))
7488
+ nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
7489
+ moveOnlyDeinitTableState, M))
7485
7490
return true ;
7486
7491
7487
7492
// Parse the class name.
@@ -7966,9 +7971,9 @@ bool SILParserState::parseSILWitnessTable(Parser &P) {
7966
7971
if (parseDeclSILOptional (nullptr , &isSerialized, nullptr , nullptr , nullptr ,
7967
7972
nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
7968
7973
nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
7969
- nullptr , nullptr ,
7970
7974
nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
7971
- nullptr , nullptr , nullptr , WitnessState, M))
7975
+ nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
7976
+ WitnessState, M))
7972
7977
return true ;
7973
7978
7974
7979
// Parse the protocol conformance.
0 commit comments