Skip to content

[stdlib] Add @noescape to output parameter of UnicodeCodecType.encode #1569

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
Mar 8, 2016

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Mar 8, 2016

What's in this pull request?

swift-evolution thread: http://thread.gmane.org/gmane.comp.lang.swift.evolution/8867

Add @noescape to output parameter of UnicodeCodecType.encode and related functions.

Conformance:

  • UTF8.encode
  • UTF16.encode
  • UTF32.encode

Related functions:

  • transcode
  • String._encode
  • _StringCore.encode

Before merging this pull request to apple/swift repository:

  • Test pull request on Swift continuous integration.

Conformance:
 - UTF8.encode
 - UTF16.encode
 - UTF32.encode

Related functions:
 - transcode
 - String._encode
 - _StringCore.encode
@gribozavr
Copy link
Contributor

@rintaro Thank you!

Also, add @NoEscape to local closures passed to these functions

Why? This shouldn't be needed. Is the compiler complaining? If not, could you remove these changes from the PR?

@rintaro
Copy link
Member Author

rintaro commented Mar 8, 2016

Why? This shouldn't be needed. Is the compiler complaining? If not, could you remove these changes from the PR?

Because I was not sure
let fn: () -> Void = { ... }; doIt(/* @noescape */fn)
would be optimized for @noescape or not.

And OK, I removed it.

@gribozavr
Copy link
Contributor

@swift-ci Please test

gribozavr added a commit that referenced this pull request Mar 8, 2016
[stdlib] Add @NoEscape to output parameter of UnicodeCodecType.encode
@gribozavr gribozavr merged commit bc823e0 into swiftlang:master Mar 8, 2016
@rintaro rintaro deleted the noescape-encode branch March 9, 2016 00:40
@jrose-apple
Copy link
Contributor

Sorry, I had to revert this because of a compiler bug. See SR-901.

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.

3 participants