Skip to content

SILGen: Fix function conversions involving DynamicSelfType #23985

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 4 commits into from
Apr 15, 2019

Conversation

slavapestov
Copy link
Contributor

This was already implemented but the check looked at the lowered
types and not the AST types, and DynamicSelfType is erased at the
top level of a lowered type.

Fixes https://bugs.swift.org/browse/SR-10309, rdar://problem/49703441.

@slavapestov slavapestov force-pushed the dynamic-self-thunks branch from df34244 to 58eaebd Compare April 14, 2019 06:01
Also, NodePrinter was printing the 'from' and 'to' type backwards,
so fix that.
This was partially implemented but the check looked at the lowered
types and not the AST types, and DynamicSelfType is erased at the
top level of a lowered type.

Also use the new mangling for reabstraction thunks with self, to
ensure we don't emit the same symbol with two different lowered
types.

Fixes <https://bugs.swift.org/browse/SR-10309>, <rdar://problem/49703441>.
…turing DynamicSelfType

If a thunk's type involves DynamicSelfType, a second value must be captured
of metatype type.
We can reuse the same logic that we have for reabstraction thunks here.
@slavapestov slavapestov force-pushed the dynamic-self-thunks branch from 58eaebd to 099bd8e Compare April 15, 2019 00:14
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

@slavapestov
Copy link
Contributor Author

@shahmishal Known problem?

20:16:54 sccache --stop-server 2> /dev/null || true
20:16:54 + sccache --stop-server
20:16:54 Stopping sccache server...
20:16:54 + true
20:16:54 export SCCACHE_IDLE_TIMEOUT=0
20:16:54 + export SCCACHE_IDLE_TIMEOUT=0
20:16:54 + SCCACHE_IDLE_TIMEOUT=0
20:16:54 sccache --start-server
20:16:54 + sccache --start-server
20:16:54 Starting sccache server...
20:16:59 error: Timed out waiting for server startup
20:17:00 Build step 'Execute shell' marked build as failure

@slavapestov
Copy link
Contributor Author

@swift-ci Please clean test macOS

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - df3424445fb2e146ed0794fa0383effc2b089264

@shahmishal
Copy link
Member

@shahmishal Known problem?

20:16:54 sccache --stop-server 2> /dev/null || true
20:16:54 + sccache --stop-server
20:16:54 Stopping sccache server...
20:16:54 + true
20:16:54 export SCCACHE_IDLE_TIMEOUT=0
20:16:54 + export SCCACHE_IDLE_TIMEOUT=0
20:16:54 + SCCACHE_IDLE_TIMEOUT=0
20:16:54 sccache --start-server
20:16:54 + sccache --start-server
20:16:54 Starting sccache server...
20:16:59 error: Timed out waiting for server startup
20:17:00 Build step 'Execute shell' marked build as failure

Yes, I will add a fix for this soon.

@shahmishal
Copy link
Member

@swift-ci Please clean test macOS

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 099bd8e

@shahmishal
Copy link
Member

@swift-ci Please clean test macOS

@slavapestov slavapestov merged commit 189a38d into swiftlang:master Apr 15, 2019
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