-
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
Extend --pretty flowgraph=ID to include dataflow results in output. #15371
Conversation
Looks like Travis failed again. |
Oh goodness, I left some debugging code in there, silly me. I will close this PR and reopen it after I have revised my code and actually passed tests locally. Sorry for the noise. |
BTW in my own review I'd say that the (but maybe not. feedback welcome.) |
|
||
/// Puts `suffix` on a line below this label, with a blank line separator. | ||
pub fn suffix_line(self, suffix: LabelText) -> LabelText { | ||
let prefix = self.pre_escaped_content().to_string(); |
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.
into_string
would be more efficient (even more efficient would be preallocating with String::with_capacity
and push_str
'ing to built it... but that's a lot more effort than adding two characters, likely for little gain).
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.
Actually it looks like there's a bunch of old stuff lying around in here that seems inefficient (e.g. the .escape_default().to_string()
above seems unnecessary).
I'll try to address those issues in tandem with this.
re r? @huonw ? (or r? anyone, really...) |
(rebased; r? anyone ) |
r=me, just one minor comment |
Use one or more of the following `-Z` flag options to tell the graphviz renderer to include the corresponding dataflow sets (after the iterative constraint propagation reaches a fixed-point solution): * `-Z flowgraph-print-loans` : loans computed via middle::borrowck * `-Z flowgraph-print-moves` : moves computed via middle::borrowck::move_data * `-Z flowgraph-print-assigns` : assignments, via middle::borrowck::move_data * `-Z flowgraph-print-all` : all of the available sets are included. Fix rust-lang#15016. ---- This also adds a module, `syntax::ast_map::blocks`, that captures a common abstraction shared amongst code blocks and procedure-like things. As part of this, moved `ast_map.rs` to subdir `ast_map/mod.rs`, to follow our directory layout conventions. (incorporated review feedback from huon, acrichto.)
…excrichton Use one or more of the following `-Z` flag options to tell the graphviz renderer to include the corresponding dataflow sets (after the iterative constraint propagation reaches a fixed-point solution): * `-Z flowgraph-print-loans` : loans computed via middle::borrowck * `-Z flowgraph-print-moves` : moves computed via middle::borrowck::move_data * `-Z flowgraph-print-assigns` : assignments, via middle::borrowck::move_data * `-Z flowgraph-print-all` : all of the available sets are included. Fix #15016.
Use one or more of the following
-Z
flag options to tell thegraphviz renderer to include the corresponding dataflow sets (after
the iterative constraint propagation reaches a fixed-point solution):
-Z flowgraph-print-loans
: loans computed via middle::borrowck-Z flowgraph-print-moves
: moves computed via middle::borrowck::move_data-Z flowgraph-print-assigns
: assignments, via middle::borrowck::move_data-Z flowgraph-print-all
: all of the available sets are included.Fix #15016.