-
Notifications
You must be signed in to change notification settings - Fork 745
ir: Track the codegen-reachable items, and use it instead of whitelisted_items() for code generation. #836
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
Conversation
r? @fitzgen |
(Only the |
maybe I should finish reading my inbox before leaving code reviews suggesting exactly what the next item in my inbox does... |
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.
r=me with nits below
Thanks :)
src/ir/context.rs
Outdated
}); | ||
// The reversal preserves the expected ordering of traversal, resulting | ||
// in more stable-ish bindgen-generated names for anonymous types (like | ||
// unions). |
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.
Why did this comment move here? It should be with the reverse
call.
self, | ||
roots.clone(), | ||
traversal::codegen_edges, | ||
).collect::<ItemSet>() |
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.
Mildly surprised the type inference couldn't figure this out.
@@ -3299,7 +3298,7 @@ pub fn codegen(context: &mut BindgenContext) -> Vec<P<ast::Item>> { | |||
} | |||
|
|||
context.resolve_item(context.root_module()) | |||
.codegen(context, &mut result, whitelisted_items, &()); | |||
.codegen(context, &mut result, codegen_items, &()); |
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.
File a follow up E-Easy
issue to remove this argument, and remove the whitelisted_items
parameter from all the codegen functions using ctx.codegen_items()
instead?
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.
Sure thing.
…ted_items() for code generation. This standardizes the behavior change at rust-lang#834, but without regressions. I've added a few more tests for rust-lang#833 here.
@bors-servo r=fitzgen |
📌 Commit 4fee077 has been approved by |
☀️ Test successful - status-travis |
This standardizes the behavior change at #834, but without regressions.
I've added a few more tests for #833 here.
Closes #834.