Skip to content

Conversation

swiftix
Copy link
Contributor

@swiftix swiftix commented Jul 12, 2016

What's in this pull request?

Resolved bug number: (SR-)


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.

If Self type in a protocol conformance is a class which may have derived classes, it is not safe to assume that the metadata is exact for this type.

rdar://27301453

@swiftix
Copy link
Contributor Author

swiftix commented Jul 12, 2016

@swift-ci Please test

@swiftix
Copy link
Contributor Author

swiftix commented Jul 12, 2016

@rjmccall John, do you mind reviewing this small bugfix? It is in your IRGen code for the dominance-based metadata optimizations.

// for argTy, because it may be a metadata for a derived class.
// In all other cases, the metadata is exact.
// TODO: If it can be proved that the class has no subclasses
// (e.g. in WMO mode), then the metadata can be considered exact.
Copy link
Contributor

Choose a reason for hiding this comment

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

I would suggest this comment:

The self metadata here corresponds to the conforming type. For an inheritable conformance, that may be a subclass of the static type, and so the self metadata will be inexact. Currently, all conformances are inheritable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll update the comment.

@rjmccall
Copy link
Contributor

Conceptually LGTM.

The self metadata in the changed method corresponds to the conforming type. For an inheritable conformance, that may be a subclass of the static type, and so the self metadata will be inexact. Currently, all conformances are inheritable.

rdar://27301453
@swiftix
Copy link
Contributor Author

swiftix commented Jul 13, 2016

@rjmccall Thanks for reviewing it!

@swiftix
Copy link
Contributor Author

swiftix commented Jul 13, 2016

@swift-ci Please test and merge.

@swiftix
Copy link
Contributor Author

swiftix commented Jul 13, 2016

@swift-ci Please test and merge

@swift-ci swift-ci merged commit bd20e82 into swiftlang:master Jul 13, 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.

3 participants