Skip to content

Commit f819f2a

Browse files
committed
Remove @frozen attributes
These only existed to work around a miscompile in Swift 5.5. Since we no longer support it, we can remove the workaround
1 parent 5efff30 commit f819f2a

File tree

12 files changed

+0
-39
lines changed

12 files changed

+0
-39
lines changed

CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/KeywordFile.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ let lookupTable = ArrayExprSyntax(leftSquare: .leftSquareBracketToken(trailingTr
2424
let keywordFile = SourceFileSyntax(leadingTrivia: copyrightHeader) {
2525
try! EnumDeclSyntax(
2626
"""
27-
@frozen // FIXME: Not actually stable, works around a miscompile
2827
public enum Keyword: UInt8, Hashable
2928
"""
3029
) {

CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/RawSyntaxNodesFile.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ let rawSyntaxNodesFile = SourceFileSyntax(leadingTrivia: copyrightHeader) {
4848
for (name, choices) in enums {
4949
try EnumDeclSyntax(
5050
"""
51-
@frozen // FIXME: Not actually stable, works around a miscompile
5251
public enum \(raw: name): RawSyntaxNodeProtocol
5352
"""
5453
) {

CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxCollectionsFile.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ let syntaxCollectionsFile = SourceFileSyntax(leadingTrivia: copyrightHeader) {
5454
if let collectionElementChoices = node.collectionElementChoices, !collectionElementChoices.isEmpty {
5555
try EnumDeclSyntax(
5656
"""
57-
@frozen // FIXME: Not actually stable, works around a miscompile
5857
public enum Element: SyntaxChildChoices
5958
"""
6059
) {

CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxEnumFile.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ let syntaxEnumFile = SourceFileSyntax(leadingTrivia: copyrightHeader) {
1919
try! EnumDeclSyntax(
2020
"""
2121
/// Enum to exhaustively switch over all different syntax nodes.
22-
@frozen // FIXME: Not actually stable, works around a miscompile
2322
public enum SyntaxEnum
2423
"""
2524
) {

CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxKindFile.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ let syntaxKindFile = SourceFileSyntax(leadingTrivia: copyrightHeader) {
1919
try! EnumDeclSyntax(
2020
"""
2121
/// Enumerates the known kinds of Syntax represented in the Syntax tree.
22-
@frozen // FIXME: Not actually stable, works around a miscompile
2322
public enum SyntaxKind
2423
"""
2524
) {

CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/TokenKindFile.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ let tokenKindFile = SourceFileSyntax(leadingTrivia: copyrightHeader) {
1919
try! EnumDeclSyntax(
2020
"""
2121
/// Enumerates the kinds of tokens in the Swift language.
22-
@frozen // FIXME: Not actually stable, works around a miscompile
2322
public enum TokenKind: Hashable
2423
"""
2524
) {
@@ -152,7 +151,6 @@ let tokenKindFile = SourceFileSyntax(leadingTrivia: copyrightHeader) {
152151
// because it significantly improves performance when comparing two
153152
// `RawTokenBaseKind` for equality. With the raw value, it compiles down to
154153
// a primitive integer compare, without, it calls into `__derived_enum_equals`.
155-
@frozen // FIXME: Not actually stable, works around a miscompile
156154
@_spi(RawSyntax)
157155
public enum RawTokenKind: UInt8, Equatable, Hashable
158156
"""

Sources/SwiftSyntax/generated/Keyword.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
//
1313
//===----------------------------------------------------------------------===//
1414

15-
@frozen // FIXME: Not actually stable, works around a miscompile
1615
public enum Keyword: UInt8, Hashable {
1716
case __consuming
1817
case __owned

Sources/SwiftSyntax/generated/SyntaxCollections.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,6 @@ extension ArrayElementListSyntax: BidirectionalCollection {
657657
/// as a regular Swift collection, and has accessors that return new
658658
/// versions of the collection with different children.
659659
public struct AttributeListSyntax: SyntaxCollection, SyntaxHashable {
660-
@frozen // FIXME: Not actually stable, works around a miscompile
661660
public enum Element: SyntaxChildChoices {
662661
case `attribute`(AttributeSyntax)
663662
case `ifConfigDecl`(IfConfigDeclSyntax)
@@ -7585,7 +7584,6 @@ extension PatternBindingListSyntax: BidirectionalCollection {
75857584
/// as a regular Swift collection, and has accessors that return new
75867585
/// versions of the collection with different children.
75877586
public struct PrecedenceGroupAttributeListSyntax: SyntaxCollection, SyntaxHashable {
7588-
@frozen // FIXME: Not actually stable, works around a miscompile
75897587
public enum Element: SyntaxChildChoices {
75907588
case `precedenceGroupRelation`(PrecedenceGroupRelationSyntax)
75917589
case `precedenceGroupAssignment`(PrecedenceGroupAssignmentSyntax)
@@ -8264,7 +8262,6 @@ extension PrimaryAssociatedTypeListSyntax: BidirectionalCollection {
82648262

82658263
/// A collection of arguments for the `@_specialize` attribute
82668264
public struct SpecializeAttributeSpecListSyntax: SyntaxCollection, SyntaxHashable {
8267-
@frozen // FIXME: Not actually stable, works around a miscompile
82688265
public enum Element: SyntaxChildChoices {
82698266
case `labeledSpecializeEntry`(LabeledSpecializeEntrySyntax)
82708267
case `availabilityEntry`(AvailabilityEntrySyntax)
@@ -8541,7 +8538,6 @@ extension SpecializeAttributeSpecListSyntax: BidirectionalCollection {
85418538
/// as a regular Swift collection, and has accessors that return new
85428539
/// versions of the collection with different children.
85438540
public struct StringLiteralSegmentsSyntax: SyntaxCollection, SyntaxHashable {
8544-
@frozen // FIXME: Not actually stable, works around a miscompile
85458541
public enum Element: SyntaxChildChoices {
85468542
case `stringSegment`(StringSegmentSyntax)
85478543
case `expressionSegment`(ExpressionSegmentSyntax)
@@ -8793,7 +8789,6 @@ extension StringLiteralSegmentsSyntax: BidirectionalCollection {
87938789
/// as a regular Swift collection, and has accessors that return new
87948790
/// versions of the collection with different children.
87958791
public struct SwitchCaseListSyntax: SyntaxCollection, SyntaxHashable {
8796-
@frozen // FIXME: Not actually stable, works around a miscompile
87978792
public enum Element: SyntaxChildChoices {
87988793
case `switchCase`(SwitchCaseSyntax)
87998794
case `ifConfigDecl`(IfConfigDeclSyntax)

Sources/SwiftSyntax/generated/SyntaxEnum.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
//===----------------------------------------------------------------------===//
1414

1515
/// Enum to exhaustively switch over all different syntax nodes.
16-
@frozen // FIXME: Not actually stable, works around a miscompile
1716
public enum SyntaxEnum {
1817
case token(TokenSyntax)
1918
case accessPathComponent(AccessPathComponentSyntax)

Sources/SwiftSyntax/generated/SyntaxKind.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
//===----------------------------------------------------------------------===//
1414

1515
/// Enumerates the known kinds of Syntax represented in the Syntax tree.
16-
@frozen // FIXME: Not actually stable, works around a miscompile
1716
public enum SyntaxKind {
1817
case token
1918
case accessPathComponent

Sources/SwiftSyntax/generated/TokenKind.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
//===----------------------------------------------------------------------===//
1414

1515
/// Enumerates the kinds of tokens in the Swift language.
16-
@frozen // FIXME: Not actually stable, works around a miscompile
1716
public enum TokenKind: Hashable {
1817
case eof
1918
case arrow
@@ -473,7 +472,6 @@ extension TokenKind: Equatable {
473472
// because it significantly improves performance when comparing two
474473
// `RawTokenBaseKind` for equality. With the raw value, it compiles down to
475474
// a primitive integer compare, without, it calls into `__derived_enum_equals`.
476-
@frozen // FIXME: Not actually stable, works around a miscompile
477475
@_spi(RawSyntax)
478476
public enum RawTokenKind: UInt8, Equatable, Hashable {
479477
case eof

Sources/SwiftSyntax/generated/raw/RawSyntaxNodes.swift

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1329,7 +1329,6 @@ public struct RawAssociatedtypeDeclSyntax: RawDeclSyntaxNodeProtocol {
13291329

13301330
@_spi(RawSyntax)
13311331
public struct RawAttributeListSyntax: RawSyntaxNodeProtocol {
1332-
@frozen // FIXME: Not actually stable, works around a miscompile
13331332
public enum Element: RawSyntaxNodeProtocol {
13341333
case `attribute`(RawAttributeSyntax)
13351334
case `ifConfigDecl`(RawIfConfigDeclSyntax)
@@ -1410,7 +1409,6 @@ public struct RawAttributeListSyntax: RawSyntaxNodeProtocol {
14101409

14111410
@_spi(RawSyntax)
14121411
public struct RawAttributeSyntax: RawSyntaxNodeProtocol {
1413-
@frozen // FIXME: Not actually stable, works around a miscompile
14141412
public enum Argument: RawSyntaxNodeProtocol {
14151413
case `argumentList`(RawTupleExprElementListSyntax)
14161414
case `token`(RawTokenSyntax)
@@ -1755,7 +1753,6 @@ public struct RawAttributedTypeSyntax: RawTypeSyntaxNodeProtocol {
17551753

17561754
@_spi(RawSyntax)
17571755
public struct RawAvailabilityArgumentSyntax: RawSyntaxNodeProtocol {
1758-
@frozen // FIXME: Not actually stable, works around a miscompile
17591756
public enum Entry: RawSyntaxNodeProtocol {
17601757
case `token`(RawTokenSyntax)
17611758
case `availabilityVersionRestriction`(RawAvailabilityVersionRestrictionSyntax)
@@ -2051,7 +2048,6 @@ public struct RawAvailabilityEntrySyntax: RawSyntaxNodeProtocol {
20512048

20522049
@_spi(RawSyntax)
20532050
public struct RawAvailabilityLabeledArgumentSyntax: RawSyntaxNodeProtocol {
2054-
@frozen // FIXME: Not actually stable, works around a miscompile
20552051
public enum Value: RawSyntaxNodeProtocol {
20562052
case `string`(RawStringLiteralExprSyntax)
20572053
case `version`(RawVersionTupleSyntax)
@@ -4228,7 +4224,6 @@ public struct RawClosureParameterSyntax: RawSyntaxNodeProtocol {
42284224

42294225
@_spi(RawSyntax)
42304226
public struct RawClosureSignatureSyntax: RawSyntaxNodeProtocol {
4231-
@frozen // FIXME: Not actually stable, works around a miscompile
42324227
public enum Input: RawSyntaxNodeProtocol {
42334228
case `simpleInput`(RawClosureParamListSyntax)
42344229
case `input`(RawClosureParameterClauseSyntax)
@@ -4427,7 +4422,6 @@ public struct RawCodeBlockItemListSyntax: RawSyntaxNodeProtocol {
44274422

44284423
@_spi(RawSyntax)
44294424
public struct RawCodeBlockItemSyntax: RawSyntaxNodeProtocol {
4430-
@frozen // FIXME: Not actually stable, works around a miscompile
44314425
public enum Item: RawSyntaxNodeProtocol {
44324426
case `decl`(RawDeclSyntax)
44334427
case `stmt`(RawStmtSyntax)
@@ -4845,7 +4839,6 @@ public struct RawConditionElementListSyntax: RawSyntaxNodeProtocol {
48454839

48464840
@_spi(RawSyntax)
48474841
public struct RawConditionElementSyntax: RawSyntaxNodeProtocol {
4848-
@frozen // FIXME: Not actually stable, works around a miscompile
48494842
public enum Condition: RawSyntaxNodeProtocol {
48504843
case `expression`(RawExprSyntax)
48514844
case `availability`(RawAvailabilityConditionSyntax)
@@ -6391,7 +6384,6 @@ public struct RawDictionaryElementSyntax: RawSyntaxNodeProtocol {
63916384

63926385
@_spi(RawSyntax)
63936386
public struct RawDictionaryExprSyntax: RawExprSyntaxNodeProtocol {
6394-
@frozen // FIXME: Not actually stable, works around a miscompile
63956387
public enum Content: RawSyntaxNodeProtocol {
63966388
case `colon`(RawTokenSyntax)
63976389
case `elements`(RawDictionaryElementListSyntax)
@@ -6730,7 +6722,6 @@ public struct RawDifferentiabilityParamSyntax: RawSyntaxNodeProtocol {
67306722

67316723
@_spi(RawSyntax)
67326724
public struct RawDifferentiabilityParamsClauseSyntax: RawSyntaxNodeProtocol {
6733-
@frozen // FIXME: Not actually stable, works around a miscompile
67346725
public enum Parameters: RawSyntaxNodeProtocol {
67356726
case `parameter`(RawDifferentiabilityParamSyntax)
67366727
case `parameterList`(RawDifferentiabilityParamsSyntax)
@@ -7171,7 +7162,6 @@ public struct RawDoStmtSyntax: RawStmtSyntaxNodeProtocol {
71717162

71727163
@_spi(RawSyntax)
71737164
public struct RawDocumentationAttributeArgumentSyntax: RawSyntaxNodeProtocol {
7174-
@frozen // FIXME: Not actually stable, works around a miscompile
71757165
public enum Value: RawSyntaxNodeProtocol {
71767166
case `token`(RawTokenSyntax)
71777167
case `string`(RawStringLiteralExprSyntax)
@@ -10417,7 +10407,6 @@ public struct RawGenericRequirementListSyntax: RawSyntaxNodeProtocol {
1041710407

1041810408
@_spi(RawSyntax)
1041910409
public struct RawGenericRequirementSyntax: RawSyntaxNodeProtocol {
10420-
@frozen // FIXME: Not actually stable, works around a miscompile
1042110410
public enum Body: RawSyntaxNodeProtocol {
1042210411
case `sameTypeRequirement`(RawSameTypeRequirementSyntax)
1042310412
case `conformanceRequirement`(RawConformanceRequirementSyntax)
@@ -10867,7 +10856,6 @@ public struct RawIfConfigClauseListSyntax: RawSyntaxNodeProtocol {
1086710856

1086810857
@_spi(RawSyntax)
1086910858
public struct RawIfConfigClauseSyntax: RawSyntaxNodeProtocol {
10870-
@frozen // FIXME: Not actually stable, works around a miscompile
1087110859
public enum Elements: RawSyntaxNodeProtocol {
1087210860
case `statements`(RawCodeBlockItemListSyntax)
1087310861
case `switchCases`(RawSwitchCaseListSyntax)
@@ -11071,7 +11059,6 @@ public struct RawIfConfigDeclSyntax: RawDeclSyntaxNodeProtocol {
1107111059

1107211060
@_spi(RawSyntax)
1107311061
public struct RawIfExprSyntax: RawExprSyntaxNodeProtocol {
11074-
@frozen // FIXME: Not actually stable, works around a miscompile
1107511062
public enum ElseBody: RawSyntaxNodeProtocol {
1107611063
case `ifExpr`(RawIfExprSyntax)
1107711064
case `codeBlock`(RawCodeBlockSyntax)
@@ -12222,7 +12209,6 @@ public struct RawKeyPathComponentListSyntax: RawSyntaxNodeProtocol {
1222212209

1222312210
@_spi(RawSyntax)
1222412211
public struct RawKeyPathComponentSyntax: RawSyntaxNodeProtocol {
12225-
@frozen // FIXME: Not actually stable, works around a miscompile
1222612212
public enum Component: RawSyntaxNodeProtocol {
1222712213
case `property`(RawKeyPathPropertyComponentSyntax)
1222812214
case `subscript`(RawKeyPathSubscriptComponentSyntax)
@@ -15838,7 +15824,6 @@ public struct RawPatternBindingListSyntax: RawSyntaxNodeProtocol {
1583815824

1583915825
@_spi(RawSyntax)
1584015826
public struct RawPatternBindingSyntax: RawSyntaxNodeProtocol {
15841-
@frozen // FIXME: Not actually stable, works around a miscompile
1584215827
public enum Accessor: RawSyntaxNodeProtocol {
1584315828
case `accessors`(RawAccessorBlockSyntax)
1584415829
case `getter`(RawCodeBlockSyntax)
@@ -16542,7 +16527,6 @@ public struct RawPrecedenceGroupAssociativitySyntax: RawSyntaxNodeProtocol {
1654216527

1654316528
@_spi(RawSyntax)
1654416529
public struct RawPrecedenceGroupAttributeListSyntax: RawSyntaxNodeProtocol {
16545-
@frozen // FIXME: Not actually stable, works around a miscompile
1654616530
public enum Element: RawSyntaxNodeProtocol {
1654716531
case `precedenceGroupRelation`(RawPrecedenceGroupRelationSyntax)
1654816532
case `precedenceGroupAssignment`(RawPrecedenceGroupAssignmentSyntax)
@@ -18090,7 +18074,6 @@ public struct RawSourceFileSyntax: RawSyntaxNodeProtocol {
1809018074

1809118075
@_spi(RawSyntax)
1809218076
public struct RawSpecializeAttributeSpecListSyntax: RawSyntaxNodeProtocol {
18093-
@frozen // FIXME: Not actually stable, works around a miscompile
1809418077
public enum Element: RawSyntaxNodeProtocol {
1809518078
case `labeledSpecializeEntry`(RawLabeledSpecializeEntrySyntax)
1809618079
case `availabilityEntry`(RawAvailabilityEntrySyntax)
@@ -18400,7 +18383,6 @@ public struct RawStringLiteralExprSyntax: RawExprSyntaxNodeProtocol {
1840018383

1840118384
@_spi(RawSyntax)
1840218385
public struct RawStringLiteralSegmentsSyntax: RawSyntaxNodeProtocol {
18403-
@frozen // FIXME: Not actually stable, works around a miscompile
1840418386
public enum Element: RawSyntaxNodeProtocol {
1840518387
case `stringSegment`(RawStringSegmentSyntax)
1840618388
case `expressionSegment`(RawExpressionSegmentSyntax)
@@ -18681,7 +18663,6 @@ public struct RawStructDeclSyntax: RawDeclSyntaxNodeProtocol {
1868118663

1868218664
@_spi(RawSyntax)
1868318665
public struct RawSubscriptDeclSyntax: RawDeclSyntaxNodeProtocol {
18684-
@frozen // FIXME: Not actually stable, works around a miscompile
1868518666
public enum Accessor: RawSyntaxNodeProtocol {
1868618667
case `accessors`(RawAccessorBlockSyntax)
1868718668
case `getter`(RawCodeBlockSyntax)
@@ -19182,7 +19163,6 @@ public struct RawSwitchCaseLabelSyntax: RawSyntaxNodeProtocol {
1918219163

1918319164
@_spi(RawSyntax)
1918419165
public struct RawSwitchCaseListSyntax: RawSyntaxNodeProtocol {
19185-
@frozen // FIXME: Not actually stable, works around a miscompile
1918619166
public enum Element: RawSyntaxNodeProtocol {
1918719167
case `switchCase`(RawSwitchCaseSyntax)
1918819168
case `ifConfigDecl`(RawIfConfigDeclSyntax)
@@ -19263,7 +19243,6 @@ public struct RawSwitchCaseListSyntax: RawSyntaxNodeProtocol {
1926319243

1926419244
@_spi(RawSyntax)
1926519245
public struct RawSwitchCaseSyntax: RawSyntaxNodeProtocol {
19266-
@frozen // FIXME: Not actually stable, works around a miscompile
1926719246
public enum Label: RawSyntaxNodeProtocol {
1926819247
case `default`(RawSwitchDefaultLabelSyntax)
1926919248
case `case`(RawSwitchCaseLabelSyntax)
@@ -22313,7 +22292,6 @@ public struct RawYieldListSyntax: RawSyntaxNodeProtocol {
2231322292

2231422293
@_spi(RawSyntax)
2231522294
public struct RawYieldStmtSyntax: RawStmtSyntaxNodeProtocol {
22316-
@frozen // FIXME: Not actually stable, works around a miscompile
2231722295
public enum Yields: RawSyntaxNodeProtocol {
2231822296
case `yieldList`(RawYieldListSyntax)
2231922297
case `simpleYield`(RawExprSyntax)

0 commit comments

Comments
 (0)