@@ -92,7 +92,7 @@ enum class MetadataKind : uint32_t {
92
92
#define ABSTRACTMETADATAKIND (name, start, end ) \
93
93
name##_Start = start, name##_End = end,
94
94
#include " MetadataKind.def"
95
-
95
+
96
96
// / The largest possible non-isa-pointer metadata kind value.
97
97
// /
98
98
// / This is included in the enumeration to prevent against attempts to
@@ -473,7 +473,7 @@ class ProtocolDescriptorFlags {
473
473
};
474
474
475
475
int_type Data;
476
-
476
+
477
477
constexpr ProtocolDescriptorFlags (int_type Data) : Data(Data) {}
478
478
public:
479
479
constexpr ProtocolDescriptorFlags () : Data(0 ) {}
@@ -498,32 +498,32 @@ class ProtocolDescriptorFlags {
498
498
constexpr ProtocolDescriptorFlags withResilient (bool s) const {
499
499
return ProtocolDescriptorFlags ((Data & ~IsResilient) | (s ? IsResilient : 0 ));
500
500
}
501
-
501
+
502
502
// / Was the protocol defined in Swift 1 or 2?
503
503
bool isSwift () const { return Data & IsSwift; }
504
504
505
505
// / Is the protocol class-constrained?
506
506
ProtocolClassConstraint getClassConstraint () const {
507
507
return ProtocolClassConstraint (bool (Data & ClassConstraint));
508
508
}
509
-
509
+
510
510
// / What dispatch strategy does this protocol use?
511
511
ProtocolDispatchStrategy getDispatchStrategy () const {
512
512
return ProtocolDispatchStrategy ((Data & DispatchStrategyMask)
513
513
>> DispatchStrategyShift);
514
514
}
515
-
515
+
516
516
// / Does the protocol require a witness table for method dispatch?
517
517
bool needsWitnessTable () const {
518
518
return swift::protocolRequiresWitnessTable (getDispatchStrategy ());
519
519
}
520
-
520
+
521
521
// / Return the identifier if this is a special runtime-known protocol.
522
522
SpecialProtocol getSpecialProtocol () const {
523
523
return SpecialProtocol (uint8_t ((Data & SpecialProtocolMask)
524
524
>> SpecialProtocolShift));
525
525
}
526
-
526
+
527
527
// / Can new requirements with default witnesses be added resiliently?
528
528
bool isResilient () const { return Data & IsResilient; }
529
529
@@ -784,11 +784,11 @@ class ExistentialTypeFlags {
784
784
return ExistentialTypeFlags ((Data & ~SpecialProtocolMask)
785
785
| (int_type (sp) << SpecialProtocolShift));
786
786
}
787
-
787
+
788
788
unsigned getNumWitnessTables () const {
789
789
return Data & NumWitnessTablesMask;
790
790
}
791
-
791
+
792
792
ProtocolClassConstraint getClassConstraint () const {
793
793
return ProtocolClassConstraint (bool (Data & ClassConstraintMask));
794
794
}
@@ -803,7 +803,7 @@ class ExistentialTypeFlags {
803
803
return SpecialProtocol (uint8_t ((Data & SpecialProtocolMask)
804
804
>> SpecialProtocolShift));
805
805
}
806
-
806
+
807
807
int_type getIntValue () const {
808
808
return Data;
809
809
}
@@ -998,7 +998,7 @@ class TargetFunctionTypeFlags {
998
998
// NOTE: The next bit will need to introduce a separate flags word.
999
999
};
1000
1000
int_type Data;
1001
-
1001
+
1002
1002
constexpr TargetFunctionTypeFlags (int_type Data) : Data(Data) {}
1003
1003
public:
1004
1004
constexpr TargetFunctionTypeFlags () : Data(0 ) {}
@@ -1007,7 +1007,7 @@ class TargetFunctionTypeFlags {
1007
1007
withNumParameters (unsigned numParams) const {
1008
1008
return TargetFunctionTypeFlags ((Data & ~NumParametersMask) | numParams);
1009
1009
}
1010
-
1010
+
1011
1011
constexpr TargetFunctionTypeFlags<int_type>
1012
1012
withConvention (FunctionMetadataConvention c) const {
1013
1013
return TargetFunctionTypeFlags ((Data & ~ConventionMask)
@@ -1088,11 +1088,11 @@ class TargetFunctionTypeFlags {
1088
1088
int_type getIntValue () const {
1089
1089
return Data;
1090
1090
}
1091
-
1091
+
1092
1092
static TargetFunctionTypeFlags<int_type> fromIntValue (int_type Data) {
1093
1093
return TargetFunctionTypeFlags (Data);
1094
1094
}
1095
-
1095
+
1096
1096
bool operator ==(TargetFunctionTypeFlags<int_type> other) const {
1097
1097
return Data == other.Data ;
1098
1098
}
@@ -1458,32 +1458,32 @@ constexpr unsigned WitnessTableFirstRequirementOffset = 1;
1458
1458
enum class ContextDescriptorKind : uint8_t {
1459
1459
// / This context descriptor represents a module.
1460
1460
Module = 0 ,
1461
-
1461
+
1462
1462
// / This context descriptor represents an extension.
1463
1463
Extension = 1 ,
1464
-
1464
+
1465
1465
// / This context descriptor represents an anonymous possibly-generic context
1466
1466
// / such as a function body.
1467
1467
Anonymous = 2 ,
1468
1468
1469
1469
// / This context descriptor represents a protocol context.
1470
1470
Protocol = 3 ,
1471
-
1471
+
1472
1472
// / This context descriptor represents an opaque type alias.
1473
1473
OpaqueType = 4 ,
1474
1474
1475
1475
// / First kind that represents a type of any sort.
1476
1476
Type_First = 16 ,
1477
-
1477
+
1478
1478
// / This context descriptor represents a class.
1479
1479
Class = Type_First,
1480
-
1480
+
1481
1481
// / This context descriptor represents a struct.
1482
1482
Struct = Type_First + 1 ,
1483
-
1483
+
1484
1484
// / This context descriptor represents an enum.
1485
1485
Enum = Type_First + 2 ,
1486
-
1486
+
1487
1487
// / Last kind that represents a type of any sort.
1488
1488
Type_Last = 31 ,
1489
1489
};
@@ -1514,34 +1514,34 @@ struct ContextDescriptorFlags {
1514
1514
constexpr ContextDescriptorKind getKind () const {
1515
1515
return ContextDescriptorKind (Value & 0x1Fu );
1516
1516
}
1517
-
1517
+
1518
1518
// / Whether the context being described is generic.
1519
1519
constexpr bool isGeneric () const {
1520
1520
return (Value & 0x80u ) != 0 ;
1521
1521
}
1522
-
1522
+
1523
1523
// / Whether this is a unique record describing the referenced context.
1524
1524
constexpr bool isUnique () const {
1525
1525
return (Value & 0x40u ) != 0 ;
1526
1526
}
1527
-
1527
+
1528
1528
// / The format version of the descriptor. Higher version numbers may have
1529
1529
// / additional fields that aren't present in older versions.
1530
1530
constexpr uint8_t getVersion () const {
1531
1531
return (Value >> 8u ) & 0xFFu ;
1532
1532
}
1533
-
1533
+
1534
1534
// / The most significant two bytes of the flags word, which can have
1535
1535
// / kind-specific meaning.
1536
1536
constexpr uint16_t getKindSpecificFlags () const {
1537
1537
return (Value >> 16u ) & 0xFFFFu ;
1538
1538
}
1539
-
1539
+
1540
1540
constexpr ContextDescriptorFlags withKind (ContextDescriptorKind kind) const {
1541
1541
return assert ((uint8_t (kind) & 0x1F ) == uint8_t (kind)),
1542
1542
ContextDescriptorFlags ((Value & 0xFFFFFFE0u ) | uint8_t (kind));
1543
1543
}
1544
-
1544
+
1545
1545
constexpr ContextDescriptorFlags withGeneric (bool isGeneric) const {
1546
1546
return ContextDescriptorFlags ((Value & 0xFFFFFF7Fu )
1547
1547
| (isGeneric ? 0x80u : 0 ));
@@ -1560,7 +1560,7 @@ struct ContextDescriptorFlags {
1560
1560
withKindSpecificFlags (uint16_t flags) const {
1561
1561
return ContextDescriptorFlags ((Value & 0xFFFFu ) | (flags << 16u ));
1562
1562
}
1563
-
1563
+
1564
1564
constexpr uint32_t getIntValue () const {
1565
1565
return Value;
1566
1566
}
@@ -1591,7 +1591,7 @@ class TypeContextDescriptorFlags : public FlagSet<uint16_t> {
1591
1591
// / Meaningful for all type-descriptor kinds.
1592
1592
HasImportInfo = 2 ,
1593
1593
1594
- // / Set if the type descriptor has a pointer to a list of canonical
1594
+ // / Set if the type descriptor has a pointer to a list of canonical
1595
1595
// / prespecializations.
1596
1596
HasCanonicalMetadataPrespecializations = 3 ,
1597
1597
@@ -1780,13 +1780,13 @@ class AnonymousContextDescriptorFlags : public FlagSet<uint16_t> {
1780
1780
enum class GenericParamKind : uint8_t {
1781
1781
// / A type parameter.
1782
1782
Type = 0 ,
1783
-
1783
+
1784
1784
Max = 0x3F ,
1785
1785
};
1786
1786
1787
1787
class GenericParamDescriptor {
1788
1788
uint8_t Value;
1789
-
1789
+
1790
1790
explicit constexpr GenericParamDescriptor (uint8_t Value)
1791
1791
: Value(Value) {}
1792
1792
public:
@@ -1798,7 +1798,7 @@ class GenericParamDescriptor {
1798
1798
.withKeyArgument(hasKeyArgument)
1799
1799
.withExtraArgument(hasExtraArgument))
1800
1800
{}
1801
-
1801
+
1802
1802
constexpr bool hasKeyArgument () const {
1803
1803
return (Value & 0x80u ) != 0 ;
1804
1804
}
@@ -1810,24 +1810,24 @@ class GenericParamDescriptor {
1810
1810
constexpr GenericParamKind getKind () const {
1811
1811
return GenericParamKind (Value & 0x3Fu );
1812
1812
}
1813
-
1813
+
1814
1814
constexpr GenericParamDescriptor
1815
1815
withKeyArgument (bool hasKeyArgument) const {
1816
1816
return GenericParamDescriptor ((Value & 0x7Fu )
1817
1817
| (hasKeyArgument ? 0x80u : 0 ));
1818
1818
}
1819
-
1819
+
1820
1820
constexpr GenericParamDescriptor
1821
1821
withExtraArgument (bool hasExtraArgument) const {
1822
1822
return GenericParamDescriptor ((Value & 0xBFu )
1823
1823
| (hasExtraArgument ? 0x40u : 0 ));
1824
1824
}
1825
-
1825
+
1826
1826
constexpr GenericParamDescriptor withKind (GenericParamKind kind) const {
1827
1827
return assert ((uint8_t (kind) & 0x3Fu ) == uint8_t (kind)),
1828
1828
GenericParamDescriptor ((Value & 0xC0u ) | uint8_t (kind));
1829
1829
}
1830
-
1830
+
1831
1831
constexpr uint8_t getIntValue () const {
1832
1832
return Value;
1833
1833
}
@@ -1881,7 +1881,7 @@ enum class GenericRequirementKind : uint8_t {
1881
1881
1882
1882
class GenericRequirementFlags {
1883
1883
uint32_t Value;
1884
-
1884
+
1885
1885
explicit constexpr GenericRequirementFlags (uint32_t Value)
1886
1886
: Value(Value) {}
1887
1887
public:
@@ -1893,7 +1893,7 @@ class GenericRequirementFlags {
1893
1893
.withKeyArgument(hasKeyArgument)
1894
1894
.withExtraArgument(hasExtraArgument))
1895
1895
{}
1896
-
1896
+
1897
1897
constexpr bool hasKeyArgument () const {
1898
1898
return (Value & 0x80u ) != 0 ;
1899
1899
}
@@ -1905,25 +1905,25 @@ class GenericRequirementFlags {
1905
1905
constexpr GenericRequirementKind getKind () const {
1906
1906
return GenericRequirementKind (Value & 0x1Fu );
1907
1907
}
1908
-
1908
+
1909
1909
constexpr GenericRequirementFlags
1910
1910
withKeyArgument (bool hasKeyArgument) const {
1911
1911
return GenericRequirementFlags ((Value & 0x7Fu )
1912
1912
| (hasKeyArgument ? 0x80u : 0 ));
1913
1913
}
1914
-
1914
+
1915
1915
constexpr GenericRequirementFlags
1916
1916
withExtraArgument (bool hasExtraArgument) const {
1917
1917
return GenericRequirementFlags ((Value & 0xBFu )
1918
1918
| (hasExtraArgument ? 0x40u : 0 ));
1919
1919
}
1920
-
1920
+
1921
1921
constexpr GenericRequirementFlags
1922
1922
withKind (GenericRequirementKind kind) const {
1923
1923
return assert ((uint8_t (kind) & 0x1Fu ) == uint8_t (kind)),
1924
1924
GenericRequirementFlags ((Value & 0xE0u ) | uint8_t (kind));
1925
1925
}
1926
-
1926
+
1927
1927
constexpr uint32_t getIntValue () const {
1928
1928
return Value;
1929
1929
}
@@ -2343,8 +2343,9 @@ class JobFlags : public FlagSet<uint32_t> {
2343
2343
2344
2344
// / Kinds of task status record.
2345
2345
enum class TaskStatusRecordKind : uint8_t {
2346
- // / A DeadlineStatusRecord, which represents an active deadline.
2347
- Deadline = 0 ,
2346
+ // / A TaskDependencyStatusRecord which tracks what the current task is
2347
+ // / dependent on.
2348
+ TaskDependency = 0 ,
2348
2349
2349
2350
// / A ChildTaskStatusRecord, which represents the potential for
2350
2351
// / active child tasks.
0 commit comments