Skip to content

[stdlib] Implement partition API change (SE-0120) #3517

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 7 commits into from
Jul 24, 2016

Conversation

natecook1000
Copy link
Member

What's in this pull request?

This implements the partition API changes proposed in SE-0120.

Please don't merge until/unless the proposal is accepted.

Resolved bug number: (SR-1965)


Before merging this pull request to apple/swift repository:

  • Test pull request on Swift continuous integration.

Triggering Swift CI

The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:

Smoke Testing

Platform Comment
All supported platforms @swift-ci Please smoke test
All supported platforms @swift-ci Please smoke test and merge
OS X platform @swift-ci Please smoke test OS X platform
Linux platform @swift-ci Please smoke test Linux platform

Validation Testing

Platform Comment
All supported platforms @swift-ci Please test
All supported platforms @swift-ci Please test and merge
OS X platform @swift-ci Please test OS X platform
OS X platform @swift-ci Please benchmark
Linux platform @swift-ci Please test Linux platform

Lint Testing

Language Comment
Python @swift-ci Please Python lint

Note: Only members of the Apple organization can trigger swift-ci.

@natecook1000 natecook1000 added the swift evolution pending discussion Flag → feature: A feature that has a Swift evolution proposal currently in review label Jul 14, 2016
@@ -907,16 +907,20 @@ func checkPartition_${'Predicate' if predicate else 'WhereElementIsComparable'}(

var c = makeWrappedCollectionWithComparableElement(elements)
% end

let pivotElt = c.first
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra space before =.

@natecook1000 natecook1000 force-pushed the nc-SE-0120 branch 4 times, most recently from a299fdc to c46d57b Compare July 15, 2016 18:52
@natecook1000 natecook1000 added swift evolution approved Flag → feature: A feature that was approved through the Swift evolution process and removed swift evolution pending discussion Flag → feature: A feature that has a Swift evolution proposal currently in review labels Jul 21, 2016
@natecook1000
Copy link
Member Author

@swift-ci Please test

lessImpl: ((Int, Int) -> Bool),
verifyOrder: Bool
) {
let extract = extractValue
Copy link
Contributor

@gribozavr gribozavr Jul 21, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove the extract variable and just use extractValue?

Adds a dispatch test for partition(by:), since it's now a protocol
requirement. Also adds a new logging collection wrapper that only
logs when _withUnsafeMutableBufferPointerIfSupported is called --
any calls to this method from dispatched methods are uncounted by
the standard logging wrappers.
@natecook1000
Copy link
Member Author

@swift-ci Please test

@gribozavr
Copy link
Contributor

@swift-ci Please test OS X platform

public mutating func _withUnsafeMutableBufferPointerIfSupported<R>(
_ body: @noescape (UnsafeMutablePointer<Iterator.Element>, Int) throws -> R
) rethrows -> R? {
print("Log._withUnsafeMutableBufferPointerIfSupported[selfType] += 1")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debugging print?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😳 Removed.

@gribozavr
Copy link
Contributor

@swift-ci Please smoke test and merge

@gribozavr gribozavr merged commit 558f2b8 into swiftlang:master Jul 24, 2016
@natecook1000 natecook1000 deleted the nc-SE-0120 branch October 4, 2018 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
swift evolution approved Flag → feature: A feature that was approved through the Swift evolution process
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants