-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Only lookup types in one interner #50332
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
@bors try |
[WIP] Only lookup types in one interner
☀️ Test successful - status-travis |
r? @eddyb |
@Mark-Simulacrum I'd like a perf run here |
Perf queued (and started). |
src/librustc/ty/context.rs
Outdated
let flags = super::flags::FlagComputation::for_sty(&st); | ||
|
||
if flags.flags.intersects(ty::TypeFlags::KEEP_IN_LOCAL_TCX) != true { | ||
eprintln!("MISMATCH TRUE {:?}", st); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to remove these eprintln!
s? You already have asserts here.
src/librustc/ty/flags.rs
Outdated
@@ -250,3 +250,160 @@ impl FlagComputation { | |||
} | |||
} | |||
} | |||
|
|||
pub(crate) fn sty_in_local_arena(st: &ty::TypeVariants) -> bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't you reuse TypeVisitor
for this? Seems like a lot of code IMO.
This comment has been minimized.
This comment has been minimized.
LGTM, modulo the implementation duplicating a lot of logic. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@bors try |
[WIP] Only lookup types in one interner
☀️ Test successful - status-travis |
@Mark-Simulacrum I'd like another perf run to see if the fast path helps |
Perf queued. |
It seems like the fast-path wasn't a win. I've removed it and also applied the transformation to the interning macro. |
📌 Commit e245d69 has been approved by |
Only lookup types in one interner
☀️ Test successful - status-appveyor, status-travis |
No description provided.