-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Use function signatures for SILDeclRefs in witness_tables, vtables and witness_method instructions #4048
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
@swift-ci Please smoke test |
@jckarter Joe, do you mind having a quick look? This is nothing urgent. So, only if you have a couple of spare minutes. |
@swiftix Is this doing the demangled thing? |
@gottesmm No, it adds signatures. So, no cryptic mangled names. |
= D |
@swift-ci Please test |
d925d55
to
7dda6c0
Compare
@swift-ci Please test |
Looks good, thanks @swiftix . |
@swift-ci please test linux |
Linux failure looks genuine. |
@swift-ci Please smoke test Linux |
There seems to be a problem with parsing SILDeclRefs which use a Self type. I filed a rdar://27735857 about it. @jckarter @slavapestov Can one of you have a look at this radar when you have a spare minute? |
This PR is dependent on the #4126. |
@swiftix The DynamicSelf fix is now merged in master. You don't need it for 3.0 branch do you? |
7dda6c0
to
9e27ed6
Compare
@slavapestov No, I don't need to for 3.0. |
@swift-ci Please test |
@swift-ci Please smoke test |
@swift-ci Please test |
@swift-ci Please test Linux |
3 similar comments
@swift-ci Please test Linux |
@swift-ci Please test Linux |
@swift-ci Please test Linux |
@akyrtzi I'm blocked by rdar://27794707 now ;-) If you could fix it, it would be nice. But it is not urgent. So, no hurry. |
…IL printing Worksaround the issue that type objects do not preserve info to print requirements accurately. rdar://27794707
@swiftix rdar://27794707 is fixed |
@swiftix Just saying, it would be awesome if you ever get around to finishing this off :-) |
9e27ed6
to
d503072
Compare
@swift-ci Please smoke test |
1 similar comment
@swift-ci Please smoke test |
FYI - CI is down for upgrade. |
@jckarter Do you mind taking a quick look at it? Does it seem reasonable? |
@jckarter I'd like to merge it today. Any objections? |
@@ -58,7 +58,7 @@ func direct_to_static_method(_ obj: AnyObject) { | |||
// CHECK-NEXT: [[OBJCOPY:%[0-9]+]] = load_borrow [[PBOBJ]] : $*AnyObject | |||
// CHECK-NEXT: [[OBJMETA:%[0-9]+]] = existential_metatype $@thick AnyObject.Type, [[OBJCOPY]] : $AnyObject | |||
// CHECK-NEXT: [[OPENMETA:%[0-9]+]] = open_existential_metatype [[OBJMETA]] : $@thick AnyObject.Type to $@thick (@opened([[UUID:".*"]]) AnyObject).Type | |||
// CHECK-NEXT: [[METHOD:%[0-9]+]] = dynamic_method [volatile] [[OPENMETA]] : $@thick (@opened([[UUID]]) AnyObject).Type, #X.staticF!1.foreign : (X.Type) -> () -> (), $@convention(objc_method) (@thick (@opened([[UUID]]) AnyObject).Type) -> () | |||
// CHECK-NEXT: [[METHOD:%[0-9]+]] = dynamic_method [volatile] [[OPENMETA]] : $@thick (@opened([[UUID]]) AnyObject).Type, #X.staticF!1.foreign : (X.Type) -> () -> () , $@convention(objc_method) (@thick (@opened([[UUID]]) AnyObject).Type) -> () |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra space seems to be printed here
It'd be nice to have a test with a |
@jckarter We definitely need a .sil file test to ensure that the parser can correctly handle this. I would also be fine with round tripping *.swift through sil-opt. |
But a *.sil file is a better solution since it creates a mark in the codebase that this code is tested in an expected way. |
…d witness_method instructions. Textual SIL was sometimes ambiguous when SILDeclRefs were used, because the textual representation of SILDeclRefs was the same for functions that have the same name, but different signatures.
d503072
to
bf2dcbf
Compare
@swift-ci Please smoke test |
1 similar comment
@swift-ci Please smoke test |
What's in this pull request?
Resolved bug number: (SR-)
Before merging this pull request to apple/swift repository:
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
A smoke test on macOS does the following:
device standard libraries are not built.
version of these tests are not run.
A smoke test on Linux does the following:
tests are not run.
Validation Testing
Lint Testing
Note: Only members of the Apple organization can trigger swift-ci.
Textual SIL was sometimes ambiguous when SILDeclRefs were used, because the textual representation of SILDeclRefs was the same for functions that have the same name, but different signatures.
This patch fixes this problem.