@@ -1026,6 +1026,7 @@ static bool parseDeclSILOptional(bool *isTransparent,
10261026 IsDistributed_t *isDistributed,
10271027 IsRuntimeAccessible_t *isRuntimeAccessible,
10281028 ForceEnableLexicalLifetimes_t *forceEnableLexicalLifetimes,
1029+ UseStackForPackMetadata_t *useStackForPackMetadata,
10291030 IsExactSelfClass_t *isExactSelfClass,
10301031 SILFunction **dynamicallyReplacedFunction,
10311032 SILFunction **usedAdHocRequirementWitness,
@@ -1069,6 +1070,9 @@ static bool parseDeclSILOptional(bool *isTransparent,
10691070 else if (forceEnableLexicalLifetimes &&
10701071 SP.P .Tok .getText () == " lexical_lifetimes" )
10711072 *forceEnableLexicalLifetimes = DoForceEnableLexicalLifetimes;
1073+ else if (useStackForPackMetadata &&
1074+ SP.P .Tok .getText () == " no_onstack_pack_metadata" )
1075+ *useStackForPackMetadata = DoNotUseStackForPackMetadata;
10721076 else if (isExactSelfClass && SP.P .Tok .getText () == " exact_self_class" )
10731077 *isExactSelfClass = IsExactSelfClass;
10741078 else if (isCanonical && SP.P .Tok .getText () == " canonical" )
@@ -6971,6 +6975,7 @@ bool SILParserState::parseDeclSIL(Parser &P) {
69716975 IsRuntimeAccessible_t isRuntimeAccessible = IsNotRuntimeAccessible;
69726976 ForceEnableLexicalLifetimes_t forceEnableLexicalLifetimes =
69736977 DoNotForceEnableLexicalLifetimes;
6978+ UseStackForPackMetadata_t useStackForPackMetadata = DoUseStackForPackMetadata;
69746979 IsExactSelfClass_t isExactSelfClass = IsNotExactSelfClass;
69756980 bool hasOwnershipSSA = false ;
69766981 IsThunk_t isThunk = IsNotThunk;
@@ -6995,13 +7000,13 @@ bool SILParserState::parseDeclSIL(Parser &P) {
69957000 parseDeclSILOptional (
69967001 &isTransparent, &isSerialized, &isCanonical, &hasOwnershipSSA,
69977002 &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) ||
70057010 P.parseToken (tok::at_sign, diag::expected_sil_function_name) ||
70067011 P.parseIdentifier (FnName, FnNameLoc, /* diagnoseDollarPrefix=*/ false ,
70077012 diag::expected_sil_function_name) ||
@@ -7035,6 +7040,7 @@ bool SILParserState::parseDeclSIL(Parser &P) {
70357040 FunctionState.F ->setIsRuntimeAccessible (isRuntimeAccessible);
70367041 FunctionState.F ->setForceEnableLexicalLifetimes (
70377042 forceEnableLexicalLifetimes);
7043+ FunctionState.F ->setUseStackForPackMetadata (useStackForPackMetadata);
70387044 FunctionState.F ->setIsExactSelfClass (isExactSelfClass);
70397045 FunctionState.F ->setDynamicallyReplacedFunction (
70407046 DynamicallyReplacedFunction);
@@ -7245,9 +7251,9 @@ bool SILParserState::parseSILGlobal(Parser &P) {
72457251 parseDeclSILOptional (nullptr , &isSerialized, nullptr , nullptr , nullptr ,
72467252 nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
72477253 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) ||
72517257 P.parseToken (tok::at_sign, diag::expected_sil_value_name) ||
72527258 P.parseIdentifier (GlobalName, NameLoc, /* diagnoseDollarPrefix=*/ false ,
72537259 diag::expected_sil_value_name) ||
@@ -7297,9 +7303,9 @@ bool SILParserState::parseSILProperty(Parser &P) {
72977303 if (parseDeclSILOptional (nullptr , &Serialized, nullptr , nullptr , nullptr ,
72987304 nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
72997305 nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
7300- nullptr , nullptr ,
73017306 nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
7302- nullptr , nullptr , nullptr , SP, M))
7307+ nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
7308+ SP, M))
73037309 return true ;
73047310
73057311 ValueDecl *VD;
@@ -7367,9 +7373,9 @@ bool SILParserState::parseSILVTable(Parser &P) {
73677373 if (parseDeclSILOptional (nullptr , &Serialized, nullptr , nullptr , nullptr ,
73687374 nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
73697375 nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
7370- nullptr , nullptr ,
73717376 nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
7372- nullptr , nullptr , nullptr , VTableState, M))
7377+ nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
7378+ VTableState, M))
73737379 return true ;
73747380
73757381 // Parse the class name.
@@ -7478,10 +7484,9 @@ bool SILParserState::parseSILMoveOnlyDeinit(Parser &parser) {
74787484 if (parseDeclSILOptional (nullptr , &Serialized, nullptr , nullptr , nullptr ,
74797485 nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
74807486 nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
7481- nullptr , nullptr ,
74827487 nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
7483- nullptr , nullptr , nullptr , moveOnlyDeinitTableState ,
7484- M))
7488+ nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
7489+ moveOnlyDeinitTableState, M))
74857490 return true ;
74867491
74877492 // Parse the class name.
@@ -7966,9 +7971,9 @@ bool SILParserState::parseSILWitnessTable(Parser &P) {
79667971 if (parseDeclSILOptional (nullptr , &isSerialized, nullptr , nullptr , nullptr ,
79677972 nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
79687973 nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
7969- nullptr , nullptr ,
79707974 nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
7971- nullptr , nullptr , nullptr , WitnessState, M))
7975+ nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
7976+ WitnessState, M))
79727977 return true ;
79737978
79747979 // Parse the protocol conformance.
0 commit comments