Uh oh!
There was an error while loading. Please reload this page.
[MIR] implement zero-on-move - #31449
Conversation
Also remove these drop-glue i8 things… They for some reason make these completely non-MIR tests fail after dyndrop commit which has literally 0 changes around the regular old trans. Wut?
rust-highfive
commented
Feb 6, 2016
r? @jroesch (rust_highfive has picked a reviewer for you, use r? to override) |
nagisa
commented
Feb 6, 2016
NB: this is based on top of the initial dyndrop implementation PR. |
There was a problem hiding this comment.
I’m not sure about Immediate not needing any treatment here. Immediate only happens if common::type_is_immediate returns true, but to me it is not obvious that the function will never produce true in case of type having a Drop somewhere in it.
Also fix the tests to catch the double-drop on move.
nagisa
commented
Feb 6, 2016
Okay, so this won’t be as easy as I’ve initially thought. For example, call also consumes its arguments, although not through Sadly, zeroing after call is not as trivial as it sounds: worst-case introduces As for 2nd case… The alternative is to build a Any ideas, @nikomatsakis? |
| base::call_memset(&build::B(bcx), llptr, filling, size, align, false); | ||
| } | ||
| pub fn set_operand_dropped(&mut self, |
There was a problem hiding this comment.
This also feels seriously hacky to me, but I don’t see an obvious way to dropflag-fill a OperandValue::Immediate.
There was a problem hiding this comment.
You could use an out-of-line drop flag for these
bors
commented
Feb 9, 2016
☔ The latest upstream changes (presumably #31282) made this pull request unmergeable. Please resolve the merge conflicts. |
nikomatsakis
commented
Feb 11, 2016
For example, one can do something like this |
nikomatsakis
commented
Feb 11, 2016
(Did not mean to close.) |
nikomatsakis
commented
Feb 11, 2016
I was proposing to @nagisa on IRC that we might want to restruct Example: alternatively, Anyway, the goal here is to address the fact that the store only occurs when things succeed, and hopefully ease the translation to LLVM IR (and also ease dataflow somewhat -- @pnkfelix had to add some special cases here too). |
nikomatsakis
commented
Feb 11, 2016
@nagisa sorry, I've kind of lost track of the state here. do you think we should land this as a "work in progress", or should we wait till we can get things working more completely? |
This is, we think, is the last piece necessary for the fully functional implementation of dynamic dropping in MIR.