Skip to content

[Runtime] 4.2 - Change protocol conformance scanning to use a concurrent array rather than a locked vector. #16799

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

Conversation

mikeash
Copy link
Contributor

@mikeash mikeash commented May 23, 2018

This cherry-picks #16254 and #16794 (which fixes #16254) into 4.2.

This eliminates the "gross" unlock/lock dance around getWitnessTable.

rdar://problem/37173156 and rdar://problem/40484362

mikeash added 6 commits May 23, 2018 14:46
…ray rather than a locked vector.

rdar://problem/37173156
…k for malloc failure. Use placement new when appending values.

rdar://problem/37173156
…rentReadableArray. Remove a redundant load of Count. Fix memory ordering on ReaderCount.

rdar://problem/37173156
…s into Storage. Mark ConcurrentReadableArray as un-copyable, un-assignable, and un-movable. Use SWIFT_MEMORY_ORDER_CONSUME instead of std::memory_order_consume. Make read() pass a const pointer.

rdar://problem/37173156
…apshots rather than using a callback-based read call.

rdar://problem/40230581
…ouble-free items. Also implement a destructor so it can be used for non-globals.

rdar://problem/40484362
@mikeash
Copy link
Contributor Author

mikeash commented May 23, 2018

@swift-ci please test

@mikeash mikeash merged commit 0f96ab7 into swiftlang:swift-4.2-branch May 24, 2018
@jrose-apple
Copy link
Contributor

Looks like you broke Linux builds with this (something not including std::vector, at the very least). Not sure how the tests would have passed—maybe a 16.04 vs. 16.10 difference?

@mikeash
Copy link
Contributor Author

mikeash commented May 24, 2018

Yeah, I don't get it either. #16814 fixes it.

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