Skip to content

[AST] NFC: Reorder inline bitfield for performance #17283

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 17, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions include/swift/AST/Decl.h
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ class alignas(1 << DeclAlignInBits) Decl {
HasValidatedLayout : 1
);

SWIFT_INLINE_BITFIELD_FULL(ProtocolDecl, NominalTypeDecl, 1+1+1+1+1+1+1+2+8+16+1,
SWIFT_INLINE_BITFIELD_FULL(ProtocolDecl, NominalTypeDecl, 1+1+1+1+1+1+1+1+2+8+16,
/// Whether the \c RequiresClass bit is valid.
RequiresClassValid : 1,

Expand All @@ -510,6 +510,9 @@ class alignas(1 << DeclAlignInBits) Decl {
/// because they could not be imported from Objective-C).
HasMissingRequirements : 1,

/// Whether we are currently computing inherited protocols.
ComputingInheritedProtocols : 1,

/// The stage of the circularity check for this protocol.
Circularity : 2,

Expand All @@ -520,10 +523,7 @@ class alignas(1 << DeclAlignInBits) Decl {
KnownProtocol : 8, // '8' for speed. This only needs 6.

/// The number of requirements in the requirement signature.
NumRequirementsInSignature : 16,

/// Whether we are currently computing inherited protocols.
ComputingInheritedProtocols : 1
NumRequirementsInSignature : 16
);

SWIFT_INLINE_BITFIELD(ClassDecl, NominalTypeDecl, 1+2+1+2+1+3+1+1,
Expand Down