|
57 | 57 | #ifndef EXPERIMENTAL_FEATURE
|
58 | 58 | // Warning: setting `AvailableInProd` to `true` on a feature means that the flag
|
59 | 59 | // cannot be dropped in the future.
|
60 |
| -# define EXPERIMENTAL_FEATURE(FeatureName, AvailableInProd, IncludeInModuleInterface) \ |
| 60 | +# define EXPERIMENTAL_FEATURE(FeatureName, AvailableInProd) \ |
61 | 61 | LANGUAGE_FEATURE(FeatureName, 0, #FeatureName, \
|
62 | 62 | langOpts.hasFeature(#FeatureName))
|
63 | 63 | #endif
|
64 | 64 |
|
| 65 | +#ifndef EXPERIMENTAL_FEATURE_EXCLUDED_FROM_MODULE_INTERFACE |
| 66 | +# define EXPERIMENTAL_FEATURE_EXCLUDED_FROM_MODULE_INTERFACE(FeatureName, AvailableInProd) \ |
| 67 | + EXPERIMENTAL_FEATURE(#FeatureName, #AvailableInProd) |
| 68 | +#endif |
| 69 | + |
65 | 70 | LANGUAGE_FEATURE(AsyncAwait, 296, "async/await", true)
|
66 | 71 | LANGUAGE_FEATURE(EffectfulProp, 310, "Effectful properties", true)
|
67 | 72 | LANGUAGE_FEATURE(MarkerProtocol, 0, "@_marker protocol", true)
|
@@ -109,93 +114,94 @@ UPCOMING_FEATURE(BareSlashRegexLiterals, 354, 6)
|
109 | 114 | UPCOMING_FEATURE(ExistentialAny, 335, 6)
|
110 | 115 | UPCOMING_FEATURE(ImportObjcForwardDeclarations, 384, 6)
|
111 | 116 |
|
112 |
| -EXPERIMENTAL_FEATURE(StaticAssert, false, true) |
113 |
| -EXPERIMENTAL_FEATURE(VariadicGenerics, false, true) |
114 |
| -EXPERIMENTAL_FEATURE(NamedOpaqueTypes, false, true) |
115 |
| -EXPERIMENTAL_FEATURE(FlowSensitiveConcurrencyCaptures, false, true) |
116 |
| -EXPERIMENTAL_FEATURE(FreestandingMacros, true, true) |
117 |
| -EXPERIMENTAL_FEATURE(CodeItemMacros, true, true) |
118 |
| -EXPERIMENTAL_FEATURE(TupleConformances, false, true) |
| 117 | +EXPERIMENTAL_FEATURE(StaticAssert, false) |
| 118 | +EXPERIMENTAL_FEATURE(VariadicGenerics, false) |
| 119 | +EXPERIMENTAL_FEATURE(NamedOpaqueTypes, false) |
| 120 | +EXPERIMENTAL_FEATURE(FlowSensitiveConcurrencyCaptures, false) |
| 121 | +EXPERIMENTAL_FEATURE(FreestandingMacros, true) |
| 122 | +EXPERIMENTAL_FEATURE(CodeItemMacros, true) |
| 123 | +EXPERIMENTAL_FEATURE(TupleConformances, false) |
119 | 124 |
|
120 | 125 | // FIXME: MoveOnlyClasses is not intended to be in production,
|
121 | 126 | // but our tests currently rely on it, and we want to run those
|
122 | 127 | // tests in non-asserts builds too.
|
123 |
| -EXPERIMENTAL_FEATURE(MoveOnlyClasses, true, true) |
124 |
| -EXPERIMENTAL_FEATURE(NoImplicitCopy, true, true) |
125 |
| -EXPERIMENTAL_FEATURE(OldOwnershipOperatorSpellings, true, true) |
126 |
| -EXPERIMENTAL_FEATURE(MoveOnlyEnumDeinits, true, true) |
127 |
| -EXPERIMENTAL_FEATURE(MoveOnlyTuples, true, true) |
| 128 | +EXPERIMENTAL_FEATURE(MoveOnlyClasses, true) |
| 129 | +EXPERIMENTAL_FEATURE(NoImplicitCopy, true) |
| 130 | +EXPERIMENTAL_FEATURE(OldOwnershipOperatorSpellings, true) |
| 131 | +EXPERIMENTAL_FEATURE(MoveOnlyEnumDeinits, true) |
| 132 | +EXPERIMENTAL_FEATURE(MoveOnlyTuples, true) |
128 | 133 |
|
129 |
| -EXPERIMENTAL_FEATURE(OneWayClosureParameters, false, true) |
130 |
| -EXPERIMENTAL_FEATURE(TypeWitnessSystemInference, false, true) |
131 |
| -EXPERIMENTAL_FEATURE(LayoutPrespecialization, true, true) |
| 134 | +EXPERIMENTAL_FEATURE(OneWayClosureParameters, false) |
| 135 | +EXPERIMENTAL_FEATURE(TypeWitnessSystemInference, false) |
| 136 | +EXPERIMENTAL_FEATURE(LayoutPrespecialization, true) |
132 | 137 |
|
133 |
| -EXPERIMENTAL_FEATURE(ModuleInterfaceExportAs, true, true) |
134 |
| -EXPERIMENTAL_FEATURE(AccessLevelOnImport, true, true) |
| 138 | +EXPERIMENTAL_FEATURE(ModuleInterfaceExportAs, true) |
| 139 | +EXPERIMENTAL_FEATURE(AccessLevelOnImport, true) |
135 | 140 |
|
136 | 141 | /// Whether to enable experimental layout string value witnesses
|
137 |
| -EXPERIMENTAL_FEATURE(LayoutStringValueWitnesses, true, false) |
138 |
| -EXPERIMENTAL_FEATURE(LayoutStringValueWitnessesInstantiation, true, false) |
| 142 | +EXPERIMENTAL_FEATURE_EXCLUDED_FROM_MODULE_INTERFACE(LayoutStringValueWitnesses, true) |
| 143 | +EXPERIMENTAL_FEATURE_EXCLUDED_FROM_MODULE_INTERFACE(LayoutStringValueWitnessesInstantiation, true) |
139 | 144 |
|
140 | 145 | /// Whether to enable experimental differentiable programming features:
|
141 | 146 | /// `@differentiable` declaration attribute, etc.
|
142 |
| -EXPERIMENTAL_FEATURE(DifferentiableProgramming, false, true) |
| 147 | +EXPERIMENTAL_FEATURE(DifferentiableProgramming, false) |
143 | 148 |
|
144 | 149 | /// Whether to enable forward mode differentiation.
|
145 |
| -EXPERIMENTAL_FEATURE(ForwardModeDifferentiation, false, true) |
| 150 | +EXPERIMENTAL_FEATURE(ForwardModeDifferentiation, false) |
146 | 151 |
|
147 | 152 | /// Whether to enable experimental `AdditiveArithmetic` derived
|
148 | 153 | /// conformances.
|
149 |
| -EXPERIMENTAL_FEATURE(AdditiveArithmeticDerivedConformances, false, true) |
| 154 | +EXPERIMENTAL_FEATURE(AdditiveArithmeticDerivedConformances, false) |
150 | 155 |
|
151 | 156 | /// Whether Objective-C completion handler parameters are imported as
|
152 | 157 | /// @Sendable.
|
153 |
| -EXPERIMENTAL_FEATURE(SendableCompletionHandlers, false, true) |
| 158 | +EXPERIMENTAL_FEATURE(SendableCompletionHandlers, false) |
154 | 159 |
|
155 | 160 | /// Enables opaque type erasure without also enabling implict dynamic
|
156 |
| -EXPERIMENTAL_FEATURE(OpaqueTypeErasure, false, true) |
| 161 | +EXPERIMENTAL_FEATURE(OpaqueTypeErasure, false) |
157 | 162 |
|
158 | 163 | /// Whether to perform round-trip testing of the Swift Swift parser.
|
159 |
| -EXPERIMENTAL_FEATURE(ParserRoundTrip, false, true) |
| 164 | +EXPERIMENTAL_FEATURE(ParserRoundTrip, false) |
160 | 165 |
|
161 | 166 | /// Whether to perform validation of the parse tree produced by the Swift
|
162 | 167 | /// Swift parser.
|
163 |
| -EXPERIMENTAL_FEATURE(ParserValidation, false, true) |
| 168 | +EXPERIMENTAL_FEATURE(ParserValidation, false) |
164 | 169 |
|
165 | 170 | /// Whether to emit diagnostics from the new parser first, and only emit
|
166 | 171 | /// diagnostics from the existing parser when there are none from the new
|
167 | 172 | /// parser.
|
168 |
| -EXPERIMENTAL_FEATURE(ParserDiagnostics, false, true) |
| 173 | +EXPERIMENTAL_FEATURE(ParserDiagnostics, false) |
169 | 174 |
|
170 | 175 | /// Enables implicit some while also enabling existential `any`
|
171 |
| -EXPERIMENTAL_FEATURE(ImplicitSome, false, true) |
| 176 | +EXPERIMENTAL_FEATURE(ImplicitSome, false) |
172 | 177 |
|
173 | 178 | /// Parse using the Swift (swift-syntax) parser and use ASTGen to generate the
|
174 | 179 | /// corresponding syntax tree.
|
175 |
| -EXPERIMENTAL_FEATURE(ParserASTGen, false, true) |
| 180 | +EXPERIMENTAL_FEATURE(ParserASTGen, false) |
176 | 181 |
|
177 | 182 | /// Parse using the Swift (swift-syntax) parser and use ASTGen to generate the
|
178 | 183 | /// corresponding syntax tree.
|
179 |
| -EXPERIMENTAL_FEATURE(BuiltinMacros, false, true) |
| 184 | +EXPERIMENTAL_FEATURE(BuiltinMacros, false) |
180 | 185 |
|
181 | 186 | /// Whether to enable experimental @runtimeMetadata feature which allows to
|
182 | 187 | /// declare an attribute which is discoverable and constructable at runtime.
|
183 |
| -EXPERIMENTAL_FEATURE(RuntimeDiscoverableAttrs, false, true) |
| 188 | +EXPERIMENTAL_FEATURE(RuntimeDiscoverableAttrs, false) |
184 | 189 |
|
185 | 190 | /// Import C++ class templates as semantically-meaningless symbolic
|
186 | 191 | /// Swift types and C++ methods as symbolic functions with blank
|
187 | 192 | /// signatures.
|
188 |
| -EXPERIMENTAL_FEATURE(ImportSymbolicCXXDecls, false, true) |
| 193 | +EXPERIMENTAL_FEATURE(ImportSymbolicCXXDecls, false) |
189 | 194 |
|
190 | 195 | /// Generate bindings for functions that 'throw' in the C++ section of the generated Clang header.
|
191 |
| -EXPERIMENTAL_FEATURE(GenerateBindingsForThrowingFunctionsInCXX, false, true) |
| 196 | +EXPERIMENTAL_FEATURE(GenerateBindingsForThrowingFunctionsInCXX, false) |
192 | 197 |
|
193 | 198 | /// Enable reference bindings.
|
194 |
| -EXPERIMENTAL_FEATURE(ReferenceBindings, false, true) |
| 199 | +EXPERIMENTAL_FEATURE(ReferenceBindings, false) |
195 | 200 |
|
196 | 201 | /// Enable the explicit 'import Builtin' and allow Builtin usage.
|
197 |
| -EXPERIMENTAL_FEATURE(BuiltinModule, true, true) |
| 202 | +EXPERIMENTAL_FEATURE(BuiltinModule, true) |
198 | 203 |
|
| 204 | +#undef EXPERIMENTAL_FEATURE_EXCLUDED_FROM_MODULE_INTERFACE |
199 | 205 | #undef EXPERIMENTAL_FEATURE
|
200 | 206 | #undef UPCOMING_FEATURE
|
201 | 207 | #undef SUPPRESSIBLE_LANGUAGE_FEATURE
|
|
0 commit comments