Skip to content

Update the metadata-initialization ABI #13570

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
Dec 21, 2017

Conversation

rjmccall
Copy link
Contributor

@rjmccall rjmccall commented Dec 21, 2017

Update the metadata-initialization ABI:

  • Create the value witness table as a separate global object instead of concatenating it to the metadata pattern.

  • Always pass the metadata to the runtime and let the runtime handle instantiating or modifying the value witness table.

  • Pass the right layout algorithm version to the runtime; currently this is always "Swift 5".

  • Create a runtime function to instantiate single-case enums.

Among other things, this makes the copying of the VWT, and any modifications of it, explicit and in the runtime, which is more future-proof.

@rjmccall
Copy link
Contributor Author

@swift-ci Please test.

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 1d68218af92436f472bfd1f8a523996a61d4d166

@rjmccall
Copy link
Contributor Author

@swift-ci Please test.

1 similar comment
@rjmccall
Copy link
Contributor Author

@swift-ci Please test.

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 1d68218af92436f472bfd1f8a523996a61d4d166

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 1d68218af92436f472bfd1f8a523996a61d4d166

@rjmccall
Copy link
Contributor Author

Missed the fact that the micro-stdlib provided a stub for initEnumValueWitnessTable.

@rjmccall
Copy link
Contributor Author

@swift-ci Please test.

1 similar comment
@rjmccall
Copy link
Contributor Author

@swift-ci Please test.

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - d0249ce8b4028c6750839efb30ae1aba5409081c

- Create the value witness table as a separate global object instead
  of concatenating it to the metadata pattern.

- Always pass the metadata to the runtime and let the runtime handle
  instantiating or modifying the value witness table.

- Pass the right layout algorithm version to the runtime; currently
  this is always "Swift 5".

- Create a runtime function to instantiate single-case enums.

Among other things, this makes the copying of the VWT, and any
modifications of it, explicit and in the runtime, which is more
future-proof.
@rjmccall
Copy link
Contributor Author

@swift-ci Please smoke test and merge.

1 similar comment
@rjmccall
Copy link
Contributor Author

@swift-ci Please smoke test and merge.

@swift-ci swift-ci merged commit 1e8445f into swiftlang:master Dec 21, 2017
@rjmccall rjmccall deleted the metadata-init-abi branch December 21, 2017 06:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants