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

rustc_metadata: Add struct and variant constructors to module children at encoding time #103524

Merged
merged 1 commit into from
Oct 28, 2022

Conversation

petrochenkov
Copy link
Contributor

instead of decoding time.

Continuation of #95899.
The last time it caused some ICEs from generator use, but not everything seems ok.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Oct 25, 2022
@rust-highfive
Copy link
Collaborator

r? @estebank

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 25, 2022
@petrochenkov
Copy link
Contributor Author

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@rustbot label: S-waiting-on-perf

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 25, 2022
@bors
Copy link
Contributor

bors commented Oct 25, 2022

⌛ Trying commit 2283a5e with merge f64bf814c3bd0699e606747c02b721d3b60477ee...

@bors
Copy link
Contributor

bors commented Oct 25, 2022

☀️ Try build successful - checks-actions
Build commit: f64bf814c3bd0699e606747c02b721d3b60477ee (f64bf814c3bd0699e606747c02b721d3b60477ee)

@rust-timer
Copy link
Collaborator

Queued f64bf814c3bd0699e606747c02b721d3b60477ee with parent c6bd7e2, future comparison URL.

@petrochenkov petrochenkov removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 25, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (f64bf814c3bd0699e606747c02b721d3b60477ee): comparison URL.

Overall result: ❌ regressions - no action needed

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

@bors rollup=never
@rustbot label: S-waiting-on-review -S-waiting-on-perf -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.2% [0.2%, 0.2%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.3% [-2.3%, -2.3%] 1
Improvements ✅
(secondary)
-4.3% [-4.3%, -4.3%] 1
All ❌✅ (primary) -2.3% [-2.3%, -2.3%] 1

Cycles

This benchmark run did not return any relevant results for this metric.

Footnotes

  1. the arithmetic mean of the percent change 2

  2. number of relevant changes 2

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Oct 25, 2022
@petrochenkov
Copy link
Contributor Author

@bors rollup=maybe
r? @cjgillot

@rust-highfive rust-highfive assigned cjgillot and unassigned estebank Oct 25, 2022
// For non-reexport variants add their fictive constructors to children.
// Braced variants, unlike structs, generate unusable names in value namespace,
// they are reserved for possible future use. It's ok to use the variant's id as
// a ctor id since an error will be reported on any use of such resolution anyway.
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we get rid of this special case by giving a dedicated NodeId and LocalDefId to the ctor of struct variants that is different from the struct variant itself?

Copy link
Contributor Author

@petrochenkov petrochenkov Oct 25, 2022

Choose a reason for hiding this comment

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

I have something better in the pipeline - removing all this stuff entirely petrochenkov@be00274.
UPD: PR submitted in #103578.

@cjgillot
Copy link
Contributor

@bors r

@bors
Copy link
Contributor

bors commented Oct 26, 2022

📌 Commit 2283a5e has been approved by cjgillot

It is now in the queue for this repository.

@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 Oct 26, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 27, 2022
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#103110 (remove redundant Send impl for references)
 - rust-lang#103255 (Clean up hidden type registration)
 - rust-lang#103394 (Clarify documentation about the memory layout of `UnsafeCell`)
 - rust-lang#103408 (Clean return-position `impl Trait` in traits correctly in rustdoc)
 - rust-lang#103505 (rustdoc: parse self-closing tags and attributes in `invalid_html_tags`)
 - rust-lang#103524 (rustc_metadata: Add struct and variant constructors to module children at encoding time)
 - rust-lang#103544 (Add flag to forbid recovery in the parser)
 - rust-lang#103616 (rustdoc: remove CSS workaround for Firefox 29)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 4a01cab into rust-lang:master Oct 28, 2022
@rustbot rustbot added this to the 1.66.0 milestone Oct 28, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 26, 2022
rustc_metadata: Switch module children decoding to an iterator

Previously rust-lang#103578, rust-lang#103524 and previous PRs simplified it as much as possible.

A couple of cleanup commits is also added.
r? `@cjgillot`
RalfJung pushed a commit to RalfJung/rust-analyzer that referenced this pull request Apr 20, 2024
rustc_metadata: Switch module children decoding to an iterator

Previously rust-lang/rust#103578, rust-lang/rust#103524 and previous PRs simplified it as much as possible.

A couple of cleanup commits is also added.
r? `@cjgillot`
RalfJung pushed a commit to RalfJung/rust-analyzer that referenced this pull request Apr 27, 2024
rustc_metadata: Switch module children decoding to an iterator

Previously rust-lang/rust#103578, rust-lang/rust#103524 and previous PRs simplified it as much as possible.

A couple of cleanup commits is also added.
r? `@cjgillot`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants