Skip to content
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

[SR-260] Add availability information to @_fixed_layout attribute #42882

Open
slavapestov opened this issue Dec 17, 2015 · 1 comment
Open

[SR-260] Add availability information to @_fixed_layout attribute #42882

slavapestov opened this issue Dec 17, 2015 · 1 comment
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@slavapestov
Copy link
Member

Previous ID SR-260
Radar rdar://24057817
Original Reporter @slavapestov
Type Bug
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee @slavapestov
Priority Medium

md5: 7386fdccb598437a78d65b775869aec2

blocks:

  • SR-257 Resilient value type support -- umbrella bug

is blocked by:

  • SR-269 Implement ResilienceDomain abstraction

is duplicated by:

  • SR-3911 Evaluate ABI impact of going from opaque layouts to freezing the layout for performance

Issue Description:

We wish to express that a type was formerly resilient, but became fixed layout. This requires adding an optional availability annotation to @_fixed_layout and plumbing it through to serialization.

The new attribute has the following semantic consequences:

  • At the SIL level, types are still passed and returned indirectly if they were ever resilient – this ensures that changing the deployment version does not change the SIL type lowering of function types, since doing that would require generating multiple entry points for functions that reference conditinally-fixed-layout value types
  • IRGen however can make assumptions about fixed layout types if the deployment target is at least that of the type

The isResilient() check in NominalTypeDecl will be extended to take a deployment target version too. SIL will not use this, but IRGen will.

@slavapestov
Copy link
Member Author

rdar://24057817

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself
Projects
None yet
Development

No branches or pull requests

1 participant