Skip to content

Convert debug_assert to assert in CachingSourceMapView #89049

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 1 commit into from
Sep 19, 2021

Conversation

Aaron1011
Copy link
Member

I suspect that there's a bug somewhere in this code, which is
leading to the predicates_of ICE being seen in #89035

I suspect that there's a bug somewhere in this code, which is
leading to the `predicates_of` ICE being seen in rust-lang#89035
@rust-highfive
Copy link
Contributor

r? @oli-obk

(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 Sep 17, 2021
@Aaron1011
Copy link
Member 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 Sep 17, 2021
@bors
Copy link
Collaborator

bors commented Sep 17, 2021

⌛ Trying commit 95bea15 with merge edbbd49b6a668185b0a5eeb98938dc9f09ca9ffb...

@klensy
Copy link
Contributor

klensy commented Sep 17, 2021

This code smelling, in my point of view. We could use native rust types instead -1 as special value.

fn cache_entry_index(&self, pos: BytePos) -> isize {
for (idx, cache_entry) in self.line_cache.iter().enumerate() {
if cache_entry.line.contains(&pos) {
return idx as isize;
}
}
-1
}

@bors
Copy link
Collaborator

bors commented Sep 17, 2021

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

@rust-timer
Copy link
Collaborator

Queued edbbd49b6a668185b0a5eeb98938dc9f09ca9ffb with parent e0c38af, future comparison URL.

@Mark-Simulacrum
Copy link
Member

r=me presuming perf isn't terrible

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (edbbd49b6a668185b0a5eeb98938dc9f09ca9ffb): comparison url.

Summary: This change led to small relevant mixed results 🤷 in compiler performance.

  • Small improvement in instruction counts (up to -0.4% on full builds of deeply-nested-closures)
  • Small regression in instruction counts (up to 0.3% on incr-patched: println builds of coercions)

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

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 led to changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

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

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Sep 17, 2021
@Aaron1011
Copy link
Member Author

@bors r=Mark-Simulacrum

@bors
Copy link
Collaborator

bors commented Sep 17, 2021

📌 Commit 95bea15 has been approved by Mark-Simulacrum

@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 17, 2021
@bors
Copy link
Collaborator

bors commented Sep 19, 2021

⌛ Testing commit 95bea15 with merge 5ecc8ad...

@bors
Copy link
Collaborator

bors commented Sep 19, 2021

☀️ Test successful - checks-actions
Approved by: Mark-Simulacrum
Pushing 5ecc8ad to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 19, 2021
@bors bors merged commit 5ecc8ad into rust-lang:master Sep 19, 2021
@rustbot rustbot added this to the 1.57.0 milestone Sep 19, 2021
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (5ecc8ad): comparison url.

Summary: This benchmark run did not return any relevant changes.

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

@rustbot rustbot removed the perf-regression Performance regression. label Sep 19, 2021
@pnkfelix
Copy link
Member

Visiting for performance triage.

Got:

Perhaps noise, but 🎉 nonetheless. :)

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.

9 participants