Skip to content
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

shim: monomorphic FnPtrShims during construction #75346

Merged

Conversation

davidtwco
Copy link
Member

Fixes #69925.

This PR adjusts MIR shim construction so that substitutions are applied to function pointer shims during construction, rather than during codegen (as determined by substs_for_mir_body).

r? @eddyb

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 9, 2020
@eddyb
Copy link
Member

eddyb commented Aug 9, 2020

We've made this work (I hope), but given my involvement I'd like someone else to take a look as well.
We could also use a test where polymorphization breaks today without this change.

r? @nikomatsakis

@rust-highfive rust-highfive assigned nikomatsakis and unassigned eddyb Aug 9, 2020
@crlf0710 crlf0710 added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 28, 2020
@bors

This comment has been minimized.

@davidtwco davidtwco force-pushed the issue-69925-polymorphic-instancedef-fnptrshim branch from 25c0b8f to 7ac4185 Compare August 30, 2020 18:12
@bors

This comment has been minimized.

This commit adjusts MIR shim construction so that substitutions are
applied to function pointer shims during construction, rather than
during codegen (as determined by `substs_for_mir_body`) - as
substitutions will no longer occur during codegen, function pointer
shims can now be polymorphic without incurring double substitutions.

Signed-off-by: David Wood <david@davidtw.co>
@davidtwco davidtwco force-pushed the issue-69925-polymorphic-instancedef-fnptrshim branch from 7ac4185 to f8376b5 Compare September 4, 2020 12:40
@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Sep 18, 2020

📌 Commit f8376b5 has been approved by nikomatsakis

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 18, 2020
@nikomatsakis
Copy link
Contributor

nikomatsakis commented Sep 18, 2020

Apologies for being super slow ❤️

Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Sep 19, 2020
…nstancedef-fnptrshim, r=nikomatsakis

shim: monomorphic `FnPtrShim`s during construction

Fixes rust-lang#69925.

This PR adjusts MIR shim construction so that substitutions are applied to function pointer shims during construction, rather than during codegen (as determined by `substs_for_mir_body`).

r? @eddyb
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Sep 19, 2020
…nstancedef-fnptrshim, r=nikomatsakis

shim: monomorphic `FnPtrShim`s during construction

Fixes rust-lang#69925.

This PR adjusts MIR shim construction so that substitutions are applied to function pointer shims during construction, rather than during codegen (as determined by `substs_for_mir_body`).

r? @eddyb
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Sep 19, 2020
…nstancedef-fnptrshim, r=nikomatsakis

shim: monomorphic `FnPtrShim`s during construction

Fixes rust-lang#69925.

This PR adjusts MIR shim construction so that substitutions are applied to function pointer shims during construction, rather than during codegen (as determined by `substs_for_mir_body`).

r? @eddyb
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Sep 20, 2020
…nstancedef-fnptrshim, r=nikomatsakis

shim: monomorphic `FnPtrShim`s during construction

Fixes rust-lang#69925.

This PR adjusts MIR shim construction so that substitutions are applied to function pointer shims during construction, rather than during codegen (as determined by `substs_for_mir_body`).

r? @eddyb
@bors
Copy link
Contributor

bors commented Sep 20, 2020

⌛ Testing commit f8376b5 with merge a3bc0e7...

@bors
Copy link
Contributor

bors commented Sep 20, 2020

☀️ Test successful - checks-actions, checks-azure
Approved by: nikomatsakis
Pushing a3bc0e7 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 20, 2020
@bors bors merged commit a3bc0e7 into rust-lang:master Sep 20, 2020
@rustbot rustbot added this to the 1.48.0 milestone Sep 20, 2020
@davidtwco davidtwco deleted the issue-69925-polymorphic-instancedef-fnptrshim branch September 21, 2020 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support polymorphic InstanceDef's by avoiding double substitution.
7 participants