Skip to content

[let-properties-opt] Fix a correctness issue #1982

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
Apr 1, 2016

Conversation

swiftix
Copy link
Contributor

@swiftix swiftix commented Mar 31, 2016

What's in this pull request?

Pull in a swift-2.2 fix for a correctness issue reported in rdar://25303106

Resolved bug number: (SR-1026)


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
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
OS X platform @swift-ci Please test OS X platform
Linux platform @swift-ci Please test Linux platform

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

Re-factor and simplify the code. Improve correctness.
The code is now simpler and handles more cases. More tests were added.

The overall idea of this rewrite is that the pass basically tries to check if it can
see all possible writes (i.e. initializations) into a given let property. Only if it can
be proven that the pass sees all possible writes and all those initializations are
producing the same constant, statically known value, the pass propagates
this constant value into uses of a property.

SR-1026 and rdar://25303106

@swiftix
Copy link
Contributor Author

swiftix commented Mar 31, 2016

@swift-ci Please test

@swiftix
Copy link
Contributor Author

swiftix commented Mar 31, 2016

@swift-ci Please test

Re-factor and simplify the code. Improve correctness.
The code is now simpler and handles more cases. More tests were added.

The overall idea of this rewrite is that the pass basically tries to check if it can
see all possible writes (i.e. initializations) into a given let property. Only if it can
be proven that the pass sees all possible writes and all those initializations are
producing the same constant, statically known value, the pass propagates
this constant value into uses of a property.

SR-1026 and rdar://25303106
@tkremenek
Copy link
Member

@swift-ci test

@tkremenek tkremenek added this to the Swift 2.2.x milestone Mar 31, 2016
@tkremenek tkremenek merged commit 76cc817 into swiftlang:swift-2.2-branch Apr 1, 2016
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