Skip to content

shim: monomorphic FnPtrShims during construction - #75346

Merged
bors merged 1 commit into
rust-lang:masterfrom
davidtwco:issue-69925-polymorphic-instancedef-fnptrshim
Sep 20, 2020
Merged

shim: monomorphic FnPtrShims during construction#75346
bors merged 1 commit into
rust-lang:masterfrom
davidtwco:issue-69925-polymorphic-instancedef-fnptrshim

Conversation

@davidtwco

Copy link
Copy Markdown
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-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 9, 2020
@eddyb

eddyb commented Aug 9, 2020

Copy link
Copy Markdown
Contributor

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

@crlf0710crlf0710 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
davidtwcoforce-pushed the issue-69925-polymorphic-instancedef-fnptrshim branch from 25c0b8f to 7ac4185CompareAugust 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
davidtwcoforce-pushed the issue-69925-polymorphic-instancedef-fnptrshim branch from 7ac4185 to f8376b5CompareSeptember 4, 2020 12:40
@nikomatsakis

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Sep 18, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit f8376b5 has been approved by nikomatsakis

@borsbors 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

nikomatsakis commented Sep 18, 2020

Copy link
Copy Markdown
Contributor

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
Fixesrust-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
Fixesrust-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
Fixesrust-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
Fixesrust-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

bors commented Sep 20, 2020

Copy link
Copy Markdown
Collaborator

⌛ Testing commit f8376b5 with merge a3bc0e7...

@bors

bors commented Sep 20, 2020

Copy link
Copy Markdown
Collaborator

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

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Sep 20, 2020
@bors
bors merged commit a3bc0e7 into rust-lang:masterSep 20, 2020
@rustbotrustbot 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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-borsThis PR was explicitly merged by bors.S-waiting-on-borsStatus: 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

@davidtwco@eddyb@bors@nikomatsakis@crlf0710@rust-highfive@rustbot